diff --git a/index.html b/index.html index 6b8bb864..8f1c5498 100644 --- a/index.html +++ b/index.html @@ -309,16 +309,7 @@

Style preset:

- + @@ -4405,15 +4396,16 @@ + - + diff --git a/main.js b/main.js index 0dc57216..3f449c2e 100644 --- a/main.js +++ b/main.js @@ -226,8 +226,8 @@ void (function checkLoadParameters() { generateMapOnLoad(); })(); -function generateMapOnLoad() { - applyStyleOnLoad(); // apply default or previously selected style +async function generateMapOnLoad() { + await applyStyleOnLoad(); // apply previously selected default or custom style generate(); // generate map focusOn(); // based on searchParams focus on point, cell or burg from MFCG applyPreset(); // apply saved layers preset diff --git a/modules/ui/style.js b/modules/ui/style.js index f6294208..b4179fea 100644 --- a/modules/ui/style.js +++ b/modules/ui/style.js @@ -2,7 +2,7 @@ "use strict"; // add available filters to lists -void (function addFilters() { +{ const filters = Array.from(document.getElementById("filters").querySelectorAll("filter")); const emptyOption = ''; const options = filters.map(filter => { @@ -14,7 +14,7 @@ void (function addFilters() { document.getElementById("styleFilterInput").innerHTML = allOptions; document.getElementById("styleStatesBodyFilter").innerHTML = allOptions; -})(); +} // store some style inputs as options styleElements.addEventListener("change", function (ev) { @@ -754,334 +754,9 @@ function fetchTextureURL(url) { img.src = url; } -const defaultStyles = { - styleAncient: `{"#map":{"background-color":"#000000","filter":null,"data-filter":null},"#armies":{"font-size":8,"box-size":4,"stroke":"#000","stroke-width":0.2,"fill-opacity":1,"filter":null},"#biomes":{"opacity":null,"filter":null,"mask":"url(#land)"},"#stateBorders":{"opacity":0.8,"stroke":"#56566d","stroke-width":1,"stroke-dasharray":2,"stroke-linecap":"butt","filter":null},"#provinceBorders":{"opacity":0.8,"stroke":"#56566d","stroke-width":0.2,"stroke-dasharray":1,"stroke-linecap":"butt","filter":null},"#cells":{"opacity":null,"stroke":"#808080","stroke-width":0.1,"filter":null,"mask":null},"#gridOverlay":{"opacity":0.8,"scale":1,"dx":0,"dy":0,"type":"pointyHex","stroke":"#808080","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"transform":null,"filter":null,"mask":null},"#coordinates":{"opacity":1,"data-size":12,"font-size":12,"stroke":"#d4d4d4","stroke-width":1,"stroke-dasharray":5,"stroke-linecap":null,"filter":null,"mask":null},"#compass":{"opacity":0.5,"transform":null,"filter":"url(#filter-sepia)","mask":"url(#water)","shape-rendering":"optimizespeed"},"#rose":{"transform":"translate(80 80) scale(.25)"},"#relig":{"opacity":0.7,"stroke":"#404040","stroke-width":0.7,"filter":null},"#cults":{"opacity":0.6,"stroke":"#777777","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#landmass":{"opacity":1,"fill":"#e3dfce","filter":null},"#markers":{"opacity":null,"rescale":1,"filter":""},"#prec":{"opacity":null,"stroke":"#000000","stroke-width":0.1,"fill":"#003dff","filter":null},"#population":{"opacity":null,"stroke-width":1.6,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null},"#rural":{"stroke":"#0000ff"},"#urban":{"stroke":"#ff0000"},"#freshwater":{"opacity":0.6,"fill":"#c8d6e0","stroke":"#968d6e","stroke-width":0.7,"filter":null},"#salt":{"opacity":0.5,"fill":"#339482","stroke":"#836a34","stroke-width":0.7,"filter":null},"#sinkhole":{"opacity":1,"fill":"#c3d6df","stroke":"#b29062","stroke-width":0.7,"filter":null},"#frozen":{"opacity":0.95,"fill":"#cdd4e7","stroke":"#cfe0eb","stroke-width":0,"filter":null},"#lava":{"opacity":0.7,"fill":"#a04e18","stroke":"#835520","stroke-width":2,"filter":"url(#paper)"},"#dry":{"opacity":0.7,"fill":"#c6b795","stroke":"#8e816f","stroke-width":0.7,"filter":null},"#sea_island":{"opacity":0.5,"stroke":"#1f3846","stroke-width":0.7,"filter":"url(#dropShadow)","auto-filter":1},"#lake_island":{"opacity":1,"stroke":"#7c8eaf","stroke-width":0.35,"filter":null},"#terrain":{"opacity":1,"set":"simple","size":1,"density":0.4,"filter":null,"mask":null},"#rivers":{"opacity":null,"filter":"","fill":"#a69b7d"},"#ruler":{"opacity":null,"filter":null},"#roads":{"opacity":0.7,"stroke":"#8d502a","stroke-width":1,"stroke-dasharray":3,"stroke-linecap":"inherit","filter":"","mask":null},"#trails":{"opacity":0.7,"stroke":"#924217","stroke-width":0.5,"stroke-dasharray":"1 2","stroke-linecap":"butt","filter":null,"mask":null},"#searoutes":{"opacity":0.8,"stroke":"#b16925","stroke-width":0.8,"stroke-dasharray":"1 2","stroke-linecap":"round","filter":null,"mask":null},"#statesBody":{"opacity":0.2,"filter":"url(#filter-sepia)"},"#statesHalo":{"opacity":0.4,"data-width":10,"stroke-width":10,"filter":"blur(6px)"},"#provs":{"opacity":0.7,"fill":"#000000","font-size":10,"font-family":"Georgia","filter":null},"#temperature":{"opacity":null,"font-size":"8px","fill":"#000000","fill-opacity":0.3,"stroke":null,"stroke-width":1.8,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#ice":{"opacity":0.35,"fill":"#e8f0f6","stroke":"#e8f0f6","stroke-width":3,"filter":"url(#dropShadow05)"},"#emblems":{"opacity":0.8,"stroke-width":0.8,"filter":"url(#dropShadow05)"},"#texture":{"opacity":0.6,"filter":"","mask":""},"#textureImage":{"x":0,"y":0},"#zones":{"opacity":0.6,"stroke":"#333333","stroke-width":0,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null,"mask":null},"#oceanLayers":{"filter":"","layers":"-6,-4,-2"},"#oceanBase":{"fill":"#c99f64"},"#oceanicPattern":{"href":"./images/kiwiroo.png","opacity":0.4},"#terrs":{"opacity":null,"scheme":"bright","terracing":0,"skip":2,"relax":1,"curve":0,"filter":"url(#blur3)","mask":"url(#land)"},"#legend":{"data-size":13,"font-size":13,"font-family":"Almendra SC","stroke":"#812929","stroke-width":2.5,"stroke-dasharray":"0 4 10 4","stroke-linecap":"round","data-x":99,"data-y":93,"data-columns":8},"#burgLabels > #cities":{"opacity":1,"fill":"#3e3e4b","text-shadow":"white 0px 0px 4px","data-size":12,"font-size":12,"font-family":"Great Vibes"},"#burgIcons > #cities":{"opacity":1,"fill":"#fdfab9","fill-opacity":0.7,"size":1,"stroke":"#6f4e1f","stroke-width":0.3,"stroke-dasharray":".3 .4","stroke-linecap":"butt"},"#anchors > #cities":{"opacity":1,"fill":"#ffffff","size":2,"stroke":"#3e3e4b","stroke-width":1.2},"#burgLabels > #towns":{"opacity":1,"fill":"#3e3e4b","text-shadow":"white 0px 0px 4px","data-size":5,"font-size":5,"font-family":"Great Vibes"},"#burgIcons > #towns":{"opacity":1,"fill":"#fef4d8","fill-opacity":0.7,"size":0.5,"stroke":"#72472c","stroke-width":0.12,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #towns":{"opacity":1,"fill":"#ffffff","size":1,"stroke":"#3e3e4b","stroke-width":1.2},"#labels > #states":{"opacity":1,"fill":"#3e3e4b","stroke":"#3a3a3a","stroke-width":0,"text-shadow":"white 0px 0px 4px","data-size":22,"font-size":22,"font-family":"Great Vibes","filter":"url(#filter-sepia)"},"#labels > #addedLabels":{"opacity":1,"fill":"#3e3e4b","stroke":"#3a3a3a","stroke-width":0,"text-shadow":"white 0px 0px 4px","data-size":18,"font-size":18,"font-family":"Times New Roman","filter":"url(#filter-sepia)"},"#fogging":{"opacity":0.98,"fill":"#30426f","filter":null}}`, - styleGloom: `{"#map":{"background-color":"#000000","filter":null,"data-filter":null},"#armies":{"font-size":6,"box-size":3,"stroke":"#000","stroke-width":0.3,"opacity":1,"fill-opacity":1,"filter":null},"#biomes":{"opacity":null,"filter":"url(#blur5)","mask":"url(#land)"},"#stateBorders":{"opacity":1,"stroke":"#56566d","stroke-width":1,"stroke-dasharray":2,"stroke-linecap":"butt","filter":null},"#provinceBorders":{"opacity":1,"stroke":"#56566d","stroke-width":0.3,"stroke-dasharray":".7 1","stroke-linecap":"butt","filter":null},"#cells":{"opacity":null,"stroke":"#808080","stroke-width":0.1,"filter":null,"mask":null},"#gridOverlay":{"opacity":0.8,"scale":1,"dx":0,"dy":"0","type":"pointyHex","stroke":"#808080","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"transform":null,"filter":null,"mask":null},"#coordinates":{"opacity":1,"data-size":14,"font-size":14,"stroke":"#4a4a4a","stroke-width":1,"stroke-dasharray":6,"stroke-linecap":null,"filter":null,"mask":null},"#compass":{"opacity":0.6,"transform":null,"filter":null,"mask":"url(#water)","shape-rendering":"optimizespeed"},"#rose":{"transform":"translate(100 100) scale(0.3)"},"#relig":{"opacity":0.7,"stroke":"#404040","stroke-width":1,"filter":null},"#cults":{"opacity":0.7,"stroke":"#777777","stroke-width":1.5,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#landmass":{"opacity":1,"fill":"#e0e0e0","filter":null},"#markers":{"opacity":0.8,"rescale":1,"filter":"url(#dropShadow05)"},"#prec":{"opacity":null,"stroke":"#000000","stroke-width":0.1,"fill":"#003dff","filter":null},"#population":{"opacity":null,"stroke-width":1.6,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null},"#rural":{"stroke":"#0000aa"},"#urban":{"stroke":"#9d0000"},"#freshwater":{"opacity":0.5,"fill":"#a6c1fd","stroke":"#5f799d","stroke-width":0.7,"filter":null},"#salt":{"opacity":0.5,"fill":"#409b8a","stroke":"#388985","stroke-width":0.7,"filter":null},"#sinkhole":{"opacity":1,"fill":"#5bc9fd","stroke":"#53a3b0","stroke-width":0.7,"filter":null},"#frozen":{"opacity":0.95,"fill":"#cdd4e7","stroke":"#cfe0eb","stroke-width":0,"filter":null},"#lava":{"opacity":0.7,"fill":"#90270d","stroke":"#f93e0c","stroke-width":2,"filter":"url(#crumpled)"},"#dry":{"opacity":0.7,"fill":"#c9bfa7","stroke":"#8e816f","stroke-width":0.7,"filter":null},"#sea_island":{"opacity":0.6,"stroke":"#1f3846","stroke-width":0.7,"filter":"url(#dropShadow)","auto-filter":1},"#lake_island":{"opacity":1,"stroke":"#7c8eaf","stroke-width":0.35,"filter":null},"#terrain":{"opacity":0.9,"set":"simple","size":1,"density":0.4,"filter":null,"mask":null},"#rivers":{"opacity":null,"filter":null,"fill":"#779582"},"#ruler":{"opacity":null,"filter":null},"#roads":{"opacity":1,"stroke":"#8b4418","stroke-width":0.9,"stroke-dasharray":"2 3","stroke-linecap":"round","filter":null,"mask":null},"#trails":{"opacity":1,"stroke":"#844017","stroke-width":0.2,"stroke-dasharray":".5 1","stroke-linecap":"round","filter":null,"mask":null},"#searoutes":{"opacity":0.8,"stroke":"#5e1865","stroke-width":0.6,"stroke-dasharray":"1.2 2.4","stroke-linecap":"round","filter":null,"mask":null},"#statesBody":{"opacity":0.4,"filter":null},"#statesHalo":{"opacity":0.5,"data-width":12,"stroke-width":12,"filter":"blur(10px)"},"#provs":{"opacity":0.7,"fill":"#000000","data-size":10,"font-size":10,"font-family":"Georgia","filter":null},"#temperature":{"opacity":1,"font-size":"11px","fill":"#62001b","fill-opacity":0.3,"stroke":null,"stroke-width":2,"stroke-dasharray":2,"stroke-linecap":null,"filter":null},"#ice":{"opacity":0.9,"fill":"#e8f0f6","stroke":"#e8f0f6","stroke-width":1,"filter":"url(#dropShadow05)"},"#emblems": {"opacity":0.6,"stroke-width":0.5,"filter":null},"#texture":{"opacity":null,"filter":null,"mask":"url(#land)"},"#textureImage":{"x":0,"y":0},"#zones":{"opacity":0.5,"stroke":"#333333","stroke-width":0,"stroke-dasharray":null,"stroke-linecap":"butt","filter":"url(#dropShadow01)","mask":null},"#oceanLayers":{"filter":null,"layers":"-6,-4,-2"},"#oceanBase":{"fill":"#4e6964"},"#oceanicPattern":{"href":"./images/pattern3.png", "opacity":0.2},"#terrs":{"opacity":1,"scheme":"bright","terracing":0,"skip":0,"relax":1,"curve":1,"filter":"url(#filter-grayscale)","mask":"url(#land)"},"#legend":{"data-size":13,"font-size":13,"font-family":"Almendra SC","stroke":"#812929","stroke-width":2.5,"stroke-dasharray":"0 4 10 4","stroke-linecap":"round","data-x":99,"data-y":93,"data-columns":8},"#legendBox":{},"#burgLabels > #cities":{"opacity":1,"fill":"#3e3e4b","text-shadow":"white 0 0 4px","data-size":7,"font-size":7,"font-family":"Bitter"},"#burgIcons > #cities":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":2,"stroke":"#444444","stroke-width":0.25,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #cities":{"opacity":0.8,"fill":"#ffffff","size":4,"stroke":"#3e3e4b","stroke-width":1},"#burgLabels > #towns":{"opacity":1,"fill":"#3e3e4b","data-size":3,"font-size":3,"font-family":"Bitter"},"#burgIcons > #towns":{"opacity":0.95,"fill":"#ffffff","fill-opacity":0.7,"size":0.8,"stroke":"#3e3e4b","stroke-width":0.2,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #towns":{"opacity":1,"fill":"#ffffff","size":1.6,"stroke":"#3e3e4b","stroke-width":1.2},"#labels > #states":{"opacity":1,"fill":"#4e4e4e","stroke":"#b5b5b5","stroke-width":0,"text-shadow":"white 0 0 4px","data-size":22,"font-size":22,"font-family":"Almendra SC","filter":null},"#labels > #addedLabels":{"opacity":1,"fill":"#3e3e4b","stroke":"#3a3a3a","stroke-width":0,"text-shadow":"white 0 0 4px","data-size":18,"font-size":18,"font-family":"Almendra SC","filter":null},"#fogging":{"opacity":0.98,"fill":"#1b1423","filter":null}}`, - styleClean: `{"#map":{"background-color":"#000000","filter":null,"data-filter":null},"#armies":{"font-size":6,"box-size":3,"stroke":"#000","stroke-width":0,"opacity":1,"fill-opacity":1,"filter":null},"#biomes":{"opacity":0.5,"filter":"url(#blur7)","mask":"url(#land)"},"#stateBorders":{"opacity":0.8,"stroke":"#414141","stroke-width":0.7,"stroke-dasharray":0,"stroke-linecap":"butt","filter":null},"#provinceBorders":{"opacity":0.8,"stroke":"#414141","stroke-width":0.45,"stroke-dasharray":1,"stroke-linecap":"butt","filter":null},"#cells":{"opacity":null,"stroke":"#808080","stroke-width":0.09,"filter":null,"mask":"url(#land)"},"#gridOverlay":{"opacity":0.8,"scale":1,"dx":0,"dy":"0","type":"pointyHex","stroke":"#808080","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"transform":null,"filter":null,"mask":null},"#coordinates":{"opacity":1,"data-size":12,"font-size":12,"stroke":"#414141","stroke-width":0.45,"stroke-dasharray":3,"stroke-linecap":null,"filter":null,"mask":null},"#compass":{"opacity":0.8,"transform":null,"filter":null,"mask":"url(#water)","shape-rendering":"optimizespeed"},"#rose":{"transform":null},"#relig":{"opacity":0.7,"stroke":"#404040","stroke-width":0.7,"filter":null},"#cults":{"opacity":0.6,"stroke":"#777777","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#landmass":{"opacity":1,"fill":"#eeedeb","filter":null},"#markers":{"opacity":null,"rescale":null,"filter":"url(#dropShadow01)"},"#prec":{"opacity":null,"stroke":"#000000","stroke-width":0,"fill":"#0080ff","filter":null},"#population":{"opacity":null,"stroke-width":2.58,"stroke-dasharray":0,"stroke-linecap":"butt","filter":"url(#blur3)"},"#rural":{"stroke":"#ff0000"},"#urban":{"stroke":"#800000"},"#freshwater":{"opacity":0.5,"fill":"#aadaff","stroke":"#5f799d","stroke-width":0,"filter":null},"#salt":{"opacity":0.5,"fill":"#409b8a","stroke":"#388985","stroke-width":0.7,"filter":null},"#sinkhole":{"opacity":1,"fill":"#5bc9fd","stroke":"#53a3b0","stroke-width":0.7,"filter":null},"#frozen":{"opacity":0.95,"fill":"#cdd4e7","stroke":"#cfe0eb","stroke-width":0,"filter":null},"#lava":{"opacity":0.7,"fill":"#90270d","stroke":"#f93e0c","stroke-width":2,"filter":"url(#crumpled)"},"#dry":{"opacity":0.7,"fill":"#c9bfa7","stroke":"#8e816f","stroke-width":0.7,"filter":null},"#sea_island":{"opacity":0.6,"stroke":"#595959","stroke-width":0.4,"filter":null,"auto-filter":0},"#lake_island":{"opacity":0,"stroke":"#7c8eaf","stroke-width":0,"filter":null},"#terrain":{"opacity":1,"set":"simple","size":1,"density":0.4,"filter":null,"mask":null},"#rivers":{"opacity":null,"filter":null,"fill":"#aadaff"},"#ruler":{"opacity":null,"filter":null},"#roads":{"opacity":0.9,"stroke":"#f6d068","stroke-width":0.7,"stroke-dasharray":0,"stroke-linecap":"inherit","filter":null,"mask":null},"#trails":{"opacity":1,"stroke":"#ffffff","stroke-width":0.25,"stroke-dasharray":"","stroke-linecap":"round","filter":null,"mask":null},"#searoutes":{"opacity":0.8,"stroke":"#4f82c6","stroke-width":0.45,"stroke-dasharray":2,"stroke-linecap":"butt","filter":null,"mask":"url(#water)"},"#statesBody":{"opacity":0.3,"filter":null},"#statesHalo":{"opacity":0.5,"data-width":1,"stroke-width":1,"filter":null},"#provs":{"opacity":0.7,"fill":"#000000","data-size":10,"font-size":10,"font-family":"Georgia","filter":null},"#temperature":{"opacity":null,"font-size":"8px","fill":"#000000","fill-opacity":0.3,"stroke":null,"stroke-width":1.8,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#ice":{"opacity":0.9,"fill":"#e8f0f6","stroke":"#e8f0f6","stroke-width":1,"filter":"url(#dropShadow01)"},"#emblems":{"opacity":1,"stroke-width":1,"filter":null},"#texture":{"opacity":null,"filter":null,"mask":"url(#land)"},"#textureImage":{},"#zones":{"opacity":0.7,"stroke":"#ff6262","stroke-width":0,"stroke-dasharray":"","stroke-linecap":"butt","filter":null,"mask":null},"#oceanLayers":{"filter":null,"layers":"none"},"#oceanBase":{"fill":"#aadaff"},"#oceanicPattern":{"href":"", "opacity":0.2},"#terrs":{"opacity":0.5,"scheme":"bright","terracing":0,"skip":5,"relax":0,"curve":0,"filter":null,"mask":"url(#land)"},"#legend":{"data-size":12.74,"font-size":12.74,"font-family":"Arial","stroke":"#909090","stroke-width":1.13,"stroke-dasharray":0,"stroke-linecap":"round","data-x":98.39,"data-y":12.67,"data-columns":null},"#legendBox":{},"#burgLabels > #cities":{"opacity":1,"fill":"#414141","text-shadow":"white 0 0 4px","data-size":7,"font-size":7,"font-family":"Arial"},"#burgIcons > #cities":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":1,"stroke":"#3e3e4b","stroke-width":0.24,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #cities":{"opacity":1,"fill":"#ffffff","size":2,"stroke":"#303030","stroke-width":1.7},"#burgLabels > #towns":{"opacity":1,"fill":"#414141","data-size":3,"font-size":3,"font-family":"Arial"},"#burgIcons > #towns":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":0.5,"stroke":"#3e3e4b","stroke-width":0.12,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #towns":{"opacity":1,"fill":"#ffffff","size":1,"stroke":"#3e3e4b","stroke-width":1.06},"#labels > #states":{"opacity":1,"fill":"#292929","stroke":"#303030","stroke-width":0,"text-shadow":"white 0 0 2px","data-size":10,"font-size":10,"font-family":"Arial","filter":null},"#labels > #addedLabels":{"opacity":1,"fill":"#414141","stroke":"#3a3a3a","stroke-width":0,"text-shadow":"white 0 0 4px","data-size":18,"font-size":18,"font-family":"Arial","filter":null},"#fogging":{"opacity":1,"fill":"#ffffff","filter":null}}`, - styleLight: `{"#map":{"background-color":"#000000","filter":null,"data-filter":null},"#armies":{"font-size":8,"box-size":4,"stroke":"#000","stroke-width":0.02,"fill-opacity":0.8,"filter":null},"#biomes":{"opacity":0.5,"filter":null,"mask":"url(#land)"},"#stateBorders":{"opacity":0.8,"stroke":"#4c483e","stroke-width":1,"stroke-dasharray":2,"stroke-linecap":"square","filter":null},"#provinceBorders":{"opacity":0.8,"stroke":"#56566d","stroke-width":0.2,"stroke-dasharray":1,"stroke-linecap":"butt","filter":null},"#cells":{"opacity":null,"stroke":"#808080","stroke-width":0.1,"filter":null,"mask":null},"#gridOverlay":{"opacity":0.5,"scale":1,"dx":0,"dy":0,"type":"pointyHex","stroke":"#808080","stroke-width":1,"stroke-dasharray":null,"stroke-linecap":null,"transform":null,"filter":null,"mask":null},"#coordinates":{"opacity":0.7,"data-size":15,"font-size":15,"stroke":"#734d37","stroke-width":1.5,"stroke-dasharray":5,"stroke-linecap":"square","filter":null,"mask":""},"#compass":{"opacity":0.6,"transform":null,"filter":null,"mask":"url(#water)","shape-rendering":"optimizespeed"},"#rose":{"transform":null},"#relig":{"opacity":0.5,"stroke":null,"stroke-width":0,"filter":null},"#cults":{"opacity":0.5,"stroke":"#777777","stroke-width":0,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#landmass":{"opacity":1,"fill":"#f9f2ea","filter":null},"#markers":{"opacity":null,"rescale":1,"filter":null},"#prec":{"opacity":null,"stroke":"#000000","stroke-width":0.1,"fill":"#2554ef","filter":null},"#population":{"opacity":null,"stroke-width":1.6,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null},"#rural":{"stroke":"#0000ff"},"#urban":{"stroke":"#ff0000"},"#freshwater":{"opacity":1,"fill":"#98cdc4","stroke":"#719892","stroke-width":0.46,"filter":"url(#dropShadow05)"},"#salt":{"opacity":0.5,"fill":"#409b8a","stroke":"#388985","stroke-width":0.7,"filter":null},"#sinkhole":{"opacity":1,"fill":"#5bc9fd","stroke":"#53a3b0","stroke-width":0.7,"filter":null},"#frozen":{"opacity":0.95,"fill":"#cdd4e7","stroke":"#cfe0eb","stroke-width":0,"filter":null},"#lava":{"opacity":0.7,"fill":"#90270d","stroke":"#f93e0c","stroke-width":2,"filter":"url(#crumpled)"},"#dry":{"opacity":1,"fill":"#c9bfa7","stroke":"#8e816f","stroke-width":0.7,"filter":null},"#sea_island":{"opacity":1,"stroke":"#5e5e5e","stroke-width":0.4,"filter":"url(#dropShadow)","auto-filter":1},"#lake_island":{"opacity":1,"stroke":"#7c8eaf","stroke-width":0.35,"filter":null},"#terrain":{"opacity":0.6,"set":"colored","size":1,"density":0.3,"filter":null,"mask":""},"#rivers":{"opacity":null,"filter":null,"fill":"#6d94ba"},"#ruler":{"opacity":null,"filter":null},"#roads":{"opacity":0.9,"stroke":"#3c1d0b","stroke-width":1.37,"stroke-dasharray":2,"stroke-linecap":"inherit","filter":null,"mask":null},"#trails":{"opacity":0.9,"stroke":"#95481a","stroke-width":0.88,"stroke-dasharray":".8 1.6","stroke-linecap":"butt","filter":null,"mask":null},"#searoutes":{"opacity":0.8,"stroke":"#ffffff","stroke-width":0.45,"stroke-dasharray":"1 2","stroke-linecap":"round","filter":null,"mask":null},"#statesBody":{"opacity":0.2,"filter":null},"#statesHalo":{"opacity":0.3,"data-width":25,"stroke-width":25,"filter":"blur(5px)"},"#provs":{"opacity":0.4,"fill":"#000000","font-size":5,"font-family":"IM Fell English","filter":null},"#temperature":{"opacity":null,"font-size":"8px","fill":"#000000","fill-opacity":0.3,"stroke":null,"stroke-width":1.8,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#ice":{"opacity":0.5,"fill":"#e8f0f6","stroke":"#e8f0f6","stroke-width":1.5,"filter":"url(#dropShadow05)"},"#emblems":{"opacity":0.9,"stroke-width":1,"filter":null},"#texture":{"opacity":0.39,"filter":null,"mask":""},"#zones":{"opacity":0.6,"stroke":"#333333","stroke-width":0,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null,"mask":null},"#oceanLayers":{"filter":"url(#dropShadow05)","layers":"-6,-3,-1"},"#oceanBase":{"fill":"#8dc1c8"},"#oceanicPattern":{"href":"./images/pattern1.png","opacity":0.2},"#terrs":{"opacity":0.4,"scheme":"light","terracing":10,"skip":5,"relax":0,"curve":0,"filter":"url(#turbulence)","mask":"url(#land)"},"#legend":{"data-size":13,"font-size":13,"font-family":"Almendra SC","stroke":"#812929","stroke-width":2.5,"stroke-dasharray":"0 4 10 4","stroke-linecap":"round","data-x":54.73,"data-y":62.98,"data-columns":8},"#burgLabels > #cities":{"opacity":1,"fill":"#3a3a3a","text-shadow":"white 0px 0px 4px","data-size":8,"font-size":8,"font-family":"IM Fell English"},"#burgIcons > #cities":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":3,"stroke":"#3e3e4b","stroke-width":0.4,"stroke-dasharray":"0.5 0.25","stroke-linecap":"butt"},"#anchors > #cities":{"opacity":1,"fill":"#ffffff","size":5.5,"stroke":"#3e3e4b","stroke-width":1.2},"#burgLabels > #towns":{"opacity":1,"fill":"#3e3e4b","text-shadow":"white 0px 0px 4px","data-size":4,"font-size":4,"font-family":"IM Fell English"},"#burgIcons > #towns":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":1.2,"stroke":"#3e3e4b","stroke-width":0.2,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #towns":{"opacity":1,"fill":"#ffffff","size":2.2,"stroke":"#3e3e4b","stroke-width":1.2},"#labels > #states":{"opacity":1,"fill":"#3e3e3e","stroke":"#000000","stroke-width":0.3,"text-shadow":"white 0px 0px 6px","data-size":14,"font-size":14,"font-family":"IM Fell English","filter":null},"#labels > #addedLabels":{"opacity":1,"fill":"#f24706","stroke":"#701b05","stroke-width":0.1,"text-shadow":"white 0px 0px 4px","data-size":6,"font-size":6,"font-family":"IM Fell English","filter":null},"#fogging":{"opacity":1,"fill":"#30426f","filter":null}}`, - styleWatercolor: `{"#map":{"background-color":"#000000","filter":null,"data-filter":null},"#armies":{"font-size":8,"box-size":4,"stroke":"#000","stroke-width":0.2,"fill-opacity":1,"filter":null},"#biomes":{"opacity":0.6,"filter":null,"mask":"url(#land)"},"#stateBorders":{"opacity":0.6,"stroke":"#56566d","stroke-width":1,"stroke-dasharray":3,"stroke-linecap":"butt","filter":null},"#provinceBorders":{"opacity":0.5,"stroke":"#56566d","stroke-width":0.5,"stroke-dasharray":"0 2","stroke-linecap":"round","filter":null},"#cells":{"opacity":null,"stroke":"#808080","stroke-width":0.1,"filter":null,"mask":null},"#gridOverlay":{"opacity":0.8,"scale":1,"dx":0,"dy":0,"type":"pointyHex","stroke":"#777777","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"transform":null,"filter":null,"mask":null},"#coordinates":{"opacity":1,"data-size":12,"font-size":12,"stroke":"#d4d4d4","stroke-width":1,"stroke-dasharray":5,"stroke-linecap":null,"filter":null,"mask":null},"#compass":{"opacity":0.8,"transform":null,"filter":null,"mask":"url(#water)","shape-rendering":"optimizespeed"},"#rose":{"transform":"translate(80 80) scale(.25)"},"#relig":{"opacity":0.7,"stroke":"#777777","stroke-width":0,"filter":"url(#bluredSplotch)"},"#cults":{"opacity":0.6,"stroke":"#777777","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"filter":"url(#splotch)"},"#landmass":{"opacity":1,"fill":"#eef6fb","filter":null},"#markers":{"opacity":null,"rescale":1,"filter":"url(#dropShadow01)"},"#prec":{"opacity":null,"stroke":"#000000","stroke-width":0.1,"fill":"#003dff","filter":null},"#population":{"opacity":null,"stroke-width":1.6,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null},"#rural":{"stroke":"#0000ff"},"#urban":{"stroke":"#ff0000"},"#freshwater":{"opacity":0.5,"fill":"#a6c1fd","stroke":"#5f799d","stroke-width":0.7,"filter":null},"#salt":{"opacity":0.5,"fill":"#409b8a","stroke":"#388985","stroke-width":0.7,"filter":null},"#sinkhole":{"opacity":1,"fill":"#5bc9fd","stroke":"#53a3b0","stroke-width":0.7,"filter":null},"#frozen":{"opacity":0.95,"fill":"#cdd4e7","stroke":"#cfe0eb","stroke-width":0,"filter":null},"#lava":{"opacity":0.7,"fill":"#90270d","stroke":"#f93e0c","stroke-width":2,"filter":"url(#crumpled)"},"#dry":{"opacity":1,"fill":"#c9bfa7","stroke":"#8e816f","stroke-width":0.7,"filter":null},"#sea_island":{"opacity":0.5,"stroke":"#1f3846","stroke-width":0.7,"filter":"url(#dropShadow)","auto-filter":1},"#lake_island":{"opacity":1,"stroke":"#7c8eaf","stroke-width":0.35,"filter":null},"#terrain":{"opacity":1,"set":"gray","size":1,"density":0.4,"filter":null,"mask":null},"#rivers":{"opacity":null,"filter":null,"fill":"#2e89c2"},"#ruler":{"opacity":null,"filter":null},"#roads":{"opacity":0.9,"stroke":"#969696","stroke-width":0.7,"stroke-dasharray":"","stroke-linecap":"butt","filter":null,"mask":null},"#trails":{"opacity":0.9,"stroke":"#969696","stroke-width":0.4,"stroke-dasharray":"","stroke-linecap":"butt","filter":null,"mask":null},"#searoutes":{"opacity":0.9,"stroke":"#969696","stroke-width":0.7,"stroke-dasharray":"","stroke-linecap":"round","filter":null,"mask":null},"#statesBody":{"opacity":0.05,"filter":null},"#statesHalo":{"opacity":0.4,"data-width":8,"stroke-width":8,"filter":"blur(2px)"},"#provs":{"opacity":0.7,"fill":"#000000","font-size":4,"font-family":"Comfortaa","filter":null},"#temperature":{"opacity":null,"font-size":"8px","fill":"#000000","fill-opacity":0.3,"stroke":null,"stroke-width":1.8,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#ice":{"opacity":0.7,"fill":"#dfe8ec","stroke":"#000000","stroke-width":0,"filter":"url(#dropShadow05)"},"#emblems":{"opacity":0.95,"stroke-width":1,"filter":null},"#texture":{"opacity":0.2,"filter":null,"mask":"url(#land)"},"#zones":{"opacity":0.6,"stroke":"#333333","stroke-width":0,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null,"mask":null},"#oceanLayers":{"filter":null,"layers":"-6,-4,-2"},"#oceanBase":{"fill":"#2d788b"},"#oceanicPattern":{"href":"./images/kiwiroo.png","opacity":0.5},"#terrs":{"opacity":0.5,"scheme":"light","terracing":0,"skip":5,"relax":1,"curve":0,"filter":null,"mask":"url(#land)"},"#legend":{"data-size":13,"font-size":13,"font-family":"Almendra SC","stroke":"#812929","stroke-width":2.5,"stroke-dasharray":"0 4 10 4","stroke-linecap":"round","data-x":99,"data-y":93,"data-columns":8},"#burgLabels > #cities":{"opacity":1,"fill":"#043449","text-shadow":"white 0px 0px 2px","data-size":5,"font-size":5,"font-family":"Comfortaa"},"#burgIcons > #cities":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":1,"stroke":"#3e3e4b","stroke-width":0.24,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #cities":{"opacity":1,"fill":"#ffffff","size":2,"stroke":"#3e3e4b","stroke-width":1.2},"#burgLabels > #towns":{"opacity":1,"fill":"#3e3e4b","text-shadow":"white 0px 0px 4px","data-size":3,"font-size":3,"font-family":"Comfortaa"},"#burgIcons > #towns":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":0.5,"stroke":"#3e3e4b","stroke-width":0.12,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #towns":{"opacity":1,"fill":"#ffffff","size":1,"stroke":"#3e3e4b","stroke-width":1.2},"#labels > #states":{"opacity":1,"fill":"#ffffff","stroke":"#000000","stroke-width":0.15,"text-shadow":"black 1px 1px 2px","data-size":20,"font-size":20,"font-family":"Gloria Hallelujah","filter":null},"#labels > #addedLabels":{"opacity":1,"fill":"#3e3e4b","stroke":"#3a3a3a","stroke-width":0,"text-shadow":"white 0px 0px 4px","data-size":18,"font-size":18,"font-family":"Comfortaa","filter":null},"#fogging":{"opacity":0.97,"fill":"#8398ce","filter":null}}`, - styleCyberpunk: `{"#map":{"background-color":"#000000","filter":null,"data-filter":null},"#armies":{"font-size":8,"box-size":4,"stroke":"#000000","stroke-width":0.6,"fill-opacity":1,"filter":null},"#biomes":{"opacity":0.7,"filter":"","mask":"url(#land)"},"#stateBorders":{"opacity":1,"stroke":"#ffffff","stroke-width":1,"stroke-dasharray":3,"stroke-linecap":"round","filter":""},"#provinceBorders":{"opacity":0.5,"stroke":"#ffffff","stroke-width":0.3,"stroke-dasharray":1,"stroke-linecap":"round","filter":""},"#cells":{"opacity":null,"stroke":"#808080","stroke-width":0.1,"filter":null,"mask":null},"#gridOverlay":{"opacity":0.8,"scale":1,"dx":0,"dy":0,"type":"pointyHex","stroke":"#808080","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"transform":null,"filter":null,"mask":null},"#coordinates":{"opacity":1,"data-size":14,"font-size":14,"stroke":"#4a4a4a","stroke-width":1,"stroke-dasharray":6,"stroke-linecap":null,"filter":null,"mask":null},"#compass":{"opacity":0.9,"transform":null,"filter":null,"mask":"","shape-rendering":"optimizespeed"},"#rose":{"transform":null},"#relig":{"opacity":0.5,"stroke":"#404040","stroke-width":2,"filter":"url(#splotch)"},"#cults":{"opacity":0.35,"stroke":"#777777","stroke-width":2,"stroke-dasharray":null,"stroke-linecap":null,"filter":"url(#splotch)"},"#landmass":{"opacity":1,"fill":"#04011e","filter":null},"#markers":{"opacity":0.8,"rescale":1,"filter":"url(#dropShadow05)"},"#prec":{"opacity":null,"stroke":"#000000","stroke-width":0.1,"fill":"#003dff","filter":null},"#population":{"opacity":null,"stroke-width":1.6,"stroke-dasharray":null,"stroke-linecap":"square","filter":null},"#rural":{"stroke":"#5294ff"},"#urban":{"stroke":"#5cdeff"},"#freshwater":{"opacity":0.9,"fill":"#381579","stroke":"#47228c","stroke-width":3,"filter":null},"#salt":{"opacity":0.5,"fill":"#409b8a","stroke":"#388985","stroke-width":0.7,"filter":null},"#sinkhole":{"opacity":1,"fill":"#5bc9fd","stroke":"#53a3b0","stroke-width":0.7,"filter":null},"#frozen":{"opacity":0.95,"fill":"#cdd4e7","stroke":"#cfe0eb","stroke-width":0,"filter":null},"#lava":{"opacity":0.7,"fill":"#90270d","stroke":"#f93e0c","stroke-width":2,"filter":"url(#crumpled)"},"#dry":{"opacity":0.7,"fill":"#c9bfa7","stroke":"#8e816f","stroke-width":0.7,"filter":null},"#sea_island":{"opacity":0.6,"stroke":"#1f3846","stroke-width":0.7,"filter":"url(#dropShadow)","auto-filter":1},"#lake_island":{"opacity":1,"stroke":"#7c8eaf","stroke-width":0.35,"filter":null},"#terrain":{"opacity":0.9,"set":"simple","size":1,"density":0.4,"filter":null,"mask":null},"#rivers":{"opacity":null,"filter":null,"fill":"#6738bc"},"#ruler":{"opacity":null,"filter":null},"#roads":{"opacity":1,"stroke":"#c44ac0","stroke-width":0.9,"stroke-dasharray":"2 3","stroke-linecap":"round","filter":null,"mask":null},"#trails":{"opacity":1,"stroke":"#df2654","stroke-width":0.2,"stroke-dasharray":".5 1","stroke-linecap":"round","filter":null,"mask":null},"#searoutes":{"opacity":0.8,"stroke":"#a890c6","stroke-width":0.6,"stroke-dasharray":"1.2 2.4","stroke-linecap":"round","filter":null,"mask":null},"#statesBody":{"opacity":0,"filter":null},"#statesHalo":{"opacity":1,"data-width":13,"stroke-width":13,"filter":"blur(8.25px)"},"#provs":{"opacity":0.2,"fill":"#933e3e","font-size":8,"font-family":"Orbitron","filter":""},"#temperature":{"opacity":0.8,"font-size":"22px","fill":"#551282","fill-opacity":0.3,"stroke":null,"stroke-width":3,"stroke-dasharray":2,"stroke-linecap":null,"filter":null},"#ice":{"opacity":0.3,"fill":"#919191","stroke":"#949494","stroke-width":0,"filter":"url(#dropShadow05)"},"#emblems":{"opacity":0.75,"stroke-width":0.5,"filter":""},"#texture":{"opacity":0.14,"filter":null,"mask":"url(#water)"},"#zones":{"opacity":0.7,"stroke":"#ffffff","stroke-width":0.3,"stroke-dasharray":null,"stroke-linecap":"inherit","filter":"url(#dropShadow05)","mask":null},"#oceanLayers":{"filter":"","layers":"-6,-3,-1"},"#oceanBase":{"fill":"#05001f"},"#oceanicPattern":{"href":"","opacity":0.15},"#terrs":{"opacity":1,"scheme":"monochrome","terracing":6,"skip":0,"relax":2,"curve":0,"filter":"","mask":"url(#land)"},"#legend":{"data-size":13,"font-size":13,"font-family":"Almendra SC","stroke":"#812929","stroke-width":2.5,"stroke-dasharray":"0 4 10 4","stroke-linecap":"round","data-x":99,"data-y":93,"data-columns":8},"#burgLabels > #cities":{"opacity":1,"fill":"#ffffff","text-shadow":"white 0px 0px 4px","data-size":8,"font-size":8,"font-family":"Orbitron"},"#burgIcons > #cities":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":2,"stroke":"#444444","stroke-width":0.25,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #cities":{"opacity":1,"fill":"#ffffff","size":4,"stroke":"#3e3e4b","stroke-width":1},"#burgLabels > #towns":{"opacity":1,"fill":"#ffffff","text-shadow":"white 0px 0px 4px","data-size":3,"font-size":3,"font-family":"Orbitron"},"#burgIcons > #towns":{"opacity":0.95,"fill":"#ffffff","fill-opacity":0.7,"size":0.8,"stroke":"#3e3e4b","stroke-width":0.2,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #towns":{"opacity":1,"fill":"#ffffff","size":1.6,"stroke":"#3e3e4b","stroke-width":1},"#labels > #states":{"opacity":1,"fill":"#ffffff","stroke":"#000000","stroke-width":0,"text-shadow":"white 0px 0px 4px","data-size":18,"font-size":18,"font-family":"Orbitron","filter":""},"#labels > #addedLabels":{"opacity":1,"fill":"#ffffff","stroke":"#000000","stroke-width":0,"text-shadow":"white 0px 0px 4px","data-size":18,"font-size":18,"font-family":"Almendra SC","filter":null},"#fogging":{"opacity":0.98,"fill":"#1b1423","filter":null}}`, - styleMonochrome: `{"#map":{"background-color":"#000000","filter":"url(#filter-grayscale)","data-filter":"grayscale"},"#armies":{"font-size":6,"box-size":3,"stroke":"#000","stroke-width":0.3,"opacity":1,"fill-opacity":1,"filter":null},"#biomes":{"opacity":null,"filter":"url(#blur5)","mask":"url(#land)"},"#stateBorders":{"opacity":1,"stroke":"#56566d","stroke-width":1,"stroke-dasharray":2,"stroke-linecap":"butt","filter":null},"#provinceBorders":{"opacity":1,"stroke":"#56566d","stroke-width":0.4,"stroke-dasharray":1,"stroke-linecap":"butt","filter":null},"#cells":{"opacity":null,"stroke":"#808080","stroke-width":0.1,"filter":null,"mask":null},"#gridOverlay":{"opacity":0.8,"scale":1,"dx":0,"dy":"0","type":"pointyHex","stroke":"#808080","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"transform":null,"filter":null,"mask":null},"#coordinates":{"opacity":1,"data-size":12,"font-size":12,"stroke":"#d4d4d4","stroke-width":1,"stroke-dasharray":5,"stroke-linecap":null,"filter":null,"mask":null},"#compass":{"opacity":0.8,"transform":null,"filter":null,"mask":"url(#water)","shape-rendering":"optimizespeed"},"#rose":{"transform":null},"#relig":{"opacity":0.7,"stroke":"#404040","stroke-width":0.7,"filter":null},"#cults":{"opacity":0.6,"stroke":"#777777","stroke-width":0.5,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#landmass":{"opacity":1,"fill":"#000000","filter":null},"#markers":{"opacity":null,"rescale":1,"filter":"url(#dropShadow01)"},"#prec":{"opacity":null,"stroke":"#000000","stroke-width":0.1,"fill":"#003dff","filter":null},"#population":{"opacity":null,"stroke-width":1.6,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null},"#rural":{"stroke":"#0000ff"},"#urban":{"stroke":"#ff0000"},"#freshwater":{"opacity":1,"fill":"#000000","stroke":"#515151","stroke-width":0,"filter":null},"#salt":{"opacity":1,"fill":"#000000","stroke":"#484848","stroke-width":0,"filter":null},"#sinkhole":{"opacity":1,"fill":"#000000","stroke":"#5f5f5f","stroke-width":0.5,"filter":null},"#frozen":{"opacity":1,"fill":"#000000","stroke":"#6f6f6f","stroke-width":0,"filter":null},"#lava":{"opacity":1,"fill":"#000000","stroke":"#5d5d5d","stroke-width":0,"filter":null},"#sea_island":{"opacity":1,"stroke":"#1f3846","stroke-width":0,"filter":null,"auto-filter":0},"#lake_island":{"opacity":0,"stroke":"#7c8eaf","stroke-width":0,"filter":null},"#terrain":{"opacity":null,"set":"simple","size":1,"density":0.4,"filter":null,"mask":null},"#rivers":{"opacity":0.2,"filter":"url(#blur1)","fill":"#000000"},"#ruler":{"opacity":null,"filter":null},"#roads":{"opacity":0.9,"stroke":"#d06324","stroke-width":0.7,"stroke-dasharray":2,"stroke-linecap":"butt","filter":null,"mask":null},"#trails":{"opacity":0.9,"stroke":"#d06324","stroke-width":0.25,"stroke-dasharray":".8 1.6","stroke-linecap":"butt","filter":null,"mask":null},"#searoutes":{"opacity":0.8,"stroke":"#ffffff","stroke-width":0.45,"stroke-dasharray":"1 2","stroke-linecap":"round","filter":null,"mask":null},"#statesBody":{"opacity":0.4,"filter":null},"#statesHalo":{"opacity":0.4,"data-width":10,"stroke-width":10,"filter":"blur(5px)"},"#provs":{"opacity":0.7,"fill":"#000000","data-size":10,"font-size":10,"font-family":"Georgia","filter":null},"#temperature":{"opacity":null,"font-size":"8px","fill":"#000000","fill-opacity":0.3,"stroke":null,"stroke-width":1.8,"stroke-dasharray":null,"stroke-linecap":null,"filter":null},"#ice":{"opacity":0.9,"fill":"#e8f0f6","stroke":"#e8f0f6","stroke-width":1,"filter":"url(#dropShadow05)"},"#texture":{"opacity":1,"filter":null,"mask":"url(#land)"},"#emblems": {"opacity": 0.5,"stroke-width": 0.5,"filter": null},"#textureImage":{},"#zones":{"opacity":0.6,"stroke":"#333333","stroke-width":0,"stroke-dasharray":null,"stroke-linecap":"butt","filter":null,"mask":null},"#oceanLayers":{"filter":null,"layers":"none"},"#oceanBase":{"fill":"#000000"},"#oceanicPattern":{"href":"", "opacity":0.2},"#terrs":{"opacity":1,"scheme":"monochrome","terracing":0,"skip":5,"relax":0,"curve":0,"filter":"url(#blur3)","mask":"url(#land)"},"#legend":{"data-size":13,"font-size":13,"font-family":"Almendra SC","stroke":"#812929","stroke-width":2.5,"stroke-dasharray":"0 4 10 4","stroke-linecap":"round","data-x":99,"data-y":93,"data-columns":8},"#legendBox":{},"#burgLabels > #cities":{"opacity":1,"fill":"#3e3e4b","text-shadow":"white 0 0 4px","data-size":7,"font-size":7,"font-family":"Almendra SC"},"#burgIcons > #cities":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":1,"stroke":"#3e3e4b","stroke-width":0.24,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #cities":{"opacity":1,"fill":"#ffffff","size":2,"stroke":"#3e3e4b","stroke-width":1.2},"#burgLabels > #towns":{"opacity":1,"fill":"#3e3e4b","data-size":4,"font-size":4,"font-family":"Almendra SC"},"#burgIcons > #towns":{"opacity":1,"fill":"#ffffff","fill-opacity":0.7,"size":0.5,"stroke":"#3e3e4b","stroke-width":0.12,"stroke-dasharray":"","stroke-linecap":"butt"},"#anchors > #towns":{"opacity":1,"fill":"#ffffff","size":1,"stroke":"#3e3e4b","stroke-width":1.2},"#labels > #states":{"opacity":1,"fill":"#3e3e4b","stroke":"#3a3a3a","stroke-width":0,"text-shadow":"white 0 0 4px","data-size":22,"font-size":22,"font-family":"Almendra SC","filter":null},"#labels > #addedLabels":{"opacity":1,"fill":"#3e3e4b","stroke":"#3a3a3a","stroke-width":0,"text-shadow":"white 0 0 4px","data-size":18,"font-size":18,"font-family":"Almendra SC","filter":null},"#fogging":{"opacity":0.98,"fill":"#30426f","filter":null}}` -}; - -// apply default or custom style settings on load -function applyStyleOnLoad() { - const preset = localStorage.getItem("presetStyle"); - const style = preset && (defaultStyles[preset] || localStorage.getItem(preset)); - - if (preset && style && JSON.isValid(style)) { - applyStyle(JSON.parse(style)); - updateMapFilter(); - stylePreset.value = preset; - stylePreset.dataset.old = preset; - } else { - if (preset && preset !== "styleDefault" && ERROR) console.error(`Style preset ${preset} is not available in localStorage, applying default style`); - stylePreset.value = "styleDefault"; - stylePreset.dataset.old = preset; - applyDefaultStyle(); - } -} - -// set default style -function applyDefaultStyle() { - armies.attr("opacity", 1).attr("fill-opacity", 1).attr("font-size", 6).attr("box-size", 3).attr("stroke", "#000").attr("stroke-width", 0.3); - - biomes.attr("opacity", null).attr("filter", null).attr("mask", "url(#land)"); - ice.attr("opacity", 0.9).attr("fill", "#e8f0f6").attr("stroke", "#e8f0f6").attr("stroke-width", 1).attr("filter", "url(#dropShadow05)"); - stateBorders - .attr("opacity", 0.8) - .attr("stroke", "#56566d") - .attr("stroke-width", 1) - .attr("stroke-dasharray", "2") - .attr("stroke-linecap", "butt") - .attr("filter", null); - provinceBorders - .attr("opacity", 0.8) - .attr("stroke", "#56566d") - .attr("stroke-width", 0.5) - .attr("stroke-dasharray", "0 2") - .attr("stroke-linecap", "round") - .attr("filter", null); - cells.attr("opacity", null).attr("stroke", "#808080").attr("stroke-width", 0.1).attr("filter", null).attr("mask", null); - - gridOverlay - .attr("opacity", 0.8) - .attr("type", "pointyHex") - .attr("scale", 1) - .attr("dx", 0) - .attr("dy", 0) - .attr("stroke", "#777777") - .attr("stroke-width", 0.5) - .attr("stroke-dasharray", null) - .attr("filter", null) - .attr("mask", null); - coordinates - .attr("opacity", 1) - .attr("data-size", 12) - .attr("font-size", 12) - .attr("stroke", "#d4d4d4") - .attr("stroke-width", 1) - .attr("stroke-dasharray", 5) - .attr("filter", null) - .attr("mask", null); - compass.attr("opacity", 0.8).attr("transform", null).attr("filter", null).attr("mask", "url(#water)").attr("shape-rendering", "optimizespeed"); - if (!d3.select("#initial").size()) d3.select("#rose").attr("transform", "translate(80 80) scale(.25)"); - - relig.attr("opacity", 0.7).attr("stroke", "#777777").attr("stroke-width", 0).attr("filter", null); - cults.attr("opacity", 0.6).attr("stroke", "#777777").attr("stroke-width", 0.5).attr("filter", null); - landmass.attr("opacity", 1).attr("fill", "#eef6fb").attr("filter", null); - markers.attr("opacity", null).attr("rescale", 1).attr("filter", "url(#dropShadow01)"); - - prec.attr("opacity", null).attr("stroke", "#000000").attr("stroke-width", 0).attr("fill", "#003dff").attr("filter", null); - population.attr("opacity", null).attr("stroke-width", 1.6).attr("stroke-dasharray", null).attr("stroke-linecap", "butt").attr("filter", null); - population.select("#rural").attr("stroke", "#0000ff"); - population.select("#urban").attr("stroke", "#ff0000"); - - lakes.select("#freshwater").attr("opacity", 0.5).attr("fill", "#a6c1fd").attr("stroke", "#5f799d").attr("stroke-width", 0.7).attr("filter", null); - lakes.select("#salt").attr("opacity", 0.5).attr("fill", "#409b8a").attr("stroke", "#388985").attr("stroke-width", 0.7).attr("filter", null); - lakes.select("#sinkhole").attr("opacity", 1).attr("fill", "#5bc9fd").attr("stroke", "#53a3b0").attr("stroke-width", 0.7).attr("filter", null); - lakes.select("#frozen").attr("opacity", 0.95).attr("fill", "#cdd4e7").attr("stroke", "#cfe0eb").attr("stroke-width", 0).attr("filter", null); - lakes.select("#lava").attr("opacity", 0.7).attr("fill", "#90270d").attr("stroke", "#f93e0c").attr("stroke-width", 2).attr("filter", "url(#crumpled)"); - lakes.select("#dry").attr("opacity", 1).attr("fill", "#c9bfa7").attr("stroke", "#8e816f").attr("stroke-width", 0.7).attr("filter", null); - - coastline - .select("#sea_island") - .attr("opacity", 0.5) - .attr("stroke", "#1f3846") - .attr("stroke-width", 0.7) - .attr("auto-filter", 1) - .attr("filter", "url(#dropShadow)"); - coastline.select("#lake_island").attr("opacity", 1).attr("stroke", "#7c8eaf").attr("stroke-width", 0.35).attr("filter", null); - - terrain.attr("opacity", null).attr("set", "simple").attr("size", 1).attr("density", 0.4).attr("filter", null).attr("mask", null); - rivers.attr("opacity", null).attr("fill", "#5d97bb").attr("filter", null); - ruler.attr("opacity", null).attr("filter", null); - - roads - .attr("opacity", 0.9) - .attr("stroke", "#d06324") - .attr("stroke-width", 0.7) - .attr("stroke-dasharray", "2") - .attr("stroke-linecap", "butt") - .attr("filter", null) - .attr("mask", null); - trails - .attr("opacity", 0.9) - .attr("stroke", "#d06324") - .attr("stroke-width", 0.25) - .attr("stroke-dasharray", ".8 1.6") - .attr("stroke-linecap", "butt") - .attr("filter", null) - .attr("mask", null); - searoutes - .attr("opacity", 0.8) - .attr("stroke", "#ffffff") - .attr("stroke-width", 0.45) - .attr("stroke-dasharray", "1 2") - .attr("stroke-linecap", "round") - .attr("filter", null) - .attr("mask", null); - - statesBody.attr("opacity", 0.4).attr("filter", null); - statesHalo.attr("data-width", 10).attr("stroke-width", 10).attr("opacity", 0.4).attr("filter", "blur(5px)"); - - provs.attr("opacity", 0.7).attr("fill", "#000000").attr("font-family", "Georgia").attr("data-size", 10).attr("font-size", 10).attr("filter", null); - - temperature - .attr("opacity", null) - .attr("fill", "#000000") - .attr("stroke-width", 1.8) - .attr("fill-opacity", 0.3) - .attr("font-size", "8px") - .attr("stroke-dasharray", null) - .attr("filter", null) - .attr("mask", null); - texture.attr("opacity", null).attr("filter", null).attr("mask", "url(#land)"); - texture.select("#textureImage").attr("x", 0).attr("y", 0); - zones - .attr("opacity", 0.6) - .attr("stroke", "#333333") - .attr("stroke-width", 0) - .attr("stroke-dasharray", null) - .attr("stroke-linecap", "butt") - .attr("filter", null) - .attr("mask", null); - - // ocean and svg default style - svg.attr("background-color", "#000000").attr("data-filter", null).attr("filter", null); - oceanLayers.select("rect").attr("fill", "#466eab"); // old color #53679f - oceanLayers.attr("filter", null).attr("layers", "-6,-3,-1"); - svg.select("#oceanicPattern").attr("href", "./images/pattern1.png").attr("opacity", 0.2); - - // heightmap style - terrs - .attr("opacity", null) - .attr("filter", null) - .attr("mask", "url(#land)") - .attr("stroke", "none") - .attr("scheme", "bright") - .attr("terracing", 0) - .attr("skip", 5) - .attr("relax", 0) - .attr("curve", 0); - - // legend - legend - .attr("font-family", "Almendra SC") - .attr("font-size", 13) - .attr("data-size", 13) - .attr("data-x", 99) - .attr("data-y", 93) - .attr("data-columns", 8) - .attr("stroke-width", 2.5) - .attr("stroke", "#812929") - .attr("stroke-dasharray", "0 4 10 4") - .attr("stroke-linecap", "round"); - legend.select("#legendBox").attr("fill", "#ffffff").attr("fill-opacity", 0.8); - - const citiesSize = Math.max(rn(8 - regionsOutput.value / 20), 3); - burgLabels - .select("#cities") - .attr("fill", "#3e3e4b") - .attr("opacity", 1) - .style("text-shadow", "white 0 0 4px") - .attr("font-family", "Almendra SC") - .attr("font-size", citiesSize) - .attr("data-size", citiesSize); - burgIcons - .select("#cities") - .attr("opacity", 1) - .attr("size", 1) - .attr("stroke-width", 0.24) - .attr("fill", "#ffffff") - .attr("stroke", "#3e3e4b") - .attr("fill-opacity", 0.7) - .attr("stroke-dasharray", "") - .attr("stroke-linecap", "butt"); - anchors.select("#cities").attr("opacity", 1).attr("fill", "#ffffff").attr("stroke", "#3e3e4b").attr("stroke-width", 1.2).attr("size", 2); - - burgLabels - .select("#towns") - .attr("fill", "#3e3e4b") - .attr("opacity", 1) - .style("text-shadow", "white 0 0 4px") - .attr("font-family", "Almendra SC") - .attr("font-size", 3) - .attr("data-size", 4); - burgIcons - .select("#towns") - .attr("opacity", 1) - .attr("size", 0.5) - .attr("stroke-width", 0.12) - .attr("fill", "#ffffff") - .attr("stroke", "#3e3e4b") - .attr("fill-opacity", 0.7) - .attr("stroke-dasharray", "") - .attr("stroke-linecap", "butt"); - anchors.select("#towns").attr("opacity", 1).attr("fill", "#ffffff").attr("stroke", "#3e3e4b").attr("stroke-width", 1.2).attr("size", 1); - - const stateLabelSize = Math.max(rn(24 - regionsOutput.value / 6), 6); - labels - .select("#states") - .attr("fill", "#3e3e4b") - .attr("opacity", 1) - .attr("stroke", "#3a3a3a") - .attr("stroke-width", 0) - .style("text-shadow", "white 0 0 4px") - .attr("font-family", "Almendra SC") - .attr("font-size", stateLabelSize) - .attr("data-size", stateLabelSize) - .attr("filter", null); - labels - .select("#addedLabels") - .attr("fill", "#3e3e4b") - .attr("opacity", 1) - .attr("stroke", "#3a3a3a") - .attr("stroke-width", 0) - .style("text-shadow", "white 0 0 4px") - .attr("font-family", "Almendra SC") - .attr("font-size", 18) - .attr("data-size", 18) - .attr("filter", null); - - fogging.attr("opacity", 0.98).attr("fill", "#30426f"); - emblems.attr("opacity", 0.9).attr("stroke-width", 1).attr("filter", null); -} - -// apply style settings in JSON -function applyStyle(style) { - for (const selector in style) { - const el = document.querySelector(selector); - if (!el) continue; - for (const attribute in style[selector]) { - const value = style[selector][attribute]; - - if (value === "null" || value === null) { - el.removeAttribute(attribute); - continue; - } - - if (attribute === "text-shadow") { - el.style[attribute] = value; - } else { - el.setAttribute(attribute, value); - } - } - } -} - -// change current style preset to another saved one -function changeStylePreset(preset) { - if (customization) return tip("Please exit the customization mode first", false, "error"); - - if (sessionStorage.getItem("styleChangeWarningShown")) { - changeStyle(); - } else { - sessionStorage.setItem("styleChangeWarningShown", true); - alertMessage.innerHTML = "Are you sure you want to change the style preset? All unsaved style changes will be lost"; - $("#alert").dialog({ - resizable: false, - title: "Change style preset", - width: "23em", - buttons: { - Change: function () { - changeStyle(); - $(this).dialog("close"); - }, - Cancel: function () { - stylePreset.value = stylePreset.dataset.old; - $(this).dialog("close"); - } - } - }); - } - - function changeStyle() { - const customPreset = localStorage.getItem(preset); - if (customPreset) { - if (JSON.isValid(customPreset)) applyStyle(JSON.parse(customPreset)); - else { - tip("Cannot parse stored style JSON. Default style applied", false, "error", 5000); - applyDefaultStyle(); - } - } else if (defaultStyles[preset]) { - const style = defaultStyles[preset]; - if (JSON.isValid(style)) applyStyle(JSON.parse(style)); - else tip("Cannot parse style JSON", false, "error", 5000); - } else applyDefaultStyle(); - - removeStyleButton.style.display = stylePreset.selectedOptions[0].dataset.system ? "none" : "inline-block"; - updateElements(); // change elements - selectStyleElement(); // re-select element to trigger values update - updateMapFilter(); - localStorage.setItem("presetStyle", preset); // save preset to use it onload - stylePreset.dataset.old = stylePreset.value; // save current value - } -} - function updateElements() { // burgIcons to desired size - burgIcons.selectAll("g").each(function (d) { + burgIcons.selectAll("g").each(function () { const size = +this.getAttribute("size"); d3.select(this) .selectAll("circle") @@ -1120,175 +795,6 @@ function updateElements() { invokeActiveZooming(); } -function addStylePreset() { - $("#styleSaver").dialog({ - title: "Style Saver", - width: "26em", - position: {my: "center", at: "center", of: "svg"} - }); - - const currentPreset = document.getElementById("stylePreset").selectedOptions[0]; - const styleName = currentPreset ? currentPreset.text : "custom"; - document.getElementById("styleSaverName").value = styleName; - styleSaverJSON.value = JSON.stringify(getStyle(), null, 2); - checkName(); - - if (modules.saveStyle) return; - modules.saveStyle = true; - - // add listeners - document.getElementById("styleSaverName").addEventListener("input", checkName); - document.getElementById("styleSaverSave").addEventListener("click", saveStyle); - document.getElementById("styleSaverDownload").addEventListener("click", styleDownload); - document.getElementById("styleSaverLoad").addEventListener("click", () => styleToLoad.click()); - document.getElementById("styleToLoad").addEventListener("change", function () { - uploadFile(this, styleUpload); - }); - - function getStyle() { - const style = {}; - const attributes = { - "#map": ["background-color", "filter", "data-filter"], - "#armies": ["font-size", "box-size", "stroke", "stroke-width", "fill-opacity", "filter"], - "#biomes": ["opacity", "filter", "mask"], - "#stateBorders": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], - "#provinceBorders": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], - "#cells": ["opacity", "stroke", "stroke-width", "filter", "mask"], - "#gridOverlay": ["opacity", "scale", "dx", "dy", "type", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "transform", "filter", "mask"], - "#coordinates": ["opacity", "data-size", "font-size", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], - "#compass": ["opacity", "transform", "filter", "mask", "shape-rendering"], - "#rose": ["transform"], - "#relig": ["opacity", "stroke", "stroke-width", "filter"], - "#cults": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], - "#landmass": ["opacity", "fill", "filter"], - "#markers": ["opacity", "rescale", "filter"], - "#prec": ["opacity", "stroke", "stroke-width", "fill", "filter"], - "#population": ["opacity", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], - "#rural": ["stroke"], - "#urban": ["stroke"], - "#freshwater": ["opacity", "fill", "stroke", "stroke-width", "filter"], - "#salt": ["opacity", "fill", "stroke", "stroke-width", "filter"], - "#sinkhole": ["opacity", "fill", "stroke", "stroke-width", "filter"], - "#frozen": ["opacity", "fill", "stroke", "stroke-width", "filter"], - "#lava": ["opacity", "fill", "stroke", "stroke-width", "filter"], - "#dry": ["opacity", "fill", "stroke", "stroke-width", "filter"], - "#sea_island": ["opacity", "stroke", "stroke-width", "filter", "auto-filter"], - "#lake_island": ["opacity", "stroke", "stroke-width", "filter"], - "#terrain": ["opacity", "set", "size", "density", "filter", "mask"], - "#rivers": ["opacity", "filter", "fill"], - "#ruler": ["opacity", "filter"], - "#roads": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], - "#trails": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], - "#searoutes": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], - "#statesBody": ["opacity", "filter"], - "#statesHalo": ["opacity", "data-width", "stroke-width", "filter"], - "#provs": ["opacity", "fill", "font-size", "font-family", "filter"], - "#temperature": ["opacity", "font-size", "fill", "fill-opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], - "#ice": ["opacity", "fill", "stroke", "stroke-width", "filter"], - "#emblems": ["opacity", "stroke-width", "filter"], - "#texture": ["opacity", "filter", "mask"], - "#textureImage": ["x", "y"], - "#zones": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], - "#oceanLayers": ["filter", "layers"], - "#oceanBase": ["fill"], - "#oceanicPattern": ["href", "opacity"], - "#terrs": ["opacity", "scheme", "terracing", "skip", "relax", "curve", "filter", "mask"], - "#legend": ["data-size", "font-size", "font-family", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "data-x", "data-y", "data-columns"], - "#legendBox": ["fill", "fill-opacity"], - "#burgLabels > #cities": ["opacity", "fill", "text-shadow", "data-size", "font-size", "font-family"], - "#burgIcons > #cities": ["opacity", "fill", "fill-opacity", "size", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap"], - "#anchors > #cities": ["opacity", "fill", "size", "stroke", "stroke-width"], - "#burgLabels > #towns": ["opacity", "fill", "text-shadow", "data-size", "font-size", "font-family"], - "#burgIcons > #towns": ["opacity", "fill", "fill-opacity", "size", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap"], - "#anchors > #towns": ["opacity", "fill", "size", "stroke", "stroke-width"], - "#labels > #states": ["opacity", "fill", "stroke", "stroke-width", "text-shadow", "data-size", "font-size", "font-family", "filter"], - "#labels > #addedLabels": ["opacity", "fill", "stroke", "stroke-width", "text-shadow", "data-size", "font-size", "font-family", "filter"], - "#fogging": ["opacity", "fill", "filter"] - }; - - for (const selector in attributes) { - const el = document.querySelector(selector); - if (!el) continue; - - style[selector] = {}; - for (const attr of attributes[selector]) { - let value = el.style[attr] || el.getAttribute(attr); - if (attr === "font-size" && el.hasAttribute("data-size")) value = el.getAttribute("data-size"); - style[selector][attr] = parseValue(value); - } - } - - function parseValue(value) { - if (value === "null" || value === null) return null; - if (value === "") return ""; - if (!isNaN(+value)) return +value; - return value; - } - - return style; - } - - function checkName() { - let tip = ""; - const v = "style" + styleSaverName.value; - const listed = Array.from(stylePreset.options).some(o => o.value == v); - const stored = localStorage.getItem(v); - if (!stored && listed) tip = "default"; - else if (stored) tip = "existing"; - else if (styleSaverName.value) tip = "new"; - styleSaverTip.innerHTML = tip; - } - - function saveStyle() { - if (!styleSaverJSON.value) return tip("Please provide a style JSON", false, "error"); - if (!JSON.isValid(styleSaverJSON.value)) return tip("JSON string is not valid, please check the format", false, "error"); - if (!styleSaverName.value) return tip("Please provide a preset name", false, "error"); - if (styleSaverTip.innerHTML === "default") return tip("You cannot overwrite default preset, please change the name", false, "error"); - - const preset = "style" + styleSaverName.value; - applyOption(stylePreset, preset, styleSaverName.value); // add option - localStorage.setItem("presetStyle", preset); // mark preset as default - localStorage.setItem(preset, styleSaverJSON.value); // save preset - - applyStyle(JSON.parse(styleSaverJSON.value)); - updateMapFilter(); - invokeActiveZooming(); - - $("#styleSaver").dialog("close"); - removeStyleButton.style.display = "inline-block"; - tip("Style preset is saved", false, "success", 4000); - } - - function styleDownload() { - if (!styleSaverJSON.value) return tip("Please provide a style JSON", false, "error"); - if (!JSON.isValid(styleSaverJSON.value)) return tip("JSON string is not valid, please check the format", false, "error"); - if (!styleSaverName.value) return tip("Please provide a preset name", false, "error"); - - const data = styleSaverJSON.value; - if (!data) return tip("Please provide a style JSON", false, "error"); - downloadFile(data, "style" + styleSaverName.value + ".json", "application/json"); - } - - function styleUpload(dataLoaded) { - if (!dataLoaded) return tip("Cannot load the file. Please check the data format", false, "error"); - const data = JSON.stringify(JSON.parse(dataLoaded), null, 2); - styleSaverJSON.value = data; - } -} - -function removeStylePreset() { - if (stylePreset.selectedOptions[0].dataset.system) return tip("Cannot remove system preset", false, "error"); - - localStorage.removeItem("presetStyle"); - localStorage.removeItem(stylePreset.value); - stylePreset.selectedOptions[0].remove(); - removeStyleButton.style.display = "none"; - - applyDefaultStyle(); - updateMapFilter(); - invokeActiveZooming(); -} - // GLOBAL FILTERS mapFilters.addEventListener("click", applyMapFilter); function applyMapFilter(event) { @@ -1301,10 +807,3 @@ function applyMapFilter(event) { button.classList.add("pressed"); svg.attr("data-filter", button.id).attr("filter", "url(#filter-" + button.id + ")"); } - -function updateMapFilter() { - const filter = svg.attr("data-filter"); - mapFilters.querySelectorAll(".pressed").forEach(button => button.classList.remove("pressed")); - if (!filter) return; - mapFilters.querySelector("#" + filter).classList.add("pressed"); -} diff --git a/modules/ui/stylePresets.js b/modules/ui/stylePresets.js new file mode 100644 index 00000000..dc87d647 --- /dev/null +++ b/modules/ui/stylePresets.js @@ -0,0 +1,295 @@ +// UI module to control the style presets +"use strict"; + +const defaultStyles = ["default", "ancient", "gloom", "clean", "light", "watercolor", "cyberpunk", "monochrome"]; + +// add styles to list +{ + const defaultOptions = defaultStyles.map(styleName => ``); + const storedStyles = Object.keys(localStorage).filter(key => key.startsWith("fmgStyle")); + const customOptions = storedStyles.map(styleName => ``); + const options = defaultOptions.join("") + customOptions.join(""); + document.getElementById("stylePreset").innerHTML = options; +} + +async function applyStyleOnLoad() { + let preset = localStorage.getItem("presetStyle") || "default"; + let style = {}; + + const isCustom = !defaultStyles.includes(preset); + if (isCustom) { + const storedStyleJSON = localStorage.getItem(preset); + if (!storedStyleJSON) { + console.error(`Custom style ${preset} in not found in localStorage. Appliying default style`); + preset = "default"; + } else { + const isValid = JSON.isValid(storedStyleJSON); + if (isValid) { + style = JSON.parse(storedStyleJSON); + } else { + console.error(`Custom style ${preset} stored in localStorage is not valid. Appliying default style`); + preset = "default"; + } + } + } else { + const defaultStyle = await fetch(`/styles/${preset}.json`) + .then(res => res.json()) + .catch(err => { + console.error("Error on loading style", preset, err); + return {}; + }); + style = defaultStyle; + } + + applyStyle(style); + updateMapFilter(); + stylePreset.value = stylePreset.dataset.old = preset; +} + +function applyStyle(style) { + for (const selector in style) { + const el = document.querySelector(selector); + if (!el) continue; + for (const attribute in style[selector]) { + const value = style[selector][attribute]; + + if (value === "null" || value === null) { + el.removeAttribute(attribute); + continue; + } + + if (attribute === "text-shadow") { + el.style[attribute] = value; + } else { + el.setAttribute(attribute, value); + } + } + } +} + +// change current style preset to another saved one +function changeStylePreset(preset) { + if (customization) return tip("Please exit the customization mode first", false, "error"); + + if (sessionStorage.getItem("styleChangeWarningShown")) { + changeStyle(); + } else { + sessionStorage.setItem("styleChangeWarningShown", true); + alertMessage.innerHTML = "Are you sure you want to change the style preset? All unsaved style changes will be lost"; + $("#alert").dialog({ + resizable: false, + title: "Change style preset", + width: "23em", + buttons: { + Change: function () { + changeStyle(); + $(this).dialog("close"); + }, + Cancel: function () { + stylePreset.value = stylePreset.dataset.old; + $(this).dialog("close"); + } + } + }); + } + + function changeStyle() { + const customPreset = localStorage.getItem(preset); + if (customPreset) { + if (JSON.isValid(customPreset)) applyStyle(JSON.parse(customPreset)); + else { + tip("Cannot parse stored style JSON. Default style applied", false, "error", 5000); + applyDefaultStyle(); + } + } else if (defaultStyles[preset]) { + const style = defaultStyles[preset]; + if (JSON.isValid(style)) applyStyle(JSON.parse(style)); + else tip("Cannot parse style JSON", false, "error", 5000); + } else applyDefaultStyle(); + + const isDefault = defaultStyles.includes(stylePreset.value); + removeStyleButton.style.display = isDefault ? "none" : "inline-block"; + updateElements(); // change elements + selectStyleElement(); // re-select element to trigger values update + updateMapFilter(); + localStorage.setItem("presetStyle", preset); // save preset to use it onload + stylePreset.dataset.old = stylePreset.value; // save current value + } +} + +function addStylePreset() { + $("#styleSaver").dialog({ + title: "Style Saver", + width: "26em", + position: {my: "center", at: "center", of: "svg"} + }); + + const currentPreset = document.getElementById("stylePreset").selectedOptions[0]; + const styleName = currentPreset ? currentPreset.text : "custom"; + document.getElementById("styleSaverName").value = styleName; + styleSaverJSON.value = JSON.stringify(getStyle(), null, 2); + checkName(); + + if (modules.saveStyle) return; + modules.saveStyle = true; + + // add listeners + document.getElementById("styleSaverName").addEventListener("input", checkName); + document.getElementById("styleSaverSave").addEventListener("click", saveStyle); + document.getElementById("styleSaverDownload").addEventListener("click", styleDownload); + document.getElementById("styleSaverLoad").addEventListener("click", () => styleToLoad.click()); + document.getElementById("styleToLoad").addEventListener("change", function () { + uploadFile(this, styleUpload); + }); + + function getStyle() { + const style = {}; + const attributes = { + "#map": ["background-color", "filter", "data-filter"], + "#armies": ["font-size", "box-size", "stroke", "stroke-width", "fill-opacity", "filter"], + "#biomes": ["opacity", "filter", "mask"], + "#stateBorders": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], + "#provinceBorders": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], + "#cells": ["opacity", "stroke", "stroke-width", "filter", "mask"], + "#gridOverlay": ["opacity", "scale", "dx", "dy", "type", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "transform", "filter", "mask"], + "#coordinates": ["opacity", "data-size", "font-size", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], + "#compass": ["opacity", "transform", "filter", "mask", "shape-rendering"], + "#rose": ["transform"], + "#relig": ["opacity", "stroke", "stroke-width", "filter"], + "#cults": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], + "#landmass": ["opacity", "fill", "filter"], + "#markers": ["opacity", "rescale", "filter"], + "#prec": ["opacity", "stroke", "stroke-width", "fill", "filter"], + "#population": ["opacity", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], + "#rural": ["stroke"], + "#urban": ["stroke"], + "#freshwater": ["opacity", "fill", "stroke", "stroke-width", "filter"], + "#salt": ["opacity", "fill", "stroke", "stroke-width", "filter"], + "#sinkhole": ["opacity", "fill", "stroke", "stroke-width", "filter"], + "#frozen": ["opacity", "fill", "stroke", "stroke-width", "filter"], + "#lava": ["opacity", "fill", "stroke", "stroke-width", "filter"], + "#dry": ["opacity", "fill", "stroke", "stroke-width", "filter"], + "#sea_island": ["opacity", "stroke", "stroke-width", "filter", "auto-filter"], + "#lake_island": ["opacity", "stroke", "stroke-width", "filter"], + "#terrain": ["opacity", "set", "size", "density", "filter", "mask"], + "#rivers": ["opacity", "filter", "fill"], + "#ruler": ["opacity", "filter"], + "#roads": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], + "#trails": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], + "#searoutes": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], + "#statesBody": ["opacity", "filter"], + "#statesHalo": ["opacity", "data-width", "stroke-width", "filter"], + "#provs": ["opacity", "fill", "font-size", "font-family", "filter"], + "#temperature": ["opacity", "font-size", "fill", "fill-opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter"], + "#ice": ["opacity", "fill", "stroke", "stroke-width", "filter"], + "#emblems": ["opacity", "stroke-width", "filter"], + "#texture": ["opacity", "filter", "mask"], + "#textureImage": ["x", "y"], + "#zones": ["opacity", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "filter", "mask"], + "#oceanLayers": ["filter", "layers"], + "#oceanBase": ["fill"], + "#oceanicPattern": ["href", "opacity"], + "#terrs": ["opacity", "scheme", "terracing", "skip", "relax", "curve", "filter", "mask"], + "#legend": ["data-size", "font-size", "font-family", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap", "data-x", "data-y", "data-columns"], + "#legendBox": ["fill", "fill-opacity"], + "#burgLabels > #cities": ["opacity", "fill", "text-shadow", "data-size", "font-size", "font-family"], + "#burgIcons > #cities": ["opacity", "fill", "fill-opacity", "size", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap"], + "#anchors > #cities": ["opacity", "fill", "size", "stroke", "stroke-width"], + "#burgLabels > #towns": ["opacity", "fill", "text-shadow", "data-size", "font-size", "font-family"], + "#burgIcons > #towns": ["opacity", "fill", "fill-opacity", "size", "stroke", "stroke-width", "stroke-dasharray", "stroke-linecap"], + "#anchors > #towns": ["opacity", "fill", "size", "stroke", "stroke-width"], + "#labels > #states": ["opacity", "fill", "stroke", "stroke-width", "text-shadow", "data-size", "font-size", "font-family", "filter"], + "#labels > #addedLabels": ["opacity", "fill", "stroke", "stroke-width", "text-shadow", "data-size", "font-size", "font-family", "filter"], + "#fogging": ["opacity", "fill", "filter"] + }; + + for (const selector in attributes) { + const el = document.querySelector(selector); + if (!el) continue; + + style[selector] = {}; + for (const attr of attributes[selector]) { + let value = el.style[attr] || el.getAttribute(attr); + if (attr === "font-size" && el.hasAttribute("data-size")) value = el.getAttribute("data-size"); + style[selector][attr] = parseValue(value); + } + } + + function parseValue(value) { + if (value === "null" || value === null) return null; + if (value === "") return ""; + if (!isNaN(+value)) return +value; + return value; + } + + return style; + } + + function checkName() { + let tip = ""; + const v = "style" + styleSaverName.value; + const listed = Array.from(stylePreset.options).some(o => o.value == v); + const stored = localStorage.getItem(v); + if (!stored && listed) tip = "default"; + else if (stored) tip = "existing"; + else if (styleSaverName.value) tip = "new"; + styleSaverTip.innerHTML = tip; + } + + function saveStyle() { + if (!styleSaverJSON.value) return tip("Please provide a style JSON", false, "error"); + if (!JSON.isValid(styleSaverJSON.value)) return tip("JSON string is not valid, please check the format", false, "error"); + if (!styleSaverName.value) return tip("Please provide a preset name", false, "error"); + if (styleSaverTip.innerHTML === "default") return tip("You cannot overwrite default preset, please change the name", false, "error"); + + const preset = "style" + styleSaverName.value; + applyOption(stylePreset, preset, styleSaverName.value); // add option + localStorage.setItem("presetStyle", preset); // mark preset as default + localStorage.setItem(preset, styleSaverJSON.value); // save preset + + applyStyle(JSON.parse(styleSaverJSON.value)); + updateMapFilter(); + invokeActiveZooming(); + + $("#styleSaver").dialog("close"); + removeStyleButton.style.display = "inline-block"; + tip("Style preset is saved", false, "success", 4000); + } + + function styleDownload() { + if (!styleSaverJSON.value) return tip("Please provide a style JSON", false, "error"); + if (!JSON.isValid(styleSaverJSON.value)) return tip("JSON string is not valid, please check the format", false, "error"); + if (!styleSaverName.value) return tip("Please provide a preset name", false, "error"); + + const data = styleSaverJSON.value; + if (!data) return tip("Please provide a style JSON", false, "error"); + downloadFile(data, "style" + styleSaverName.value + ".json", "application/json"); + } + + function styleUpload(dataLoaded) { + if (!dataLoaded) return tip("Cannot load the file. Please check the data format", false, "error"); + const data = JSON.stringify(JSON.parse(dataLoaded), null, 2); + styleSaverJSON.value = data; + } +} + +function removeStylePreset() { + const isDefault = defaultStyles.includes(stylePreset.value); + if (isDefault) return tip("Cannot remove system preset", false, "error"); + + localStorage.removeItem("presetStyle"); + localStorage.removeItem(stylePreset.value); + stylePreset.selectedOptions[0].remove(); + removeStyleButton.style.display = "none"; + + applyDefaultStyle(); + updateMapFilter(); + invokeActiveZooming(); +} + +function updateMapFilter() { + const filter = svg.attr("data-filter"); + mapFilters.querySelectorAll(".pressed").forEach(button => button.classList.remove("pressed")); + if (!filter) return; + mapFilters.querySelector("#" + filter).classList.add("pressed"); +} diff --git a/styles/ancient.json b/styles/ancient.json new file mode 100644 index 00000000..09704553 --- /dev/null +++ b/styles/ancient.json @@ -0,0 +1,389 @@ +{ + "#map": { + "background-color": "#000000", + "filter": null, + "data-filter": null + }, + "#armies": { + "font-size": 8, + "box-size": 4, + "stroke": "#000", + "stroke-width": 0.2, + "fill-opacity": 1, + "filter": null + }, + "#biomes": { + "opacity": null, + "filter": null, + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 0.8, + "stroke": "#56566d", + "stroke-width": 1, + "stroke-dasharray": 2, + "stroke-linecap": "butt", + "filter": null + }, + "#provinceBorders": { + "opacity": 0.8, + "stroke": "#56566d", + "stroke-width": 0.2, + "stroke-dasharray": 1, + "stroke-linecap": "butt", + "filter": null + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.1, + "filter": null, + "mask": null + }, + "#gridOverlay": { + "opacity": 0.8, + "scale": 1, + "dx": 0, + "dy": 0, + "type": "pointyHex", + "stroke": "#808080", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 1, + "data-size": 12, + "font-size": 12, + "stroke": "#d4d4d4", + "stroke-width": 1, + "stroke-dasharray": 5, + "stroke-linecap": null, + "filter": null, + "mask": null + }, + "#compass": { + "opacity": 0.5, + "transform": null, + "filter": "url(#filter-sepia)", + "mask": "url(#water)", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": "translate(80 80) scale(.25)" + }, + "#relig": { + "opacity": 0.7, + "stroke": "#404040", + "stroke-width": 0.7, + "filter": null + }, + "#cults": { + "opacity": 0.6, + "stroke": "#777777", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#landmass": { + "opacity": 1, + "fill": "#e3dfce", + "filter": null + }, + "#markers": { + "opacity": null, + "rescale": 1, + "filter": "" + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0.1, + "fill": "#003dff", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 1.6, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null + }, + "#rural": { + "stroke": "#0000ff" + }, + "#urban": { + "stroke": "#ff0000" + }, + "#freshwater": { + "opacity": 0.6, + "fill": "#c8d6e0", + "stroke": "#968d6e", + "stroke-width": 0.7, + "filter": null + }, + "#salt": { + "opacity": 0.5, + "fill": "#339482", + "stroke": "#836a34", + "stroke-width": 0.7, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#c3d6df", + "stroke": "#b29062", + "stroke-width": 0.7, + "filter": null + }, + "#frozen": { + "opacity": 0.95, + "fill": "#cdd4e7", + "stroke": "#cfe0eb", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 0.7, + "fill": "#a04e18", + "stroke": "#835520", + "stroke-width": 2, + "filter": "url(#paper)" + }, + "#dry": { + "opacity": 0.7, + "fill": "#c6b795", + "stroke": "#8e816f", + "stroke-width": 0.7, + "filter": null + }, + "#sea_island": { + "opacity": 0.5, + "stroke": "#1f3846", + "stroke-width": 0.7, + "filter": "url(#dropShadow)", + "auto-filter": 1 + }, + "#lake_island": { + "opacity": 1, + "stroke": "#7c8eaf", + "stroke-width": 0.35, + "filter": null + }, + "#terrain": { + "opacity": 1, + "set": "simple", + "size": 1, + "density": 0.4, + "filter": null, + "mask": null + }, + "#rivers": { + "opacity": null, + "filter": "", + "fill": "#a69b7d" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 0.7, + "stroke": "#8d502a", + "stroke-width": 1, + "stroke-dasharray": 3, + "stroke-linecap": "inherit", + "filter": "", + "mask": null + }, + "#trails": { + "opacity": 0.7, + "stroke": "#924217", + "stroke-width": 0.5, + "stroke-dasharray": "1 2", + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.8, + "stroke": "#b16925", + "stroke-width": 0.8, + "stroke-dasharray": "1 2", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#statesBody": { + "opacity": 0.2, + "filter": "url(#filter-sepia)" + }, + "#statesHalo": { + "opacity": 0.4, + "data-width": 10, + "stroke-width": 10, + "filter": "blur(6px)" + }, + "#provs": { + "opacity": 0.7, + "fill": "#000000", + "font-size": 10, + "font-family": "Georgia", + "filter": null + }, + "#temperature": { + "opacity": null, + "font-size": "8px", + "fill": "#000000", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 1.8, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.35, + "fill": "#e8f0f6", + "stroke": "#e8f0f6", + "stroke-width": 3, + "filter": "url(#dropShadow05)" + }, + "#emblems": { + "opacity": 0.8, + "stroke-width": 0.8, + "filter": "url(#dropShadow05)" + }, + "#texture": { + "opacity": 0.6, + "filter": "", + "mask": "" + }, + "#textureImage": { + "x": 0, + "y": 0 + }, + "#zones": { + "opacity": 0.6, + "stroke": "#333333", + "stroke-width": 0, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#oceanLayers": { + "filter": "", + "layers": "-6,-4,-2" + }, + "#oceanBase": { + "fill": "#c99f64" + }, + "#oceanicPattern": { + "href": "./images/kiwiroo.png", + "opacity": 0.4 + }, + "#terrs": { + "opacity": null, + "scheme": "bright", + "terracing": 0, + "skip": 2, + "relax": 1, + "curve": 0, + "filter": "url(#blur3)", + "mask": "url(#land)" + }, + "#legend": { + "data-size": 13, + "font-size": 13, + "font-family": "Almendra SC", + "stroke": "#812929", + "stroke-width": 2.5, + "stroke-dasharray": "0 4 10 4", + "stroke-linecap": "round", + "data-x": 99, + "data-y": 93, + "data-columns": 8 + }, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0px 0px 4px", + "data-size": 12, + "font-size": 12, + "font-family": "Great Vibes" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#fdfab9", + "fill-opacity": 0.7, + "size": 1, + "stroke": "#6f4e1f", + "stroke-width": 0.3, + "stroke-dasharray": ".3 .4", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 1, + "fill": "#ffffff", + "size": 2, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0px 0px 4px", + "data-size": 5, + "font-size": 5, + "font-family": "Great Vibes" + }, + "#burgIcons > #towns": { + "opacity": 1, + "fill": "#fef4d8", + "fill-opacity": 0.7, + "size": 0.5, + "stroke": "#72472c", + "stroke-width": 0.12, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0px 0px 4px", + "data-size": 22, + "font-size": 22, + "font-family": "Great Vibes", + "filter": "url(#filter-sepia)" + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0px 0px 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Times New Roman", + "filter": "url(#filter-sepia)" + }, + "#fogging": { + "opacity": 0.98, + "fill": "#30426f", + "filter": null + } +} diff --git a/styles/clean.json b/styles/clean.json new file mode 100644 index 00000000..fd00c5ad --- /dev/null +++ b/styles/clean.json @@ -0,0 +1,388 @@ +{ + "#map": { + "background-color": "#000000", + "filter": null, + "data-filter": null + }, + "#armies": { + "font-size": 6, + "box-size": 3, + "stroke": "#000", + "stroke-width": 0, + "opacity": 1, + "fill-opacity": 1, + "filter": null + }, + "#biomes": { + "opacity": 0.5, + "filter": "url(#blur7)", + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 0.8, + "stroke": "#414141", + "stroke-width": 0.7, + "stroke-dasharray": 0, + "stroke-linecap": "butt", + "filter": null + }, + "#provinceBorders": { + "opacity": 0.8, + "stroke": "#414141", + "stroke-width": 0.45, + "stroke-dasharray": 1, + "stroke-linecap": "butt", + "filter": null + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.09, + "filter": null, + "mask": "url(#land)" + }, + "#gridOverlay": { + "opacity": 0.8, + "scale": 1, + "dx": 0, + "dy": "0", + "type": "pointyHex", + "stroke": "#808080", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 1, + "data-size": 12, + "font-size": 12, + "stroke": "#414141", + "stroke-width": 0.45, + "stroke-dasharray": 3, + "stroke-linecap": null, + "filter": null, + "mask": null + }, + "#compass": { + "opacity": 0.8, + "transform": null, + "filter": null, + "mask": "url(#water)", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": null + }, + "#relig": { + "opacity": 0.7, + "stroke": "#404040", + "stroke-width": 0.7, + "filter": null + }, + "#cults": { + "opacity": 0.6, + "stroke": "#777777", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#landmass": { + "opacity": 1, + "fill": "#eeedeb", + "filter": null + }, + "#markers": { + "opacity": null, + "rescale": null, + "filter": "url(#dropShadow01)" + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0, + "fill": "#0080ff", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 2.58, + "stroke-dasharray": 0, + "stroke-linecap": "butt", + "filter": "url(#blur3)" + }, + "#rural": { + "stroke": "#ff0000" + }, + "#urban": { + "stroke": "#800000" + }, + "#freshwater": { + "opacity": 0.5, + "fill": "#aadaff", + "stroke": "#5f799d", + "stroke-width": 0, + "filter": null + }, + "#salt": { + "opacity": 0.5, + "fill": "#409b8a", + "stroke": "#388985", + "stroke-width": 0.7, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#5bc9fd", + "stroke": "#53a3b0", + "stroke-width": 0.7, + "filter": null + }, + "#frozen": { + "opacity": 0.95, + "fill": "#cdd4e7", + "stroke": "#cfe0eb", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 0.7, + "fill": "#90270d", + "stroke": "#f93e0c", + "stroke-width": 2, + "filter": "url(#crumpled)" + }, + "#dry": { + "opacity": 0.7, + "fill": "#c9bfa7", + "stroke": "#8e816f", + "stroke-width": 0.7, + "filter": null + }, + "#sea_island": { + "opacity": 0.6, + "stroke": "#595959", + "stroke-width": 0.4, + "filter": null, + "auto-filter": 0 + }, + "#lake_island": { + "opacity": 0, + "stroke": "#7c8eaf", + "stroke-width": 0, + "filter": null + }, + "#terrain": { + "opacity": 1, + "set": "simple", + "size": 1, + "density": 0.4, + "filter": null, + "mask": null + }, + "#rivers": { + "opacity": null, + "filter": null, + "fill": "#aadaff" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 0.9, + "stroke": "#f6d068", + "stroke-width": 0.7, + "stroke-dasharray": 0, + "stroke-linecap": "inherit", + "filter": null, + "mask": null + }, + "#trails": { + "opacity": 1, + "stroke": "#ffffff", + "stroke-width": 0.25, + "stroke-dasharray": "", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.8, + "stroke": "#4f82c6", + "stroke-width": 0.45, + "stroke-dasharray": 2, + "stroke-linecap": "butt", + "filter": null, + "mask": "url(#water)" + }, + "#statesBody": { + "opacity": 0.3, + "filter": null + }, + "#statesHalo": { + "opacity": 0.5, + "data-width": 1, + "stroke-width": 1, + "filter": null + }, + "#provs": { + "opacity": 0.7, + "fill": "#000000", + "data-size": 10, + "font-size": 10, + "font-family": "Georgia", + "filter": null + }, + "#temperature": { + "opacity": null, + "font-size": "8px", + "fill": "#000000", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 1.8, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.9, + "fill": "#e8f0f6", + "stroke": "#e8f0f6", + "stroke-width": 1, + "filter": "url(#dropShadow01)" + }, + "#emblems": { + "opacity": 1, + "stroke-width": 1, + "filter": null + }, + "#texture": { + "opacity": null, + "filter": null, + "mask": "url(#land)" + }, + "#textureImage": {}, + "#zones": { + "opacity": 0.7, + "stroke": "#ff6262", + "stroke-width": 0, + "stroke-dasharray": "", + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#oceanLayers": { + "filter": null, + "layers": "none" + }, + "#oceanBase": { + "fill": "#aadaff" + }, + "#oceanicPattern": { + "href": "", + "opacity": 0.2 + }, + "#terrs": { + "opacity": 0.5, + "scheme": "bright", + "terracing": 0, + "skip": 5, + "relax": 0, + "curve": 0, + "filter": null, + "mask": "url(#land)" + }, + "#legend": { + "data-size": 12.74, + "font-size": 12.74, + "font-family": "Arial", + "stroke": "#909090", + "stroke-width": 1.13, + "stroke-dasharray": 0, + "stroke-linecap": "round", + "data-x": 98.39, + "data-y": 12.67, + "data-columns": null + }, + "#legendBox": {}, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#414141", + "text-shadow": "white 0 0 4px", + "data-size": 7, + "font-size": 7, + "font-family": "Arial" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 0.24, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 1, + "fill": "#ffffff", + "size": 2, + "stroke": "#303030", + "stroke-width": 1.7 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#414141", + "data-size": 3, + "font-size": 3, + "font-family": "Arial" + }, + "#burgIcons > #towns": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 0.5, + "stroke": "#3e3e4b", + "stroke-width": 0.12, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 1.06 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#292929", + "stroke": "#303030", + "stroke-width": 0, + "text-shadow": "white 0 0 2px", + "data-size": 10, + "font-size": 10, + "font-family": "Arial", + "filter": null + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#414141", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0 0 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Arial", + "filter": null + }, + "#fogging": { + "opacity": 1, + "fill": "#ffffff", + "filter": null + } +} diff --git a/styles/cyberpunk.json b/styles/cyberpunk.json new file mode 100644 index 00000000..579d093b --- /dev/null +++ b/styles/cyberpunk.json @@ -0,0 +1,385 @@ +{ + "#map": { + "background-color": "#000000", + "filter": null, + "data-filter": null + }, + "#armies": { + "font-size": 8, + "box-size": 4, + "stroke": "#000000", + "stroke-width": 0.6, + "fill-opacity": 1, + "filter": null + }, + "#biomes": { + "opacity": 0.7, + "filter": "", + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 1, + "stroke": "#ffffff", + "stroke-width": 1, + "stroke-dasharray": 3, + "stroke-linecap": "round", + "filter": "" + }, + "#provinceBorders": { + "opacity": 0.5, + "stroke": "#ffffff", + "stroke-width": 0.3, + "stroke-dasharray": 1, + "stroke-linecap": "round", + "filter": "" + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.1, + "filter": null, + "mask": null + }, + "#gridOverlay": { + "opacity": 0.8, + "scale": 1, + "dx": 0, + "dy": 0, + "type": "pointyHex", + "stroke": "#808080", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 1, + "data-size": 14, + "font-size": 14, + "stroke": "#4a4a4a", + "stroke-width": 1, + "stroke-dasharray": 6, + "stroke-linecap": null, + "filter": null, + "mask": null + }, + "#compass": { + "opacity": 0.9, + "transform": null, + "filter": null, + "mask": "", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": null + }, + "#relig": { + "opacity": 0.5, + "stroke": "#404040", + "stroke-width": 2, + "filter": "url(#splotch)" + }, + "#cults": { + "opacity": 0.35, + "stroke": "#777777", + "stroke-width": 2, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": "url(#splotch)" + }, + "#landmass": { + "opacity": 1, + "fill": "#04011e", + "filter": null + }, + "#markers": { + "opacity": 0.8, + "rescale": 1, + "filter": "url(#dropShadow05)" + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0.1, + "fill": "#003dff", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 1.6, + "stroke-dasharray": null, + "stroke-linecap": "square", + "filter": null + }, + "#rural": { + "stroke": "#5294ff" + }, + "#urban": { + "stroke": "#5cdeff" + }, + "#freshwater": { + "opacity": 0.9, + "fill": "#381579", + "stroke": "#47228c", + "stroke-width": 3, + "filter": null + }, + "#salt": { + "opacity": 0.5, + "fill": "#409b8a", + "stroke": "#388985", + "stroke-width": 0.7, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#5bc9fd", + "stroke": "#53a3b0", + "stroke-width": 0.7, + "filter": null + }, + "#frozen": { + "opacity": 0.95, + "fill": "#cdd4e7", + "stroke": "#cfe0eb", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 0.7, + "fill": "#90270d", + "stroke": "#f93e0c", + "stroke-width": 2, + "filter": "url(#crumpled)" + }, + "#dry": { + "opacity": 0.7, + "fill": "#c9bfa7", + "stroke": "#8e816f", + "stroke-width": 0.7, + "filter": null + }, + "#sea_island": { + "opacity": 0.6, + "stroke": "#1f3846", + "stroke-width": 0.7, + "filter": "url(#dropShadow)", + "auto-filter": 1 + }, + "#lake_island": { + "opacity": 1, + "stroke": "#7c8eaf", + "stroke-width": 0.35, + "filter": null + }, + "#terrain": { + "opacity": 0.9, + "set": "simple", + "size": 1, + "density": 0.4, + "filter": null, + "mask": null + }, + "#rivers": { + "opacity": null, + "filter": null, + "fill": "#6738bc" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 1, + "stroke": "#c44ac0", + "stroke-width": 0.9, + "stroke-dasharray": "2 3", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#trails": { + "opacity": 1, + "stroke": "#df2654", + "stroke-width": 0.2, + "stroke-dasharray": ".5 1", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.8, + "stroke": "#a890c6", + "stroke-width": 0.6, + "stroke-dasharray": "1.2 2.4", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#statesBody": { + "opacity": 0, + "filter": null + }, + "#statesHalo": { + "opacity": 1, + "data-width": 13, + "stroke-width": 13, + "filter": "blur(8.25px)" + }, + "#provs": { + "opacity": 0.2, + "fill": "#933e3e", + "font-size": 8, + "font-family": "Orbitron", + "filter": "" + }, + "#temperature": { + "opacity": 0.8, + "font-size": "22px", + "fill": "#551282", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 3, + "stroke-dasharray": 2, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.3, + "fill": "#919191", + "stroke": "#949494", + "stroke-width": 0, + "filter": "url(#dropShadow05)" + }, + "#emblems": { + "opacity": 0.75, + "stroke-width": 0.5, + "filter": "" + }, + "#texture": { + "opacity": 0.14, + "filter": null, + "mask": "url(#water)" + }, + "#zones": { + "opacity": 0.7, + "stroke": "#ffffff", + "stroke-width": 0.3, + "stroke-dasharray": null, + "stroke-linecap": "inherit", + "filter": "url(#dropShadow05)", + "mask": null + }, + "#oceanLayers": { + "filter": "", + "layers": "-6,-3,-1" + }, + "#oceanBase": { + "fill": "#05001f" + }, + "#oceanicPattern": { + "href": "", + "opacity": 0.15 + }, + "#terrs": { + "opacity": 1, + "scheme": "monochrome", + "terracing": 6, + "skip": 0, + "relax": 2, + "curve": 0, + "filter": "", + "mask": "url(#land)" + }, + "#legend": { + "data-size": 13, + "font-size": 13, + "font-family": "Almendra SC", + "stroke": "#812929", + "stroke-width": 2.5, + "stroke-dasharray": "0 4 10 4", + "stroke-linecap": "round", + "data-x": 99, + "data-y": 93, + "data-columns": 8 + }, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#ffffff", + "text-shadow": "white 0px 0px 4px", + "data-size": 8, + "font-size": 8, + "font-family": "Orbitron" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 2, + "stroke": "#444444", + "stroke-width": 0.25, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 1, + "fill": "#ffffff", + "size": 4, + "stroke": "#3e3e4b", + "stroke-width": 1 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#ffffff", + "text-shadow": "white 0px 0px 4px", + "data-size": 3, + "font-size": 3, + "font-family": "Orbitron" + }, + "#burgIcons > #towns": { + "opacity": 0.95, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 0.8, + "stroke": "#3e3e4b", + "stroke-width": 0.2, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 1.6, + "stroke": "#3e3e4b", + "stroke-width": 1 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#ffffff", + "stroke": "#000000", + "stroke-width": 0, + "text-shadow": "white 0px 0px 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Orbitron", + "filter": "" + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#ffffff", + "stroke": "#000000", + "stroke-width": 0, + "text-shadow": "white 0px 0px 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Almendra SC", + "filter": null + }, + "#fogging": { + "opacity": 0.98, + "fill": "#1b1423", + "filter": null + } +} diff --git a/styles/default.json b/styles/default.json new file mode 100644 index 00000000..eb4acb69 --- /dev/null +++ b/styles/default.json @@ -0,0 +1,385 @@ +{ + "#map": { + "background-color": "#000000", + "filter": null, + "data-filter": null + }, + "#armies": { + "font-size": 6, + "box-size": 3, + "stroke": "#000", + "stroke-width": 0.3, + "fill-opacity": 1, + "filter": null + }, + "#biomes": { + "opacity": null, + "filter": null, + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 0.8, + "stroke": "#56566d", + "stroke-width": 1, + "stroke-dasharray": 2, + "stroke-linecap": "butt", + "filter": null + }, + "#provinceBorders": { + "opacity": 0.8, + "stroke": "#56566d", + "stroke-width": 0.5, + "stroke-dasharray": "0 2", + "stroke-linecap": "round", + "filter": null + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.1, + "filter": null, + "mask": null + }, + "#gridOverlay": { + "opacity": 0.8, + "scale": 1, + "dx": 0, + "dy": 0, + "type": "pointyHex", + "stroke": "#777777", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 1, + "data-size": 12, + "font-size": 12, + "stroke": "#d4d4d4", + "stroke-width": 1, + "stroke-dasharray": 5, + "stroke-linecap": null, + "filter": null, + "mask": null + }, + "#compass": { + "opacity": 0.8, + "transform": null, + "filter": null, + "mask": "url(#water)", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": null + }, + "#relig": { + "opacity": 0.7, + "stroke": "#777777", + "stroke-width": 0, + "filter": null + }, + "#cults": { + "opacity": 0.6, + "stroke": "#777777", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#landmass": { + "opacity": 1, + "fill": "#eef6fb", + "filter": null + }, + "#markers": { + "opacity": null, + "rescale": 1, + "filter": "url(#dropShadow01)" + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0, + "fill": "#003dff", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 1.6, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null + }, + "#rural": { + "stroke": "#0000ff" + }, + "#urban": { + "stroke": "#ff0000" + }, + "#freshwater": { + "opacity": 0.5, + "fill": "#a6c1fd", + "stroke": "#5f799d", + "stroke-width": 0.7, + "filter": null + }, + "#salt": { + "opacity": 0.5, + "fill": "#409b8a", + "stroke": "#388985", + "stroke-width": 0.7, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#5bc9fd", + "stroke": "#53a3b0", + "stroke-width": 0.7, + "filter": null + }, + "#frozen": { + "opacity": 0.95, + "fill": "#cdd4e7", + "stroke": "#cfe0eb", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 0.7, + "fill": "#90270d", + "stroke": "#f93e0c", + "stroke-width": 2, + "filter": "url(#crumpled)" + }, + "#dry": { + "opacity": 1, + "fill": "#c9bfa7", + "stroke": "#8e816f", + "stroke-width": 0.7, + "filter": null + }, + "#sea_island": { + "opacity": 0.5, + "stroke": "#1f3846", + "stroke-width": 0.7, + "filter": "url(#dropShadow)", + "auto-filter": 1 + }, + "#lake_island": { + "opacity": 1, + "stroke": "#7c8eaf", + "stroke-width": 0.35, + "filter": null + }, + "#terrain": { + "opacity": null, + "set": "simple", + "size": 1, + "density": 0.4, + "filter": null, + "mask": null + }, + "#rivers": { + "opacity": null, + "filter": null, + "fill": "#5d97bb" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 0.9, + "stroke": "#d06324", + "stroke-width": 0.7, + "stroke-dasharray": 2, + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#trails": { + "opacity": 0.9, + "stroke": "#d06324", + "stroke-width": 0.25, + "stroke-dasharray": ".8 1.6", + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.8, + "stroke": "#ffffff", + "stroke-width": 0.45, + "stroke-dasharray": "1 2", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#statesBody": { + "opacity": 0.4, + "filter": null + }, + "#statesHalo": { + "opacity": 0.4, + "data-width": 10, + "stroke-width": 10, + "filter": "blur(5px)" + }, + "#provs": { + "opacity": 0.7, + "fill": "#000000", + "font-size": 10, + "font-family": "Georgia", + "filter": null + }, + "#temperature": { + "opacity": null, + "font-size": "8px", + "fill": "#000000", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 1.8, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.9, + "fill": "#e8f0f6", + "stroke": "#e8f0f6", + "stroke-width": 1, + "filter": "url(#dropShadow05)" + }, + "#emblems": { + "opacity": 0.9, + "stroke-width": 1, + "filter": null + }, + "#texture": { + "opacity": null, + "filter": null, + "mask": "url(#land)" + }, + "#zones": { + "opacity": 0.6, + "stroke": "#333333", + "stroke-width": 0, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#oceanLayers": { + "filter": null, + "layers": "-6,-3,-1" + }, + "#oceanBase": { + "fill": "#466eab" + }, + "#oceanicPattern": { + "href": "./images/pattern1.png", + "opacity": 0.2 + }, + "#terrs": { + "opacity": null, + "scheme": "bright", + "terracing": 0, + "skip": 5, + "relax": 0, + "curve": 0, + "filter": null, + "mask": "url(#land)" + }, + "#legend": { + "data-size": 13, + "font-size": 13, + "font-family": "Almendra SC", + "stroke": "#812929", + "stroke-width": 2.5, + "stroke-dasharray": "0 4 10 4", + "stroke-linecap": "round", + "data-x": 99, + "data-y": 93, + "data-columns": 8 + }, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0px 0px 4px", + "data-size": 7, + "font-size": 7, + "font-family": "Almendra SC" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 0.24, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 1, + "fill": "#ffffff", + "size": 2, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0px 0px 4px", + "data-size": 4, + "font-size": 4, + "font-family": "Almendra SC" + }, + "#burgIcons > #towns": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 0.5, + "stroke": "#3e3e4b", + "stroke-width": 0.12, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0px 0px 4px", + "data-size": 22, + "font-size": 22, + "font-family": "Almendra SC", + "filter": null + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0px 0px 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Almendra SC", + "filter": null + }, + "#fogging": { + "opacity": 0.98, + "fill": "#30426f", + "filter": null + } +} diff --git a/styles/gloom.json b/styles/gloom.json new file mode 100644 index 00000000..528d5764 --- /dev/null +++ b/styles/gloom.json @@ -0,0 +1,391 @@ +{ + "#map": { + "background-color": "#000000", + "filter": null, + "data-filter": null + }, + "#armies": { + "font-size": 6, + "box-size": 3, + "stroke": "#000", + "stroke-width": 0.3, + "opacity": 1, + "fill-opacity": 1, + "filter": null + }, + "#biomes": { + "opacity": null, + "filter": "url(#blur5)", + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 1, + "stroke": "#56566d", + "stroke-width": 1, + "stroke-dasharray": 2, + "stroke-linecap": "butt", + "filter": null + }, + "#provinceBorders": { + "opacity": 1, + "stroke": "#56566d", + "stroke-width": 0.3, + "stroke-dasharray": ".7 1", + "stroke-linecap": "butt", + "filter": null + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.1, + "filter": null, + "mask": null + }, + "#gridOverlay": { + "opacity": 0.8, + "scale": 1, + "dx": 0, + "dy": "0", + "type": "pointyHex", + "stroke": "#808080", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 1, + "data-size": 14, + "font-size": 14, + "stroke": "#4a4a4a", + "stroke-width": 1, + "stroke-dasharray": 6, + "stroke-linecap": null, + "filter": null, + "mask": null + }, + "#compass": { + "opacity": 0.6, + "transform": null, + "filter": null, + "mask": "url(#water)", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": "translate(100 100) scale(0.3)" + }, + "#relig": { + "opacity": 0.7, + "stroke": "#404040", + "stroke-width": 1, + "filter": null + }, + "#cults": { + "opacity": 0.7, + "stroke": "#777777", + "stroke-width": 1.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#landmass": { + "opacity": 1, + "fill": "#e0e0e0", + "filter": null + }, + "#markers": { + "opacity": 0.8, + "rescale": 1, + "filter": "url(#dropShadow05)" + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0.1, + "fill": "#003dff", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 1.6, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null + }, + "#rural": { + "stroke": "#0000aa" + }, + "#urban": { + "stroke": "#9d0000" + }, + "#freshwater": { + "opacity": 0.5, + "fill": "#a6c1fd", + "stroke": "#5f799d", + "stroke-width": 0.7, + "filter": null + }, + "#salt": { + "opacity": 0.5, + "fill": "#409b8a", + "stroke": "#388985", + "stroke-width": 0.7, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#5bc9fd", + "stroke": "#53a3b0", + "stroke-width": 0.7, + "filter": null + }, + "#frozen": { + "opacity": 0.95, + "fill": "#cdd4e7", + "stroke": "#cfe0eb", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 0.7, + "fill": "#90270d", + "stroke": "#f93e0c", + "stroke-width": 2, + "filter": "url(#crumpled)" + }, + "#dry": { + "opacity": 0.7, + "fill": "#c9bfa7", + "stroke": "#8e816f", + "stroke-width": 0.7, + "filter": null + }, + "#sea_island": { + "opacity": 0.6, + "stroke": "#1f3846", + "stroke-width": 0.7, + "filter": "url(#dropShadow)", + "auto-filter": 1 + }, + "#lake_island": { + "opacity": 1, + "stroke": "#7c8eaf", + "stroke-width": 0.35, + "filter": null + }, + "#terrain": { + "opacity": 0.9, + "set": "simple", + "size": 1, + "density": 0.4, + "filter": null, + "mask": null + }, + "#rivers": { + "opacity": null, + "filter": null, + "fill": "#779582" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 1, + "stroke": "#8b4418", + "stroke-width": 0.9, + "stroke-dasharray": "2 3", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#trails": { + "opacity": 1, + "stroke": "#844017", + "stroke-width": 0.2, + "stroke-dasharray": ".5 1", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.8, + "stroke": "#5e1865", + "stroke-width": 0.6, + "stroke-dasharray": "1.2 2.4", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#statesBody": { + "opacity": 0.4, + "filter": null + }, + "#statesHalo": { + "opacity": 0.5, + "data-width": 12, + "stroke-width": 12, + "filter": "blur(10px)" + }, + "#provs": { + "opacity": 0.7, + "fill": "#000000", + "data-size": 10, + "font-size": 10, + "font-family": "Georgia", + "filter": null + }, + "#temperature": { + "opacity": 1, + "font-size": "11px", + "fill": "#62001b", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 2, + "stroke-dasharray": 2, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.9, + "fill": "#e8f0f6", + "stroke": "#e8f0f6", + "stroke-width": 1, + "filter": "url(#dropShadow05)" + }, + "#emblems": { + "opacity": 0.6, + "stroke-width": 0.5, + "filter": null + }, + "#texture": { + "opacity": null, + "filter": null, + "mask": "url(#land)" + }, + "#textureImage": { + "x": 0, + "y": 0 + }, + "#zones": { + "opacity": 0.5, + "stroke": "#333333", + "stroke-width": 0, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": "url(#dropShadow01)", + "mask": null + }, + "#oceanLayers": { + "filter": null, + "layers": "-6,-4,-2" + }, + "#oceanBase": { + "fill": "#4e6964" + }, + "#oceanicPattern": { + "href": "./images/pattern3.png", + "opacity": 0.2 + }, + "#terrs": { + "opacity": 1, + "scheme": "bright", + "terracing": 0, + "skip": 0, + "relax": 1, + "curve": 1, + "filter": "url(#filter-grayscale)", + "mask": "url(#land)" + }, + "#legend": { + "data-size": 13, + "font-size": 13, + "font-family": "Almendra SC", + "stroke": "#812929", + "stroke-width": 2.5, + "stroke-dasharray": "0 4 10 4", + "stroke-linecap": "round", + "data-x": 99, + "data-y": 93, + "data-columns": 8 + }, + "#legendBox": {}, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0 0 4px", + "data-size": 7, + "font-size": 7, + "font-family": "Bitter" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 2, + "stroke": "#444444", + "stroke-width": 0.25, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 0.8, + "fill": "#ffffff", + "size": 4, + "stroke": "#3e3e4b", + "stroke-width": 1 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#3e3e4b", + "data-size": 3, + "font-size": 3, + "font-family": "Bitter" + }, + "#burgIcons > #towns": { + "opacity": 0.95, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 0.8, + "stroke": "#3e3e4b", + "stroke-width": 0.2, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 1.6, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#4e4e4e", + "stroke": "#b5b5b5", + "stroke-width": 0, + "text-shadow": "white 0 0 4px", + "data-size": 22, + "font-size": 22, + "font-family": "Almendra SC", + "filter": null + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0 0 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Almendra SC", + "filter": null + }, + "#fogging": { + "opacity": 0.98, + "fill": "#1b1423", + "filter": null + } +} diff --git a/styles/light.json b/styles/light.json new file mode 100644 index 00000000..5663d6c8 --- /dev/null +++ b/styles/light.json @@ -0,0 +1,385 @@ +{ + "#map": { + "background-color": "#000000", + "filter": null, + "data-filter": null + }, + "#armies": { + "font-size": 8, + "box-size": 4, + "stroke": "#000", + "stroke-width": 0.02, + "fill-opacity": 0.8, + "filter": null + }, + "#biomes": { + "opacity": 0.5, + "filter": null, + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 0.8, + "stroke": "#4c483e", + "stroke-width": 1, + "stroke-dasharray": 2, + "stroke-linecap": "square", + "filter": null + }, + "#provinceBorders": { + "opacity": 0.8, + "stroke": "#56566d", + "stroke-width": 0.2, + "stroke-dasharray": 1, + "stroke-linecap": "butt", + "filter": null + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.1, + "filter": null, + "mask": null + }, + "#gridOverlay": { + "opacity": 0.5, + "scale": 1, + "dx": 0, + "dy": 0, + "type": "pointyHex", + "stroke": "#808080", + "stroke-width": 1, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 0.7, + "data-size": 15, + "font-size": 15, + "stroke": "#734d37", + "stroke-width": 1.5, + "stroke-dasharray": 5, + "stroke-linecap": "square", + "filter": null, + "mask": "" + }, + "#compass": { + "opacity": 0.6, + "transform": null, + "filter": null, + "mask": "url(#water)", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": null + }, + "#relig": { + "opacity": 0.5, + "stroke": null, + "stroke-width": 0, + "filter": null + }, + "#cults": { + "opacity": 0.5, + "stroke": "#777777", + "stroke-width": 0, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#landmass": { + "opacity": 1, + "fill": "#f9f2ea", + "filter": null + }, + "#markers": { + "opacity": null, + "rescale": 1, + "filter": null + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0.1, + "fill": "#2554ef", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 1.6, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null + }, + "#rural": { + "stroke": "#0000ff" + }, + "#urban": { + "stroke": "#ff0000" + }, + "#freshwater": { + "opacity": 1, + "fill": "#98cdc4", + "stroke": "#719892", + "stroke-width": 0.46, + "filter": "url(#dropShadow05)" + }, + "#salt": { + "opacity": 0.5, + "fill": "#409b8a", + "stroke": "#388985", + "stroke-width": 0.7, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#5bc9fd", + "stroke": "#53a3b0", + "stroke-width": 0.7, + "filter": null + }, + "#frozen": { + "opacity": 0.95, + "fill": "#cdd4e7", + "stroke": "#cfe0eb", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 0.7, + "fill": "#90270d", + "stroke": "#f93e0c", + "stroke-width": 2, + "filter": "url(#crumpled)" + }, + "#dry": { + "opacity": 1, + "fill": "#c9bfa7", + "stroke": "#8e816f", + "stroke-width": 0.7, + "filter": null + }, + "#sea_island": { + "opacity": 1, + "stroke": "#5e5e5e", + "stroke-width": 0.4, + "filter": "url(#dropShadow)", + "auto-filter": 1 + }, + "#lake_island": { + "opacity": 1, + "stroke": "#7c8eaf", + "stroke-width": 0.35, + "filter": null + }, + "#terrain": { + "opacity": 0.6, + "set": "colored", + "size": 1, + "density": 0.3, + "filter": null, + "mask": "" + }, + "#rivers": { + "opacity": null, + "filter": null, + "fill": "#6d94ba" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 0.9, + "stroke": "#3c1d0b", + "stroke-width": 1.37, + "stroke-dasharray": 2, + "stroke-linecap": "inherit", + "filter": null, + "mask": null + }, + "#trails": { + "opacity": 0.9, + "stroke": "#95481a", + "stroke-width": 0.88, + "stroke-dasharray": ".8 1.6", + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.8, + "stroke": "#ffffff", + "stroke-width": 0.45, + "stroke-dasharray": "1 2", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#statesBody": { + "opacity": 0.2, + "filter": null + }, + "#statesHalo": { + "opacity": 0.3, + "data-width": 25, + "stroke-width": 25, + "filter": "blur(5px)" + }, + "#provs": { + "opacity": 0.4, + "fill": "#000000", + "font-size": 5, + "font-family": "IM Fell English", + "filter": null + }, + "#temperature": { + "opacity": null, + "font-size": "8px", + "fill": "#000000", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 1.8, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.5, + "fill": "#e8f0f6", + "stroke": "#e8f0f6", + "stroke-width": 1.5, + "filter": "url(#dropShadow05)" + }, + "#emblems": { + "opacity": 0.9, + "stroke-width": 1, + "filter": null + }, + "#texture": { + "opacity": 0.39, + "filter": null, + "mask": "" + }, + "#zones": { + "opacity": 0.6, + "stroke": "#333333", + "stroke-width": 0, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#oceanLayers": { + "filter": "url(#dropShadow05)", + "layers": "-6,-3,-1" + }, + "#oceanBase": { + "fill": "#8dc1c8" + }, + "#oceanicPattern": { + "href": "./images/pattern1.png", + "opacity": 0.2 + }, + "#terrs": { + "opacity": 0.4, + "scheme": "light", + "terracing": 10, + "skip": 5, + "relax": 0, + "curve": 0, + "filter": "url(#turbulence)", + "mask": "url(#land)" + }, + "#legend": { + "data-size": 13, + "font-size": 13, + "font-family": "Almendra SC", + "stroke": "#812929", + "stroke-width": 2.5, + "stroke-dasharray": "0 4 10 4", + "stroke-linecap": "round", + "data-x": 54.73, + "data-y": 62.98, + "data-columns": 8 + }, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#3a3a3a", + "text-shadow": "white 0px 0px 4px", + "data-size": 8, + "font-size": 8, + "font-family": "IM Fell English" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 3, + "stroke": "#3e3e4b", + "stroke-width": 0.4, + "stroke-dasharray": "0.5 0.25", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 1, + "fill": "#ffffff", + "size": 5.5, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0px 0px 4px", + "data-size": 4, + "font-size": 4, + "font-family": "IM Fell English" + }, + "#burgIcons > #towns": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 1.2, + "stroke": "#3e3e4b", + "stroke-width": 0.2, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 2.2, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#3e3e3e", + "stroke": "#000000", + "stroke-width": 0.3, + "text-shadow": "white 0px 0px 6px", + "data-size": 14, + "font-size": 14, + "font-family": "IM Fell English", + "filter": null + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#f24706", + "stroke": "#701b05", + "stroke-width": 0.1, + "text-shadow": "white 0px 0px 4px", + "data-size": 6, + "font-size": 6, + "font-family": "IM Fell English", + "filter": null + }, + "#fogging": { + "opacity": 1, + "fill": "#30426f", + "filter": null + } +} diff --git a/styles/monochrome.json b/styles/monochrome.json new file mode 100644 index 00000000..4d3ed9a4 --- /dev/null +++ b/styles/monochrome.json @@ -0,0 +1,381 @@ +{ + "#map": { + "background-color": "#000000", + "filter": "url(#filter-grayscale)", + "data-filter": "grayscale" + }, + "#armies": { + "font-size": 6, + "box-size": 3, + "stroke": "#000", + "stroke-width": 0.3, + "opacity": 1, + "fill-opacity": 1, + "filter": null + }, + "#biomes": { + "opacity": null, + "filter": "url(#blur5)", + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 1, + "stroke": "#56566d", + "stroke-width": 1, + "stroke-dasharray": 2, + "stroke-linecap": "butt", + "filter": null + }, + "#provinceBorders": { + "opacity": 1, + "stroke": "#56566d", + "stroke-width": 0.4, + "stroke-dasharray": 1, + "stroke-linecap": "butt", + "filter": null + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.1, + "filter": null, + "mask": null + }, + "#gridOverlay": { + "opacity": 0.8, + "scale": 1, + "dx": 0, + "dy": "0", + "type": "pointyHex", + "stroke": "#808080", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 1, + "data-size": 12, + "font-size": 12, + "stroke": "#d4d4d4", + "stroke-width": 1, + "stroke-dasharray": 5, + "stroke-linecap": null, + "filter": null, + "mask": null + }, + "#compass": { + "opacity": 0.8, + "transform": null, + "filter": null, + "mask": "url(#water)", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": null + }, + "#relig": { + "opacity": 0.7, + "stroke": "#404040", + "stroke-width": 0.7, + "filter": null + }, + "#cults": { + "opacity": 0.6, + "stroke": "#777777", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#landmass": { + "opacity": 1, + "fill": "#000000", + "filter": null + }, + "#markers": { + "opacity": null, + "rescale": 1, + "filter": "url(#dropShadow01)" + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0.1, + "fill": "#003dff", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 1.6, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null + }, + "#rural": { + "stroke": "#0000ff" + }, + "#urban": { + "stroke": "#ff0000" + }, + "#freshwater": { + "opacity": 1, + "fill": "#000000", + "stroke": "#515151", + "stroke-width": 0, + "filter": null + }, + "#salt": { + "opacity": 1, + "fill": "#000000", + "stroke": "#484848", + "stroke-width": 0, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#000000", + "stroke": "#5f5f5f", + "stroke-width": 0.5, + "filter": null + }, + "#frozen": { + "opacity": 1, + "fill": "#000000", + "stroke": "#6f6f6f", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 1, + "fill": "#000000", + "stroke": "#5d5d5d", + "stroke-width": 0, + "filter": null + }, + "#sea_island": { + "opacity": 1, + "stroke": "#1f3846", + "stroke-width": 0, + "filter": null, + "auto-filter": 0 + }, + "#lake_island": { + "opacity": 0, + "stroke": "#7c8eaf", + "stroke-width": 0, + "filter": null + }, + "#terrain": { + "opacity": null, + "set": "simple", + "size": 1, + "density": 0.4, + "filter": null, + "mask": null + }, + "#rivers": { + "opacity": 0.2, + "filter": "url(#blur1)", + "fill": "#000000" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 0.9, + "stroke": "#d06324", + "stroke-width": 0.7, + "stroke-dasharray": 2, + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#trails": { + "opacity": 0.9, + "stroke": "#d06324", + "stroke-width": 0.25, + "stroke-dasharray": ".8 1.6", + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.8, + "stroke": "#ffffff", + "stroke-width": 0.45, + "stroke-dasharray": "1 2", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#statesBody": { + "opacity": 0.4, + "filter": null + }, + "#statesHalo": { + "opacity": 0.4, + "data-width": 10, + "stroke-width": 10, + "filter": "blur(5px)" + }, + "#provs": { + "opacity": 0.7, + "fill": "#000000", + "data-size": 10, + "font-size": 10, + "font-family": "Georgia", + "filter": null + }, + "#temperature": { + "opacity": null, + "font-size": "8px", + "fill": "#000000", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 1.8, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.9, + "fill": "#e8f0f6", + "stroke": "#e8f0f6", + "stroke-width": 1, + "filter": "url(#dropShadow05)" + }, + "#texture": { + "opacity": 1, + "filter": null, + "mask": "url(#land)" + }, + "#emblems": { + "opacity": 0.5, + "stroke-width": 0.5, + "filter": null + }, + "#textureImage": {}, + "#zones": { + "opacity": 0.6, + "stroke": "#333333", + "stroke-width": 0, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#oceanLayers": { + "filter": null, + "layers": "none" + }, + "#oceanBase": { + "fill": "#000000" + }, + "#oceanicPattern": { + "href": "", + "opacity": 0.2 + }, + "#terrs": { + "opacity": 1, + "scheme": "monochrome", + "terracing": 0, + "skip": 5, + "relax": 0, + "curve": 0, + "filter": "url(#blur3)", + "mask": "url(#land)" + }, + "#legend": { + "data-size": 13, + "font-size": 13, + "font-family": "Almendra SC", + "stroke": "#812929", + "stroke-width": 2.5, + "stroke-dasharray": "0 4 10 4", + "stroke-linecap": "round", + "data-x": 99, + "data-y": 93, + "data-columns": 8 + }, + "#legendBox": {}, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0 0 4px", + "data-size": 7, + "font-size": 7, + "font-family": "Almendra SC" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 0.24, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 1, + "fill": "#ffffff", + "size": 2, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#3e3e4b", + "data-size": 4, + "font-size": 4, + "font-family": "Almendra SC" + }, + "#burgIcons > #towns": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 0.5, + "stroke": "#3e3e4b", + "stroke-width": 0.12, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0 0 4px", + "data-size": 22, + "font-size": 22, + "font-family": "Almendra SC", + "filter": null + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0 0 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Almendra SC", + "filter": null + }, + "#fogging": { + "opacity": 0.98, + "fill": "#30426f", + "filter": null + } +} diff --git a/styles/watercolor.json b/styles/watercolor.json new file mode 100644 index 00000000..3e890876 --- /dev/null +++ b/styles/watercolor.json @@ -0,0 +1,385 @@ +{ + "#map": { + "background-color": "#000000", + "filter": null, + "data-filter": null + }, + "#armies": { + "font-size": 8, + "box-size": 4, + "stroke": "#000", + "stroke-width": 0.2, + "fill-opacity": 1, + "filter": null + }, + "#biomes": { + "opacity": 0.6, + "filter": null, + "mask": "url(#land)" + }, + "#stateBorders": { + "opacity": 0.6, + "stroke": "#56566d", + "stroke-width": 1, + "stroke-dasharray": 3, + "stroke-linecap": "butt", + "filter": null + }, + "#provinceBorders": { + "opacity": 0.5, + "stroke": "#56566d", + "stroke-width": 0.5, + "stroke-dasharray": "0 2", + "stroke-linecap": "round", + "filter": null + }, + "#cells": { + "opacity": null, + "stroke": "#808080", + "stroke-width": 0.1, + "filter": null, + "mask": null + }, + "#gridOverlay": { + "opacity": 0.8, + "scale": 1, + "dx": 0, + "dy": 0, + "type": "pointyHex", + "stroke": "#777777", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "transform": null, + "filter": null, + "mask": null + }, + "#coordinates": { + "opacity": 1, + "data-size": 12, + "font-size": 12, + "stroke": "#d4d4d4", + "stroke-width": 1, + "stroke-dasharray": 5, + "stroke-linecap": null, + "filter": null, + "mask": null + }, + "#compass": { + "opacity": 0.8, + "transform": null, + "filter": null, + "mask": "url(#water)", + "shape-rendering": "optimizespeed" + }, + "#rose": { + "transform": "translate(80 80) scale(.25)" + }, + "#relig": { + "opacity": 0.7, + "stroke": "#777777", + "stroke-width": 0, + "filter": "url(#bluredSplotch)" + }, + "#cults": { + "opacity": 0.6, + "stroke": "#777777", + "stroke-width": 0.5, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": "url(#splotch)" + }, + "#landmass": { + "opacity": 1, + "fill": "#eef6fb", + "filter": null + }, + "#markers": { + "opacity": null, + "rescale": 1, + "filter": "url(#dropShadow01)" + }, + "#prec": { + "opacity": null, + "stroke": "#000000", + "stroke-width": 0.1, + "fill": "#003dff", + "filter": null + }, + "#population": { + "opacity": null, + "stroke-width": 1.6, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null + }, + "#rural": { + "stroke": "#0000ff" + }, + "#urban": { + "stroke": "#ff0000" + }, + "#freshwater": { + "opacity": 0.5, + "fill": "#a6c1fd", + "stroke": "#5f799d", + "stroke-width": 0.7, + "filter": null + }, + "#salt": { + "opacity": 0.5, + "fill": "#409b8a", + "stroke": "#388985", + "stroke-width": 0.7, + "filter": null + }, + "#sinkhole": { + "opacity": 1, + "fill": "#5bc9fd", + "stroke": "#53a3b0", + "stroke-width": 0.7, + "filter": null + }, + "#frozen": { + "opacity": 0.95, + "fill": "#cdd4e7", + "stroke": "#cfe0eb", + "stroke-width": 0, + "filter": null + }, + "#lava": { + "opacity": 0.7, + "fill": "#90270d", + "stroke": "#f93e0c", + "stroke-width": 2, + "filter": "url(#crumpled)" + }, + "#dry": { + "opacity": 1, + "fill": "#c9bfa7", + "stroke": "#8e816f", + "stroke-width": 0.7, + "filter": null + }, + "#sea_island": { + "opacity": 0.5, + "stroke": "#1f3846", + "stroke-width": 0.7, + "filter": "url(#dropShadow)", + "auto-filter": 1 + }, + "#lake_island": { + "opacity": 1, + "stroke": "#7c8eaf", + "stroke-width": 0.35, + "filter": null + }, + "#terrain": { + "opacity": 1, + "set": "gray", + "size": 1, + "density": 0.4, + "filter": null, + "mask": null + }, + "#rivers": { + "opacity": null, + "filter": null, + "fill": "#2e89c2" + }, + "#ruler": { + "opacity": null, + "filter": null + }, + "#roads": { + "opacity": 0.9, + "stroke": "#969696", + "stroke-width": 0.7, + "stroke-dasharray": "", + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#trails": { + "opacity": 0.9, + "stroke": "#969696", + "stroke-width": 0.4, + "stroke-dasharray": "", + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#searoutes": { + "opacity": 0.9, + "stroke": "#969696", + "stroke-width": 0.7, + "stroke-dasharray": "", + "stroke-linecap": "round", + "filter": null, + "mask": null + }, + "#statesBody": { + "opacity": 0.05, + "filter": null + }, + "#statesHalo": { + "opacity": 0.4, + "data-width": 8, + "stroke-width": 8, + "filter": "blur(2px)" + }, + "#provs": { + "opacity": 0.7, + "fill": "#000000", + "font-size": 4, + "font-family": "Comfortaa", + "filter": null + }, + "#temperature": { + "opacity": null, + "font-size": "8px", + "fill": "#000000", + "fill-opacity": 0.3, + "stroke": null, + "stroke-width": 1.8, + "stroke-dasharray": null, + "stroke-linecap": null, + "filter": null + }, + "#ice": { + "opacity": 0.7, + "fill": "#dfe8ec", + "stroke": "#000000", + "stroke-width": 0, + "filter": "url(#dropShadow05)" + }, + "#emblems": { + "opacity": 0.95, + "stroke-width": 1, + "filter": null + }, + "#texture": { + "opacity": 0.2, + "filter": null, + "mask": "url(#land)" + }, + "#zones": { + "opacity": 0.6, + "stroke": "#333333", + "stroke-width": 0, + "stroke-dasharray": null, + "stroke-linecap": "butt", + "filter": null, + "mask": null + }, + "#oceanLayers": { + "filter": null, + "layers": "-6,-4,-2" + }, + "#oceanBase": { + "fill": "#2d788b" + }, + "#oceanicPattern": { + "href": "./images/kiwiroo.png", + "opacity": 0.5 + }, + "#terrs": { + "opacity": 0.5, + "scheme": "light", + "terracing": 0, + "skip": 5, + "relax": 1, + "curve": 0, + "filter": null, + "mask": "url(#land)" + }, + "#legend": { + "data-size": 13, + "font-size": 13, + "font-family": "Almendra SC", + "stroke": "#812929", + "stroke-width": 2.5, + "stroke-dasharray": "0 4 10 4", + "stroke-linecap": "round", + "data-x": 99, + "data-y": 93, + "data-columns": 8 + }, + "#burgLabels > #cities": { + "opacity": 1, + "fill": "#043449", + "text-shadow": "white 0px 0px 2px", + "data-size": 5, + "font-size": 5, + "font-family": "Comfortaa" + }, + "#burgIcons > #cities": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 0.24, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #cities": { + "opacity": 1, + "fill": "#ffffff", + "size": 2, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#burgLabels > #towns": { + "opacity": 1, + "fill": "#3e3e4b", + "text-shadow": "white 0px 0px 4px", + "data-size": 3, + "font-size": 3, + "font-family": "Comfortaa" + }, + "#burgIcons > #towns": { + "opacity": 1, + "fill": "#ffffff", + "fill-opacity": 0.7, + "size": 0.5, + "stroke": "#3e3e4b", + "stroke-width": 0.12, + "stroke-dasharray": "", + "stroke-linecap": "butt" + }, + "#anchors > #towns": { + "opacity": 1, + "fill": "#ffffff", + "size": 1, + "stroke": "#3e3e4b", + "stroke-width": 1.2 + }, + "#labels > #states": { + "opacity": 1, + "fill": "#ffffff", + "stroke": "#000000", + "stroke-width": 0.15, + "text-shadow": "black 1px 1px 2px", + "data-size": 20, + "font-size": 20, + "font-family": "Gloria Hallelujah", + "filter": null + }, + "#labels > #addedLabels": { + "opacity": 1, + "fill": "#3e3e4b", + "stroke": "#3a3a3a", + "stroke-width": 0, + "text-shadow": "white 0px 0px 4px", + "data-size": 18, + "font-size": 18, + "font-family": "Comfortaa", + "filter": null + }, + "#fogging": { + "opacity": 0.97, + "fill": "#8398ce", + "filter": null + } +}