fix: bug fixes, 3d mode controls change to MapContol

This commit is contained in:
Azgaar 2025-11-28 15:11:11 +01:00
parent 07d0729cfc
commit 34b880e10f
19 changed files with 398 additions and 182 deletions

View file

@ -1092,7 +1092,7 @@
</td>
</tr>
<tr data-tip="Set icon stroke linejoin"></tr>
<tr data-tip="Set icon stroke linejoin">
<td>Stroke linejoin</td>
<td>
<select id="styleBurgIconsStrokeLinejoin">
@ -1293,8 +1293,22 @@
<tr data-tip="Set label shift along X and Y axes">
<td>Label shift</td>
<td>
<input id="styleFontShiftX" data-tip="Set label shift along Y axis" type="number" min="-5" max="5" step=".01" />
<input id="styleFontShiftY" data-tip="Set label shift along Y axis" type="number" min="-5" max="5" step=".01" />
<input
id="styleFontShiftX"
data-tip="Set label shift along Y axis"
type="number"
min="-5"
max="5"
step=".01"
/>
<input
id="styleFontShiftY"
data-tip="Set label shift along Y axis"
type="number"
min="-5"
max="5"
step=".01"
/>
</td>
</tr>
</tbody>
@ -7873,7 +7887,9 @@
</symbol>
<symbol id="icon-cross" viewBox="0 0 10 10" width="1em" height="1em" overflow="visible">
<polygon points="-1.5,-5 1.5,-5 1.5,-1.5 5,-1.5 5,1.5 1.5,1.5 1.5,5 -1.5,5 -1.5,1.5 -5,1.5 -5,-1.5 -1.5,-1.5" />
<polygon
points="-1.5,-5 1.5,-5 1.5,-1.5 5,-1.5 5,1.5 1.5,1.5 1.5,5 -1.5,5 -1.5,1.5 -5,1.5 -5,-1.5 -1.5,-1.5"
/>
</symbol>
<symbol id="icon-star" viewBox="0 0 10 10" width="1em" height="1em" overflow="visible">
@ -7892,120 +7908,194 @@
<symbol id="icon-star-circled" viewBox="0 0 10 10" width="1em" height="1em" overflow="visible">
<circle cx="0" cy="0" r="5" />
<polygon points="0,-5 1.5,-1.5 5,-1.5 2,1.5 3,5 0,3 -3,5 -2,1.5 -5,-1.5 -1.5,-1.5" transform="scale(0.38 0.38)" stroke-width="5"></polygon>
<polygon
points="0,-5 1.5,-1.5 5,-1.5 2,1.5 3,5 0,3 -3,5 -2,1.5 -5,-1.5 -1.5,-1.5"
transform="scale(0.38 0.38)"
stroke-width="5"
></polygon>
</symbol>
<symbol id="icon-star-circled-empty" viewBox="0 0 10 10" width="1em" height="1em" overflow="visible">
<circle cx="0" cy="0" r="5" />
<polygon points="0,-5 1.5,-1.5 5,-1.5 2,1.5 3,5 0,3 -3,5 -2,1.5 -5,-1.5 -1.5,-1.5" transform="scale(0.78 0.78)" />
<polygon
points="0,-5 1.5,-1.5 5,-1.5 2,1.5 3,5 0,3 -3,5 -2,1.5 -5,-1.5 -1.5,-1.5"
transform="scale(0.78 0.78)"
/>
</symbol>
<symbol id="icon-star-squared" viewBox="0 0 10 10" width="1em" height="1em" overflow="visible">
<rect x="-5" y="-5" width="10" height="10" />
<polygon points="0,-5 1.5,-1.5 5,-1.5 2,1.5 3,5 0,3 -3,5 -2,1.5 -5,-1.5 -1.5,-1.5" transform="scale(0.78 0.78)" />
<polygon
points="0,-5 1.5,-1.5 5,-1.5 2,1.5 3,5 0,3 -3,5 -2,1.5 -5,-1.5 -1.5,-1.5"
transform="scale(0.78 0.78)"
/>
</symbol>
<symbol id="icon-watabou-capital" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(-60 -194) scale(2 2)">
<path fill="#EBE8DF" d="M26 90H13l1.3-37.3-1-1v-16h12.6v16l-1 1L26 90"/>
<path d="m19.5 12 1.3 6.9 1 3.8 1 3 1.5 3.6 3.1 6.4H11.6l3.1-6.4 1.5-3.6 1-3 1-3.8 1.3-7"/>
<path fill="#4D3F36" d="M19.5 10.4V5.6L21.3 4l1-.3 1 .5.9 1 1 1.7.9 1 .9.5.9-.3.9-.8.7-.5.8-.2.6.2.5.5.6.4.7.3 1 .1h1.8l-1.8.6-1 .1H32l-.6-.2L31 8h-.6l-.8.4-.7.7-1 1.1-.8.5-1-.1-.9-.8-1-1.4-.9-.7-.9-.2-1 .6-1.8 2.2"/>
<path fill="#4D3F36" d="M19.5 12V5.5"/>
<path fill="#4D3F36" d="M17.2 46h1.6V42l-.3-.6h-1l-.3.6v4"/>
<path fill="#EBE8DF" d="M41.7 90H31.2l1-24.5-.8-.9v-16h10.1v16l-.8.9 1 24.5"/>
<path d="m36.5 29.7 1 5.6.8 3 .8 2.4 1.2 2.9 2.5 5H30.2l2.5-5 1.2-3 .8-2.3.7-3 1-5.6"/>
<path fill="#4D3F36" d="M36.5 28.2v-4.8l1.5-2 .9-.4.7.4.6 1 .7 1.7.7 1.1.8.5.7-.1.8-.7 1-.4h1l1 .2 1.2.5 1 .4 1 .3h2.4l-1.5.5-1 .2h-1.9l-1.2-.3-1 .1-1 .4-1 .7-.8.9-.7.3-.8-.2-.7-1-.7-1.4-.6-.8-.7-.2-.9.7-1.5 2.4"/>
<path fill="#4D3F36" d="M36.5 29.7v-6.3"/>
<path fill="#4D3F36" d="M34 59h1.6V55l-.3-.7h-1l-.3.7V59"/>
<path fill="#4D3F36" d="M47.6 88.8h1.6v-4.1l-.4-.7h-1l-.2.7v4.1"/>
<path fill="#EBE8DF" d="M14.8 94.6H1.5L2 84.4 8.3 73l6.3 11.4.2 10.2m8.3 0h-8.3l-.2-10.2L8.3 73l2 .4h4l2-.4 6.3 11.4.5 10.2"/>
<path d="M22.6 84.4h-8L8.3 73l2 .4h4l2-.4 6.3 11.4"/>
<path fill="#4D3F36" d="M9.5 94.6H7V89l.5-1H9l.5 1v5.5"/>
<path fill="#EBE8DF" d="M50.4 95.3H33.1l.5-10.4L42 70l8.3 15 .2 10.3m8.3 0h-8.3l-.2-10.4L41.9 70l2 .5 2 .1 2-.1 2-.5 8.3 15 .5 10.3"/>
<path d="M58.2 85h-8l-8.3-15 2 .5 2 .1 2-.1 2-.5 8.3 15"/>
<path fill="#4D3F36" d="M43 95.3h-2.3v-5.5l.5-1h1.4l.5 1v5.5"/>
<path fill="#EBE8DF" d="M27.9 97.3H13.4l1-19.8L21 65.8l6.5 11.7.5 19.8m8.5 0h-8.5l-.5-19.8-6.5-11.7 2 .4 2 .1 2-.1 2-.4 6.5 11.7 1 19.8"/>
<path d="M35.4 77.5h-8l-6.5-11.7 2 .4 2 .1 2-.1 2-.4 6.5 11.7"/>
<path fill="#4D3F36" d="m21.6 77.1.1.4-.1.4-.3.3-.4.1h-.4l-.3-.4v-.8l.3-.3h.8l.3.3"/>
<path fill="#4D3F36" d="M22.1 97.3h-2.4v-5.5l.5-1h1.4l.5 1v5.5"/>
<path fill="#EBE8DF" d="M26 90H13l1.3-37.3-1-1v-16h12.6v16l-1 1L26 90" />
<path d="m19.5 12 1.3 6.9 1 3.8 1 3 1.5 3.6 3.1 6.4H11.6l3.1-6.4 1.5-3.6 1-3 1-3.8 1.3-7" />
<path
fill="#4D3F36"
d="M19.5 10.4V5.6L21.3 4l1-.3 1 .5.9 1 1 1.7.9 1 .9.5.9-.3.9-.8.7-.5.8-.2.6.2.5.5.6.4.7.3 1 .1h1.8l-1.8.6-1 .1H32l-.6-.2L31 8h-.6l-.8.4-.7.7-1 1.1-.8.5-1-.1-.9-.8-1-1.4-.9-.7-.9-.2-1 .6-1.8 2.2"
/>
<path fill="#4D3F36" d="M19.5 12V5.5" />
<path fill="#4D3F36" d="M17.2 46h1.6V42l-.3-.6h-1l-.3.6v4" />
<path fill="#EBE8DF" d="M41.7 90H31.2l1-24.5-.8-.9v-16h10.1v16l-.8.9 1 24.5" />
<path d="m36.5 29.7 1 5.6.8 3 .8 2.4 1.2 2.9 2.5 5H30.2l2.5-5 1.2-3 .8-2.3.7-3 1-5.6" />
<path
fill="#4D3F36"
d="M36.5 28.2v-4.8l1.5-2 .9-.4.7.4.6 1 .7 1.7.7 1.1.8.5.7-.1.8-.7 1-.4h1l1 .2 1.2.5 1 .4 1 .3h2.4l-1.5.5-1 .2h-1.9l-1.2-.3-1 .1-1 .4-1 .7-.8.9-.7.3-.8-.2-.7-1-.7-1.4-.6-.8-.7-.2-.9.7-1.5 2.4"
/>
<path fill="#4D3F36" d="M36.5 29.7v-6.3" />
<path fill="#4D3F36" d="M34 59h1.6V55l-.3-.7h-1l-.3.7V59" />
<path fill="#4D3F36" d="M47.6 88.8h1.6v-4.1l-.4-.7h-1l-.2.7v4.1" />
<path
fill="#EBE8DF"
d="M14.8 94.6H1.5L2 84.4 8.3 73l6.3 11.4.2 10.2m8.3 0h-8.3l-.2-10.2L8.3 73l2 .4h4l2-.4 6.3 11.4.5 10.2"
/>
<path d="M22.6 84.4h-8L8.3 73l2 .4h4l2-.4 6.3 11.4" />
<path fill="#4D3F36" d="M9.5 94.6H7V89l.5-1H9l.5 1v5.5" />
<path
fill="#EBE8DF"
d="M50.4 95.3H33.1l.5-10.4L42 70l8.3 15 .2 10.3m8.3 0h-8.3l-.2-10.4L41.9 70l2 .5 2 .1 2-.1 2-.5 8.3 15 .5 10.3"
/>
<path d="M58.2 85h-8l-8.3-15 2 .5 2 .1 2-.1 2-.5 8.3 15" />
<path fill="#4D3F36" d="M43 95.3h-2.3v-5.5l.5-1h1.4l.5 1v5.5" />
<path
fill="#EBE8DF"
d="M27.9 97.3H13.4l1-19.8L21 65.8l6.5 11.7.5 19.8m8.5 0h-8.5l-.5-19.8-6.5-11.7 2 .4 2 .1 2-.1 2-.4 6.5 11.7 1 19.8"
/>
<path d="M35.4 77.5h-8l-6.5-11.7 2 .4 2 .1 2-.1 2-.4 6.5 11.7" />
<path fill="#4D3F36" d="m21.6 77.1.1.4-.1.4-.3.3-.4.1h-.4l-.3-.4v-.8l.3-.3h.8l.3.3" />
<path fill="#4D3F36" d="M22.1 97.3h-2.4v-5.5l.5-1h1.4l.5 1v5.5" />
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
<symbol id="icon-watabou-city" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(-60 -150) scale(2 2)">
<path fill="#EBE8DF" d="M29.5 70H18L19 48.7l-.9-.9v-16h11v16l-.8 1L29.5 70"/>
<path d="m23.7 11 1.2 6.2.8 3.3 1 2.6 1.2 3.1 2.8 5.6H16.8l2.8-5.6 1.3-3.1.9-2.6.8-3.3 1.1-6.1"/>
<path fill="#4D3F36" d="M23.7 9.6V4.8l1.4-.7h.9l.8.3 1 .7 1.1 1 1 .6.9.2.7-.4.6-.7.7-.4h.7l.7.3.8.8.8.5.9.3h1l2-.1-2 .8-1 .2h-.9l-.8-.3-.8-.5-.7-.1-.7.2-.7.6-.6 1-.7.5h-.9l-1-.2-1-.7-1-.4-1-.1-.8.3-1.4 1M23.7 11V4.9M23 42.2h1.5v-4.1l-.3-.7h-1l-.3.7v4.1"/>
<path fill="#EBE8DF" d="M19 71.2H1.5L2 63l4-15 4.2.4 4.2.1 4.2-.1 4.1-.5-4 15 .2 8.3M2 63h16.7m8.4 8.2H19l-.2-8.2 4-15 4 15 .4 8.2"/>
<path d="M18.7 63H2l4-15 4.2.4 4.2.1 4.2-.1 4.1-.5-4 15"/>
<path fill="#4D3F36" d="M9.6 69.5h1.6v-4.2l-.3-.6h-1l-.3.6v4.2"/>
<path fill="#EBE8DF" d="M49.4 71.8H32.5l.5-8.9 4-14.6 4 .5 4.1.1 4-.1 4.1-.5-4 14.6.2 8.9M33 62.9h16.2m8.5 8.9h-8.3l-.2-8.9 4-14.6 4 14.6.5 8.9"/>
<path d="M49.2 63H33l4-14.7 4 .5 4.1.1 4-.1 4.1-.5-4 14.6"/>
<path fill="#4D3F36" d="M40.3 69.8h1.6v-4.2l-.3-.6h-1l-.3.6v4.2"/>
<path fill="#EBE8DF" d="M32.6 75.3H15.9l1-19 7.6-13.6 7.6 13.6.5 19m8.5 0h-8.5l-.5-19-7.6-13.6 2 .4 2 .1 2-.1 2-.5 7.6 13.8 1 19"/>
<path d="M40.1 56.4h-8l-7.6-13.8 2 .5 2 .1 2-.1 2-.5 7.6 13.8"/>
<path fill="#4D3F36" d="m25.2 56 .1.4-.1.4-.3.2-.4.1h-.4l-.3-.4-.1-.4.1-.3.3-.3.4-.2.4.2.3.3M25.7 75.3h-2.4V70l.5-1h1.4l.5 1v5.4"/>
<path fill="#EBE8DF" d="M29.5 70H18L19 48.7l-.9-.9v-16h11v16l-.8 1L29.5 70" />
<path d="m23.7 11 1.2 6.2.8 3.3 1 2.6 1.2 3.1 2.8 5.6H16.8l2.8-5.6 1.3-3.1.9-2.6.8-3.3 1.1-6.1" />
<path
fill="#4D3F36"
d="M23.7 9.6V4.8l1.4-.7h.9l.8.3 1 .7 1.1 1 1 .6.9.2.7-.4.6-.7.7-.4h.7l.7.3.8.8.8.5.9.3h1l2-.1-2 .8-1 .2h-.9l-.8-.3-.8-.5-.7-.1-.7.2-.7.6-.6 1-.7.5h-.9l-1-.2-1-.7-1-.4-1-.1-.8.3-1.4 1M23.7 11V4.9M23 42.2h1.5v-4.1l-.3-.7h-1l-.3.7v4.1"
/>
<path
fill="#EBE8DF"
d="M19 71.2H1.5L2 63l4-15 4.2.4 4.2.1 4.2-.1 4.1-.5-4 15 .2 8.3M2 63h16.7m8.4 8.2H19l-.2-8.2 4-15 4 15 .4 8.2"
/>
<path d="M18.7 63H2l4-15 4.2.4 4.2.1 4.2-.1 4.1-.5-4 15" />
<path fill="#4D3F36" d="M9.6 69.5h1.6v-4.2l-.3-.6h-1l-.3.6v4.2" />
<path
fill="#EBE8DF"
d="M49.4 71.8H32.5l.5-8.9 4-14.6 4 .5 4.1.1 4-.1 4.1-.5-4 14.6.2 8.9M33 62.9h16.2m8.5 8.9h-8.3l-.2-8.9 4-14.6 4 14.6.5 8.9"
/>
<path d="M49.2 63H33l4-14.7 4 .5 4.1.1 4-.1 4.1-.5-4 14.6" />
<path fill="#4D3F36" d="M40.3 69.8h1.6v-4.2l-.3-.6h-1l-.3.6v4.2" />
<path
fill="#EBE8DF"
d="M32.6 75.3H15.9l1-19 7.6-13.6 7.6 13.6.5 19m8.5 0h-8.5l-.5-19-7.6-13.6 2 .4 2 .1 2-.1 2-.5 7.6 13.8 1 19"
/>
<path d="M40.1 56.4h-8l-7.6-13.8 2 .5 2 .1 2-.1 2-.5 7.6 13.8" />
<path
fill="#4D3F36"
d="m25.2 56 .1.4-.1.4-.3.2-.4.1h-.4l-.3-.4-.1-.4.1-.3.3-.3.4-.2.4.2.3.3M25.7 75.3h-2.4V70l.5-1h1.4l.5 1v5.4"
/>
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
<symbol id="icon-watabou-town" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(0 -10) scale(2 2)">
<path fill="#EBE8DF" d="M18.9-2H2.6l.5-9 7.8-14 7.8 14 .2 9M27-2H19l-.2-9-7.8-14 2 .4 2 .1 2-.1 2-.5 7.8 14L27-2 Z"/>
<path d="M26.7-11h-8l-7.8-14 2 .4 2 .1 2-.1 2-.5 7.8 14"/>
<path fill="#4D3F36" stroke="none" d="M12-2H9.8v-5.4l.4-1h1.5l.5 1V-2"/>
<path fill="#EBE8DF" d="M-10.3.4h-19.6l.4-8 4-17.2 4.8.5 4.7.2 4.8-.2 4.7-.5-4 17.1.2 8m-19.2-8h19m8.4 8h-8.2l-.2-8 4-17 4 17 .4 8Z"/>
<path d="M-10.5-7.7h-19l4-17 4.8.4 4.7.2 4.8-.2 4.7-.5-4 17.1"/>
<path fill="#4D3F36" stroke="none" d="M-24-1.3h1.7v-4.1l-.4-.7h-1l-.2.7v4.1"/>
<path fill="#EBE8DF" d="M-1.4 5H-17l.8-15 7.2-13.1 7.3 13 .4 15.2M7 5h-8.4L-1.8-10-9-23.1l2 .3 2 .2 2-.2 2-.3 7.3 13L7 4 Z"/>
<path d="M6.2-10h-8L-9-23.1l2 .3 2 .2 2-.2 2-.3 7.3 13"/>
<path fill="#4D3F36" stroke="none" d="M-7.9 5h-2.4V-.3l.5-1h1.5l.4 1v5.5"/>
<path
fill="#EBE8DF"
d="M18.9-2H2.6l.5-9 7.8-14 7.8 14 .2 9M27-2H19l-.2-9-7.8-14 2 .4 2 .1 2-.1 2-.5 7.8 14L27-2 Z"
/>
<path d="M26.7-11h-8l-7.8-14 2 .4 2 .1 2-.1 2-.5 7.8 14" />
<path fill="#4D3F36" stroke="none" d="M12-2H9.8v-5.4l.4-1h1.5l.5 1V-2" />
<path
fill="#EBE8DF"
d="M-10.3.4h-19.6l.4-8 4-17.2 4.8.5 4.7.2 4.8-.2 4.7-.5-4 17.1.2 8m-19.2-8h19m8.4 8h-8.2l-.2-8 4-17 4 17 .4 8Z"
/>
<path d="M-10.5-7.7h-19l4-17 4.8.4 4.7.2 4.8-.2 4.7-.5-4 17.1" />
<path fill="#4D3F36" stroke="none" d="M-24-1.3h1.7v-4.1l-.4-.7h-1l-.2.7v4.1" />
<path
fill="#EBE8DF"
d="M-1.4 5H-17l.8-15 7.2-13.1 7.3 13 .4 15.2M7 5h-8.4L-1.8-10-9-23.1l2 .3 2 .2 2-.2 2-.3 7.3 13L7 4 Z"
/>
<path d="M6.2-10h-8L-9-23.1l2 .3 2 .2 2-.2 2-.3 7.3 13" />
<path fill="#4D3F36" stroke="none" d="M-7.9 5h-2.4V-.3l.5-1h1.5l.4 1v5.5" />
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
<symbol id="icon-watabou-village" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(0 -6) scale(2 2)">
<path d="M 9.778,-3.849 L -3.296,-3.849 L -2.723,-15.318 L 3.384,-26.311 L 9.491,-15.318 L 9.778,-3.849 M 18.065,-3.849 L 9.778,-3.849 L 9.491,-15.318 L 3.384,-26.311 L 5.384,-25.981 L 7.384,-25.871 L 9.384,-25.981 L 11.384,-26.311 L 17.491,-15.318 L 18.065,-3.849" fill="#EBE8DF" />
<path d="M 17.491,-15.318 L 9.491,-15.318 L 3.384,-26.311 L 5.384,-25.981 L 7.384,-25.871 L 9.384,-25.981 L 11.384,-26.311 L 17.491,-15.318"/>
<path d="M 4.584,-3.849 L 2.184,-3.849 L 2.184,-9.289 L 2.664,-10.249 L 4.104,-10.249 L 4.584,-9.289 L 4.584,-3.849" fill="#4D3F36"/>
<path d="M -5.555,2.988 L -20.357,2.988 L -19.872,-6.711 L -15.872,-19.379 L -12.354,-18.999 L -8.835,-18.872 L -5.316,-18.999 L -1.797,-19.379 L -5.797,-6.711 L -5.555,2.988 M -19.872,-6.711 L -5.797,-6.711 M 2.688,2.988 L -5.555,2.988 L -5.797,-6.711 L -1.797,-19.379 L 2.203,-6.711 L 2.688,2.988" fill="#EBE8DF" />
<path d=" M -5.797,-6.711 L -19.872,-6.711 L -15.872,-19.379 L -12.354,-18.999 L -8.835,-18.872 L -5.316,-18.999 L -1.797,-19.379 L -5.797,-6.711"/>
<path d="M -13.635,0.539 L -12.035,0.539 L -12.035,-3.621 L -12.355,-4.261 L -13.315,-4.261 L -13.635,-3.621 L -13.635,0.539" fill="#4D3F36"/>
<path
d="M 9.778,-3.849 L -3.296,-3.849 L -2.723,-15.318 L 3.384,-26.311 L 9.491,-15.318 L 9.778,-3.849 M 18.065,-3.849 L 9.778,-3.849 L 9.491,-15.318 L 3.384,-26.311 L 5.384,-25.981 L 7.384,-25.871 L 9.384,-25.981 L 11.384,-26.311 L 17.491,-15.318 L 18.065,-3.849"
fill="#EBE8DF"
/>
<path
d="M 17.491,-15.318 L 9.491,-15.318 L 3.384,-26.311 L 5.384,-25.981 L 7.384,-25.871 L 9.384,-25.981 L 11.384,-26.311 L 17.491,-15.318"
/>
<path
d="M 4.584,-3.849 L 2.184,-3.849 L 2.184,-9.289 L 2.664,-10.249 L 4.104,-10.249 L 4.584,-9.289 L 4.584,-3.849"
fill="#4D3F36"
/>
<path
d="M -5.555,2.988 L -20.357,2.988 L -19.872,-6.711 L -15.872,-19.379 L -12.354,-18.999 L -8.835,-18.872 L -5.316,-18.999 L -1.797,-19.379 L -5.797,-6.711 L -5.555,2.988 M -19.872,-6.711 L -5.797,-6.711 M 2.688,2.988 L -5.555,2.988 L -5.797,-6.711 L -1.797,-19.379 L 2.203,-6.711 L 2.688,2.988"
fill="#EBE8DF"
/>
<path
d=" M -5.797,-6.711 L -19.872,-6.711 L -15.872,-19.379 L -12.354,-18.999 L -8.835,-18.872 L -5.316,-18.999 L -1.797,-19.379 L -5.797,-6.711"
/>
<path
d="M -13.635,0.539 L -12.035,0.539 L -12.035,-3.621 L -12.355,-4.261 L -13.315,-4.261 L -13.635,-3.621 L -13.635,0.539"
fill="#4D3F36"
/>
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
<symbol id="icon-watabou-hamlet" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(-120 -95) scale(2 2)">
<path fill="#EBE8DF" d="M63 48H48.6l.4-8.7 6.8-12.2 6.8 12.2.2 8.7m8.3 0h-8.3l-.2-8.7L56 27.1l2 .3 2 .2 2-.2 2-.3 6.8 12.2.5 8.7"/>
<path d="M70.7 39.3h-8L56 27.1l2 .3 2 .2 2-.2 2-.3 6.8 12.2"/>
<path fill="#4D3F36" d="M57.1 48h-2.4v-5.4l.5-1h1.4l.5 1V48"/>
<path
fill="#EBE8DF"
d="M63 48H48.6l.4-8.7 6.8-12.2 6.8 12.2.2 8.7m8.3 0h-8.3l-.2-8.7L56 27.1l2 .3 2 .2 2-.2 2-.3 6.8 12.2.5 8.7"
/>
<path d="M70.7 39.3h-8L56 27.1l2 .3 2 .2 2-.2 2-.3 6.8 12.2" />
<path fill="#4D3F36" d="M57.1 48h-2.4v-5.4l.5-1h1.4l.5 1V48" />
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
<symbol id="icon-watabou-fort" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(0 0) scale(2 1.6)">
<path fill="#EBE8DF" d="M 4.439,0 L -18.531,0 L -18.994,-61.849 L 4.902,-61.849 L 4.439,0 Z"/>
<path fill="#EBE8DF" d="M 19.103,0 L 1.283,0 L 0.924,-45.875 L 19.462,-45.875 L 19.103,0 Z"/>
<path d="M 10.193,-49.907 L 10.193,-54.973 L 11.638,-55.519 L 12.545,-55.52 L 13.396,-55.159 L 14.352,-54.496 L 15.413,-53.531 L 16.454,-52.885 L 17.476,-52.559 L 18.478,-52.553 L 19.462,-52.865 L 20.367,-53.044 L 21.194,-53.089 L 22.112,-52.943 L 23.623,-52.44 L 22.112,-52.373 L 21.194,-52.173 L 20.367,-51.816 L 19.462,-51.296 L 18.478,-50.612 L 17.476,-50.241 L 16.454,-50.181 L 15.413,-50.434 L 14.352,-50.999 L 13.396,-51.301 L 12.545,-51.342 L 11.638,-50.998 L 10.193,-49.907"/>
<path fill="#EBE8DF" d="M 10.193,-45.875 L 10.193,-54.973"/>
<path fill="#EBE8DF" d="M 4.439,0 L -18.531,0 L -18.994,-61.849 L 4.902,-61.849 L 4.439,0 Z" />
<path fill="#EBE8DF" d="M 19.103,0 L 1.283,0 L 0.924,-45.875 L 19.462,-45.875 L 19.103,0 Z" />
<path
d="M 10.193,-49.907 L 10.193,-54.973 L 11.638,-55.519 L 12.545,-55.52 L 13.396,-55.159 L 14.352,-54.496 L 15.413,-53.531 L 16.454,-52.885 L 17.476,-52.559 L 18.478,-52.553 L 19.462,-52.865 L 20.367,-53.044 L 21.194,-53.089 L 22.112,-52.943 L 23.623,-52.44 L 22.112,-52.373 L 21.194,-52.173 L 20.367,-51.816 L 19.462,-51.296 L 18.478,-50.612 L 17.476,-50.241 L 16.454,-50.181 L 15.413,-50.434 L 14.352,-50.999 L 13.396,-51.301 L 12.545,-51.342 L 11.638,-50.998 L 10.193,-49.907"
/>
<path fill="#EBE8DF" d="M 10.193,-45.875 L 10.193,-54.973" />
<g stroke-width="0.6" stroke-linecap="mitter" fill="#4D3F36">
<path d="M -16.365,-58.727 L -16.365,-61.849 L -14.796,-61.849 L -14.796,-58.727 L -16.365,-58.727 Z"/>
<path d="M -12.951,-58.727 L -12.951,-61.849 L -11.382,-61.849 L -11.382,-58.727 L -12.951,-58.727 Z"/>
<path d="M -9.538,-58.727 L -9.538,-61.849 L -7.968,-61.849 L -7.968,-58.727 L -9.538,-58.727 Z"/>
<path d="M -6.124,-58.727 L -6.124,-61.849 L -4.554,-61.849 L -4.554,-58.727 L -6.124,-58.727 Z"/>
<path d="M -2.71,-58.727 L -2.71,-61.849 L -1.141,-61.849 L -1.141,-58.727 L -2.71,-58.727 Z"/>
<path d="M 0.704,-58.727 L 0.704,-61.849 L 2.273,-61.849 L 2.273,-58.727 L 0.704,-58.727 Z"/>
<path d="M 3.847,-42.752 L 3.847,-45.875 L 5.416,-45.875 L 5.416,-42.752 L 3.847,-42.752 Z"/>
<path d="M 7.555,-42.752 L 7.555,-45.875 L 9.124,-45.875 L 9.124,-42.752 L 7.555,-42.752 Z"/>
<path d="M 11.263,-42.752 L 11.263,-45.875 L 12.832,-45.875 L 12.832,-42.752 L 11.263,-42.752 Z"/>
<path d="M 14.97,-42.752 L 14.97,-45.875 L 16.539,-45.875 L 16.539,-42.752 L 14.97,-42.752 Z"/>
<path d="M -8.475,-52.589 L -6.906,-52.589 L -6.906,-55.16 L -7.181,-55.711 L -8.199,-55.711 L -8.475,-55.16 L -8.475,-52.589 Z"/>
<path d="M 9.463,-36.614 L 11.032,-36.614 L 11.032,-39.185 L 10.756,-39.737 L 9.739,-39.737 L 9.463,-39.185 L 9.463,-36.614 Z"/>
<path d="M -5,0 V -5 H -8 V 0"/>
<path d="M -16.365,-58.727 L -16.365,-61.849 L -14.796,-61.849 L -14.796,-58.727 L -16.365,-58.727 Z" />
<path d="M -12.951,-58.727 L -12.951,-61.849 L -11.382,-61.849 L -11.382,-58.727 L -12.951,-58.727 Z" />
<path d="M -9.538,-58.727 L -9.538,-61.849 L -7.968,-61.849 L -7.968,-58.727 L -9.538,-58.727 Z" />
<path d="M -6.124,-58.727 L -6.124,-61.849 L -4.554,-61.849 L -4.554,-58.727 L -6.124,-58.727 Z" />
<path d="M -2.71,-58.727 L -2.71,-61.849 L -1.141,-61.849 L -1.141,-58.727 L -2.71,-58.727 Z" />
<path d="M 0.704,-58.727 L 0.704,-61.849 L 2.273,-61.849 L 2.273,-58.727 L 0.704,-58.727 Z" />
<path d="M 3.847,-42.752 L 3.847,-45.875 L 5.416,-45.875 L 5.416,-42.752 L 3.847,-42.752 Z" />
<path d="M 7.555,-42.752 L 7.555,-45.875 L 9.124,-45.875 L 9.124,-42.752 L 7.555,-42.752 Z" />
<path d="M 11.263,-42.752 L 11.263,-45.875 L 12.832,-45.875 L 12.832,-42.752 L 11.263,-42.752 Z" />
<path d="M 14.97,-42.752 L 14.97,-45.875 L 16.539,-45.875 L 16.539,-42.752 L 14.97,-42.752 Z" />
<path
d="M -8.475,-52.589 L -6.906,-52.589 L -6.906,-55.16 L -7.181,-55.711 L -8.199,-55.711 L -8.475,-55.16 L -8.475,-52.589 Z"
/>
<path
d="M 9.463,-36.614 L 11.032,-36.614 L 11.032,-39.185 L 10.756,-39.737 L 9.739,-39.737 L 9.463,-39.185 L 9.463,-36.614 Z"
/>
<path d="M -5,0 V -5 H -8 V 0" />
</g>
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
@ -8013,9 +8103,17 @@
<symbol id="icon-watabou-caravanserai" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(21 -2) scale(2 2)">
<path d="M -7.316,1.248 L -24.272,1.248 L -22.919,-10.943 L -15.456,-10.943 L -7.993,-10.943 L -7.316,1.248 M 3.531,1.248 L -7.316,1.248 L -7.993,-10.943 L -15.456,-10.943 L -12.913,-10.943 L -10.371,-10.943 L -7.828,-10.943 L -5.286,-10.943 L 2.177,-10.943 L 3.531,1.248 M -7.993,-10.943 L 2.177,-10.943" fill="#EBE8DF"/>
<path d="M -14.585,1.248 L -16.326,1.248 L -16.326,-2.59 L -16.15,-2.943 L -14.761,-2.943 L -14.585,-2.59 L -14.585,1.248" fill="#4D3F36"/>
<path d="M -10.371,-14.623 L -10.371,-14.623 L -7.542,-14.187 L -4.975,-12.922 L -2.908,-10.943 L -17.833,-10.943 L -15.766,-12.922 L -13.199,-14.187 L -10.371,-14.623"/>
<path
d="M -7.316,1.248 L -24.272,1.248 L -22.919,-10.943 L -15.456,-10.943 L -7.993,-10.943 L -7.316,1.248 M 3.531,1.248 L -7.316,1.248 L -7.993,-10.943 L -15.456,-10.943 L -12.913,-10.943 L -10.371,-10.943 L -7.828,-10.943 L -5.286,-10.943 L 2.177,-10.943 L 3.531,1.248 M -7.993,-10.943 L 2.177,-10.943"
fill="#EBE8DF"
/>
<path
d="M -14.585,1.248 L -16.326,1.248 L -16.326,-2.59 L -16.15,-2.943 L -14.761,-2.943 L -14.585,-2.59 L -14.585,1.248"
fill="#4D3F36"
/>
<path
d="M -10.371,-14.623 L -10.371,-14.623 L -7.542,-14.187 L -4.975,-12.922 L -2.908,-10.943 L -17.833,-10.943 L -15.766,-12.922 L -13.199,-14.187 L -10.371,-14.623"
/>
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
@ -8023,35 +8121,74 @@
<symbol id="icon-watabou-monastery" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(20 -10) scale(2 2)">
<g transform="translate(0 6)">
<path d="M -9.764,-0.93 L -29.859,-0.93 L -29.954,-10.141 L -25.873,-31.202 L -20.814,-31.292 L -15.755,-31.322 L -10.695,-31.292 L -5.636,-31.202 L -9.716,-10.141 L -9.764,-0.93 M -29.954,-10.141 L -9.716,-10.141 M -1.651,-0.93 L -9.764,-0.93 L -9.716,-10.141 L -5.636,-31.202 L -1.556,-10.141 L -1.651,-0.93" fill="#EBE8DF" stroke="#4D3F36"/>
<path d="M -9.716,-10.141 L -29.954,-10.141 L -25.873,-31.202 L -20.814,-31.292 L -15.755,-31.322 L -10.695,-31.292 L -5.636,-31.202 L -9.716,-10.141"/>
<path stroke="none" d="M -23.484,-0.93 L -26.304,-0.93 L -26.304,-8.18 L -26.046,-8.696 L -23.742,-8.696 L -23.484,-8.18 L -23.484,-0.93" fill="#4D3F36"/>
<path stroke="none" d="M -18.425,-0.93 L -21.245,-0.93 L -21.245,-8.18 L -20.987,-8.696 L -18.683,-8.696 L -18.425,-8.18 L -18.425,-0.93" fill="#4D3F36"/>
<path stroke="none" d="M -13.366,-0.93 L -16.185,-0.93 L -16.185,-8.18 L -15.928,-8.696 L -13.623,-8.696 L -13.366,-8.18 L -13.366,-0.93" fill="#4D3F36"/>
<path
d="M -9.764,-0.93 L -29.859,-0.93 L -29.954,-10.141 L -25.873,-31.202 L -20.814,-31.292 L -15.755,-31.322 L -10.695,-31.292 L -5.636,-31.202 L -9.716,-10.141 L -9.764,-0.93 M -29.954,-10.141 L -9.716,-10.141 M -1.651,-0.93 L -9.764,-0.93 L -9.716,-10.141 L -5.636,-31.202 L -1.556,-10.141 L -1.651,-0.93"
fill="#EBE8DF"
stroke="#4D3F36"
/>
<path
d="M -9.716,-10.141 L -29.954,-10.141 L -25.873,-31.202 L -20.814,-31.292 L -15.755,-31.322 L -10.695,-31.292 L -5.636,-31.202 L -9.716,-10.141"
/>
<path
stroke="none"
d="M -23.484,-0.93 L -26.304,-0.93 L -26.304,-8.18 L -26.046,-8.696 L -23.742,-8.696 L -23.484,-8.18 L -23.484,-0.93"
fill="#4D3F36"
/>
<path
stroke="none"
d="M -18.425,-0.93 L -21.245,-0.93 L -21.245,-8.18 L -20.987,-8.696 L -18.683,-8.696 L -18.425,-8.18 L -18.425,-0.93"
fill="#4D3F36"
/>
<path
stroke="none"
d="M -13.366,-0.93 L -16.185,-0.93 L -16.185,-8.18 L -15.928,-8.696 L -13.623,-8.696 L -13.366,-8.18 L -13.366,-0.93"
fill="#4D3F36"
/>
</g>
<path d="M 0.927,5.327 L -10.543,5.327 L -10.815,-20.976 L -4.876,-33.337 L 1.063,-20.976 L 0.927,5.327 M 8.952,5.327 L 0.927,5.327 L 1.063,-20.976 L -4.876,-33.337 L -2.836,-33.39 L -0.795,-33.408 L 1.245,-33.39 L 3.285,-33.337 L 9.224,-20.976 L 8.952,5.327" fill="#EBE8DF" stroke="#4D3F36"/>
<path d="M 9.224,-20.976 L 1.063,-20.976 L -4.876,-33.337 L -2.836,-33.39 L -0.795,-33.408 L 1.245,-33.39 L 3.285,-33.337 L 9.224,-20.976"/>
<path stroke="none" d="M -5.445,5.327 L -8.265,5.327 L -8.265,-1.923 L -8.007,-2.439 L -5.703,-2.439 L -5.445,-1.923 L -5.445,5.327" fill="#4D3F36"/>
<path stroke="none" d="M -1.486,5.327 L -4.306,5.327 L -4.306,-1.923 L -4.048,-2.439 L -1.744,-2.439 L -1.486,-1.923 L -1.486,5.327" fill="#4D3F36"/>
<circle cx="-5" cy="-20" r="1.6" fill="#4D3F36"/>
<path
d="M 0.927,5.327 L -10.543,5.327 L -10.815,-20.976 L -4.876,-33.337 L 1.063,-20.976 L 0.927,5.327 M 8.952,5.327 L 0.927,5.327 L 1.063,-20.976 L -4.876,-33.337 L -2.836,-33.39 L -0.795,-33.408 L 1.245,-33.39 L 3.285,-33.337 L 9.224,-20.976 L 8.952,5.327"
fill="#EBE8DF"
stroke="#4D3F36"
/>
<path
d="M 9.224,-20.976 L 1.063,-20.976 L -4.876,-33.337 L -2.836,-33.39 L -0.795,-33.408 L 1.245,-33.39 L 3.285,-33.337 L 9.224,-20.976"
/>
<path
stroke="none"
d="M -5.445,5.327 L -8.265,5.327 L -8.265,-1.923 L -8.007,-2.439 L -5.703,-2.439 L -5.445,-1.923 L -5.445,5.327"
fill="#4D3F36"
/>
<path
stroke="none"
d="M -1.486,5.327 L -4.306,5.327 L -4.306,-1.923 L -4.048,-2.439 L -1.744,-2.439 L -1.486,-1.923 L -1.486,5.327"
fill="#4D3F36"
/>
<circle cx="-5" cy="-20" r="1.6" fill="#4D3F36" />
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
<symbol id="icon-watabou-post" viewBox="0 0 100 100" width="1em" height="1em" overflow="visible">
<g transform="translate(-10 -10) scale(2 2)">
<path d="M 12.321,4.738 L -8.119,4.738 L -8.522,-8.706 L 2,-23.172 L 12.522,-8.706 L 12.321,4.738 M 22.814,4.738 L 12.321,4.738 L 12.522,-8.706 L 2,-23.172 L 4.674,-22.56 L 7.347,-22.356 L 10.021,-22.56 L 12.695,-23.172 L 23.217,-8.706 L 22.814,4.738" fill="#EBE8DF"/>
<path d="M 23.217,-8.706 L 12.522,-8.706 L 2,-23.172 L 4.674,-22.56 L 7.347,-22.356 L 10.021,-22.56 L 12.695,-23.172 L 23.217,-8.706" />
<path d="M -4,-8 v12 M 9,-8 v12"/>
<path d="M -10,-4.6 h24 l-2,-4 h-20 z"/>
<path d="M 4.5,4.5 V -1 H 0 V 4" fill="#4D3F36"/>
<circle cx="2.2" cy="-13" r="1" fill="#4D3F36"/>
<path
d="M 12.321,4.738 L -8.119,4.738 L -8.522,-8.706 L 2,-23.172 L 12.522,-8.706 L 12.321,4.738 M 22.814,4.738 L 12.321,4.738 L 12.522,-8.706 L 2,-23.172 L 4.674,-22.56 L 7.347,-22.356 L 10.021,-22.56 L 12.695,-23.172 L 23.217,-8.706 L 22.814,4.738"
fill="#EBE8DF"
/>
<path
d="M 23.217,-8.706 L 12.522,-8.706 L 2,-23.172 L 4.674,-22.56 L 7.347,-22.356 L 10.021,-22.56 L 12.695,-23.172 L 23.217,-8.706"
/>
<path d="M -4,-8 v12 M 9,-8 v12" />
<path d="M -10,-4.6 h24 l-2,-4 h-20 z" />
<path d="M 4.5,4.5 V -1 H 0 V 4" fill="#4D3F36" />
<circle cx="2.2" cy="-13" r="1" fill="#4D3F36" />
</g>
<circle fill="#EBE8DF" stroke-width="3" cx="0" cy="0" r="10" />
</symbol>
<symbol id="icon-anchor" viewBox="0 0 30 30" width="1em" height="1em" overflow="visible">
<path d="m 1.003,-9.873 c 0,-0.547 -0.453,-1 -1,-1 -0.547,0 -1,0.453 -1,1 0,0.547 0.453,1 1,1 0.547,0 1,-0.453 1,-1 z m 13,14.5 v 5.5 c 0,0.203 -0.125,0.391 -0.313,0.469 -0.063,0.016 -0.125,0.031 -0.187,0.031 -0.125,0 -0.25,-0.047 -0.359,-0.141 L 11.691,9.033 c -2.453,2.953 -6.859,4.844 -11.688,4.844 -4.829,0 -9.234,-1.891 -11.688,-4.844 l -1.453,1.453 c -0.094,0.094 -0.234,0.141 -0.359,0.141 -0.063,0 -0.125,-0.016 -0.187,-0.031 -0.187,-0.078 -0.313,-0.266 -0.313,-0.469 v -5.5 c 0,-0.281 0.219,-0.5 0.5,-0.5 h 5.5 c 0.203,0 0.391,0.125 0.469,0.313 0.078,0.188 0.031,0.391 -0.109,0.547 L -9.2,6.55 c 1.406,1.891 4.109,3.266 7.203,3.687 V 0.128 h -3 c -0.547,0 -1,-0.453 -1,-1 v -2 c 0,-0.547 0.453,-1 1,-1 h 3 v -2.547 c -1.188,-0.688 -2,-1.969 -2,-3.453 0,-2.203 1.797,-4 4,-4 2.203,0 4,1.797 4,4 0,1.484 -0.812,2.766 -2,3.453 v 2.547 h 3 c 0.547,0 1,0.453 1,1 v 2 c 0,0.547 -0.453,1 -1,1 h -3 V 10.237 C 5.097,9.815 7.8,8.44 9.206,6.55 L 7.643,4.987 C 7.502,4.831 7.456,4.628 7.534,4.44 7.612,4.252 7.8,4.127 8.003,4.127 h 5.5 c 0.281,0 0.5,0.219 0.5,0.5 z"/>
<path
d="m 1.003,-9.873 c 0,-0.547 -0.453,-1 -1,-1 -0.547,0 -1,0.453 -1,1 0,0.547 0.453,1 1,1 0.547,0 1,-0.453 1,-1 z m 13,14.5 v 5.5 c 0,0.203 -0.125,0.391 -0.313,0.469 -0.063,0.016 -0.125,0.031 -0.187,0.031 -0.125,0 -0.25,-0.047 -0.359,-0.141 L 11.691,9.033 c -2.453,2.953 -6.859,4.844 -11.688,4.844 -4.829,0 -9.234,-1.891 -11.688,-4.844 l -1.453,1.453 c -0.094,0.094 -0.234,0.141 -0.359,0.141 -0.063,0 -0.125,-0.016 -0.187,-0.031 -0.187,-0.078 -0.313,-0.266 -0.313,-0.469 v -5.5 c 0,-0.281 0.219,-0.5 0.5,-0.5 h 5.5 c 0.203,0 0.391,0.125 0.469,0.313 0.078,0.188 0.031,0.391 -0.109,0.547 L -9.2,6.55 c 1.406,1.891 4.109,3.266 7.203,3.687 V 0.128 h -3 c -0.547,0 -1,-0.453 -1,-1 v -2 c 0,-0.547 0.453,-1 1,-1 h 3 v -2.547 c -1.188,-0.688 -2,-1.969 -2,-3.453 0,-2.203 1.797,-4 4,-4 2.203,0 4,1.797 4,4 0,1.484 -0.812,2.766 -2,3.453 v 2.547 h 3 c 0.547,0 1,0.453 1,1 v 2 c 0,0.547 -0.453,1 -1,1 h -3 V 10.237 C 5.097,9.815 7.8,8.44 9.206,6.55 L 7.643,4.987 C 7.502,4.831 7.456,4.628 7.534,4.44 7.612,4.252 7.8,4.127 8.003,4.127 h 5.5 c 0.281,0 0.5,0.219 0.5,0.5 z"
/>
</symbol>
<symbol id="icon-store" viewBox="0 0 616 512">

1
libs/mapControls.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -636,6 +636,7 @@ async function generate(options) {
Rivers.generate();
Biomes.define();
Features.defineGroups();
rankCells();
Cultures.generate();
@ -654,7 +655,7 @@ async function generate(options) {
Provinces.getPoles();
Rivers.specify();
Features.specify();
Lakes.defineNames();
Military.generate();
Markers.generate();
@ -1195,7 +1196,7 @@ function rankCells() {
if (cells.r[i]) score += scoreMap.estuary;
const feature = features[cells.f[cells.haven[i]]];
if (feature.type === "lake") {
score += scoreMap[feature.water] || 0;
score += scoreMap[feature.group] || 0;
} else {
score += scoreMap.ocean_coast;
if (cells.harbor[i] === 1) score += scoreMap.save_harbor;

View file

@ -22,25 +22,6 @@ window.Burgs = (() => {
pack.burgs = burgs;
TIME && console.timeEnd("generateBurgs");
function getCapitalsNumber() {
let number = +byId("statesNumber").value;
if (populatedCells.length < number * 10) {
WARN && console.warn(`Not enough populated cells. Generating only ${number} capitals/states`);
number = Math.floor(sorted.length / 10);
}
return number;
}
function getTownsNumber() {
const manorsInput = byId("manorsInput");
const isAuto = manorsInput.value === "1000"; // '1000' is considered as auto
if (isAuto) return rn(populatedCells.length / 5 / (grid.points.length / 10000) ** 0.8);
return Math.min(manorsInput.valueAsNumber, sorted.length);
}
function generateCapitals() {
const randomize = score => score * (0.5 + Math.random() * 0.5);
const score = new Int16Array(cells.s.map(randomize));
@ -110,6 +91,25 @@ window.Burgs = (() => {
}
}
function getCapitalsNumber() {
let number = +byId("statesNumber").value;
if (populatedCells.length < number * 10) {
number = Math.floor(populatedCells.length / 10);
WARN && console.warn(`Not enough populated cells. Generating only ${number} capitals/states`);
}
return number;
}
function getTownsNumber() {
const manorsInput = byId("manorsInput");
const isAuto = manorsInput.value === "1000"; // '1000' is considered as auto
if (isAuto) return rn(populatedCells.length / 5 / (grid.points.length / 10000) ** 0.8);
return Math.min(manorsInput.valueAsNumber, populatedCells.length);
}
// define port status and shift ports and burgs on rivers
function shiftBurgs() {
const {cells, features} = pack;
@ -321,7 +321,7 @@ window.Burgs = (() => {
const defaultGroup = options.burgs.groups.find(g => g.isDefault);
if (!defaultGroup) {
ERROR & console.error("No default group defined");
ERROR && console.error("No default group defined");
return;
}
burg.group = defaultGroup.name;

View file

@ -951,7 +951,7 @@ export function resolveVersionConflicts(mapVersion) {
.attr("stroke", null);
// pole can be missing for some states/provinces
BurgsAndStates.getPoles();
States.getPoles();
Provinces.getPoles();
}

View file

@ -213,7 +213,7 @@ window.Features = (function () {
}
// add properties to pack features
function specify() {
function defineGroups() {
const gridCellsNumber = grid.cells.i.length;
const OCEAN_MIN_SIZE = gridCellsNumber / 25;
const SEA_MIN_SIZE = gridCellsNumber / 1000;
@ -223,12 +223,8 @@ window.Features = (function () {
for (const feature of pack.features) {
if (!feature || feature.type === "ocean") continue;
if (feature.type === "lake") feature.height = Lakes.getHeight(feature);
feature.group = defineGroup(feature);
if (feature.type === "lake") {
feature.height = Lakes.getHeight(feature);
feature.name = Lakes.getName(feature);
}
}
function defineGroup(feature) {
@ -267,5 +263,5 @@ window.Features = (function () {
}
}
return {markupGrid, markupPack, specify};
return {markupGrid, markupPack, defineGroups};
})();

View file

@ -106,11 +106,18 @@ window.Lakes = (function () {
return rn(minShoreHeight - LAKE_ELEVATION_DELTA, 2);
};
const defineNames = function () {
pack.features.forEach(feature => {
if (feature.type !== "lake") return;
feature.name = getName(feature);
});
};
const getName = function (feature) {
const landCell = pack.cells.c[feature.firstCell].find(c => pack.cells.h[c] >= 20);
const landCell = feature.shoreline[0];
const culture = pack.cells.culture[landCell];
return Names.getCulture(culture);
};
return {defineClimateData, cleanupLakeData, detectCloseLakes, getHeight, getName};
return {defineClimateData, cleanupLakeData, detectCloseLakes, getHeight, defineNames, getName};
})();

View file

@ -85,8 +85,8 @@ function createIconGroups() {
});
// create groups for each burg group and apply stored or default style
const defaultIconStyle = style.burgIcons.town || Object.values(style.burgIcons)[0];
const defaultAnchorStyle = style.anchors.town || Object.values(style.anchors)[0];
const defaultIconStyle = style.burgIcons.town || Object.values(style.burgIcons)[0] || {};
const defaultAnchorStyle = style.anchors.town || Object.values(style.anchors)[0] || {};
const sortedGroups = [...options.burgs.groups].sort((a, b) => a.order - b.order);
for (const {name} of sortedGroups) {
const burgGroup = burgIcons.append("g");

View file

@ -68,7 +68,7 @@ function createLabelGroups() {
});
// create groups for each burg group and apply stored or default style
const defaultStyle = style.burgLabels.town || Object.values(style.burgLabels)[0];
const defaultStyle = style.burgLabels.town || Object.values(style.burgLabels)[0] || {};
const sortedGroups = [...options.burgs.groups].sort((a, b) => a.order - b.order);
for (const {name} of sortedGroups) {
const group = burgLabels.append("g");

View file

@ -187,11 +187,27 @@ window.Resample = (function () {
function getBurgCoordinates(burg, closestCell, cell, xp, yp) {
const haven = pack.cells.haven[cell];
if (burg.port && haven) return BurgsAndStates.getCloseToEdgePoint(cell, haven);
if (burg.port && haven) return getCloseToEdgePoint(cell, haven);
if (closestCell !== cell) return pack.cells.p[cell];
return [rn(xp, 2), rn(yp, 2)];
}
function getCloseToEdgePoint(cell1, cell2) {
const {cells, vertices} = pack;
const [x0, y0] = cells.p[cell1];
const commonVertices = cells.v[cell1].filter(vertex => vertices.c[vertex].some(cell => cell === cell2));
const [x1, y1] = vertices.p[commonVertices[0]];
const [x2, y2] = vertices.p[commonVertices[1]];
const xEdge = (x1 + x2) / 2;
const yEdge = (y1 + y2) / 2;
const x = rn(x0 + 0.95 * (xEdge - x0), 2);
const y = rn(y0 + 0.95 * (yEdge - y0), 2);
return [x, y];
}
}
function restoreStates(parentMap, projection) {
@ -202,7 +218,7 @@ window.Resample = (function () {
return {...state, removed: true, lock: false};
});
BurgsAndStates.getPoles();
States.getPoles();
const regimentCellsMap = {};
const VERTICAL_GAP = 8;

View file

@ -360,7 +360,7 @@ window.Routes = (function () {
// connect cell with routes system by land
function connect(cellId) {
const getCost = createCostEvaluator({isWater: false, connections: new Map()});
const isExit = cellId => isLand(cellId) && isConnected(cellId);
const isExit = c => isLand(c) && isConnected(c);
const pathCells = findPath(cellId, isExit, getCost);
if (!pathCells) return;
@ -372,9 +372,9 @@ window.Routes = (function () {
pack.routes.push(newRoute);
for (let i = 0; i < pathCells.length; i++) {
const cellId = pathCells[i];
const currentCell = pathCells[i];
const nextCellId = pathCells[i + 1];
if (nextCellId) addConnection(cellId, nextCellId, routeId);
if (nextCellId) addConnection(currentCell, nextCellId, routeId);
}
return newRoute;
@ -446,6 +446,7 @@ window.Routes = (function () {
const connectivity = Object.values(connections).reduce((acc, routeId) => {
const route = pack.routes.find(route => route.i === routeId);
if (!route) return acc;
const rate = connectivityRateMap[route.group] || connectivityRateMap.default;
return acc + rate;
}, 0.8);

View file

@ -18,11 +18,12 @@ window.States = (() => {
function createStates() {
const states = [{i: 0, name: "Neutrals"}];
const each5th = each(5);
const sizeVariety = byId("sizeVariety").valueAsNumber;
pack.burgs.forEach(burg => {
if (!burg.i || !burg.capital) return;
const expansionism = rn(Math.random() * byId("sizeVariety").value + 1, 1);
const expansionism = rn(Math.random() * sizeVariety + 1, 1);
const basename = burg.name.length < 9 && each5th(burg.cell) ? burg.name : Names.getCultureShort(burg.culture);
const name = Names.getState(basename, burg.culture);
const type = pack.cultures[burg.culture].type;

View file

@ -200,6 +200,7 @@ window.Submap = (function () {
// it's safe to recalculate.
stage("Regenerating Biome");
Biomes.define();
Features.defineGroups();
// recalculate suitability and population
// TODO: normalize according to the base-map
rankCells();
@ -259,7 +260,7 @@ window.Submap = (function () {
regenerateRoutes();
Rivers.specify();
Features.specify();
Lakes.defineNames();
stage("Porting military");
for (const s of pack.states) {

View file

@ -68,10 +68,11 @@ window.ThreeD = (function () {
// try to clean the memory as much as possible
const stop = function () {
if (controls) controls.dispose();
cancelAnimationFrame(animationFrame);
texture.dispose();
geometry.dispose();
material.dispose();
if (texture) texture.dispose();
if (geometry) geometry.dispose();
if (material) material.dispose();
if (waterPlane) waterPlane.dispose();
if (waterMaterial) waterMaterial.dispose();
deleteLabels();
@ -255,7 +256,6 @@ window.ThreeD = (function () {
async function newMesh(canvas) {
const loaded = await loadTHREE();
if (!loaded) return tip("Cannot load 3d library", false, "error", 4000);
scene = new THREE.Scene();
// light
@ -267,7 +267,6 @@ window.ThreeD = (function () {
spotLight.shadow.mapSize.width = 2048;
spotLight.shadow.mapSize.height = 2048;
scene.add(spotLight);
// scene.add(new THREE.SpotLightHelper(spotLight));
// Renderer
Renderer = new THREE.WebGLRenderer({canvas, antialias: true, preserveDrawingBuffer: true});
@ -277,22 +276,32 @@ window.ThreeD = (function () {
if (options.extendedWater) extendWater(graphWidth, graphHeight);
createMesh(graphWidth, graphHeight, grid.cellsX, grid.cellsY);
// camera
camera = new THREE.PerspectiveCamera(70, canvas.width / canvas.height, 0.1, 2000);
camera.position.set(0, rn(svgWidth / 3.5), 500);
camera.position.set(0, 400, 500); // Set initial camera position for isometric view
controls = await MapControls(camera, canvas); // Google Maps-style navigation
if (!controls) return false;
// controls
controls = await OrbitControls(camera, canvas);
controls.listenToKeyEvents(window);
controls.zoomSpeed = 0.25;
// Set initial target at map center
if (controls.target) controls.target.set(0, 0, 0);
controls.panSpeed = 0.5;
controls.minDistance = 100;
// Configure for bird's eye view with Google Maps-style controls
controls.enableDamping = true;
controls.dampingFactor = 0.05;
controls.screenSpacePanning = false;
controls.minDistance = 50;
controls.maxDistance = 1000;
controls.maxPolarAngle = Math.PI / 2;
controls.minZoom = 0.05;
controls.maxZoom = 4;
controls.zoomSpeed = 0.6;
controls.panSpeed = 1.6;
controls.enableRotate = true;
controls.rotateSpeed = 0.5;
controls.maxPolarAngle = Math.PI / 2; // Prevent camera from going below horizon
controls.minPolarAngle = 0; // Allow full 90 degrees top-down view
controls.autoRotate = Boolean(options.rotateMesh);
controls.autoRotateSpeed = options.rotateMesh;
if (controls.autoRotate) animate();
animate();
controls.addEventListener("change", render);
return true;
@ -344,10 +353,10 @@ window.ThreeD = (function () {
const stateOptions = {
font: states.attr("font-family"),
size: +states.attr("data-size"),
size: +states.attr("data-size") / 2,
color: states.attr("fill"),
elevation: 20,
quality: 20
quality: 80
};
// Cache icon materials and geometries by group to avoid recreating them
@ -377,7 +386,7 @@ window.ThreeD = (function () {
size,
color,
elevation,
quality: 20,
quality: 40,
iconSize,
iconColor
};
@ -545,9 +554,20 @@ window.ThreeD = (function () {
if (texture) texture.dispose();
if (!options.wireframe) {
texture = new THREE.TextureLoader().load(await createMeshTextureUrl(), render);
texture.needsUpdate = true;
texture.anisotropy = Renderer.capabilities.getMaxAnisotropy();
const url = await createMeshTextureUrl();
await new Promise(resolve => {
texture = new THREE.TextureLoader().load(
url,
t => {
resolve(t);
},
undefined,
() => resolve(null)
);
});
if (texture) {
texture.anisotropy = Renderer.capabilities.getMaxAnisotropy();
}
}
if (material) material.dispose();
@ -589,10 +609,11 @@ window.ThreeD = (function () {
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add(mesh);
render();
if (options.labels3d) {
render();
await createLabels();
render();
}
}
@ -671,18 +692,59 @@ window.ThreeD = (function () {
// camera
camera = new THREE.PerspectiveCamera(45, canvas.width / canvas.height, 0.1, 1000).translateZ(5);
// controls
controls = await OrbitControls(camera, Renderer.domElement);
controls = await OrbitControls(camera, Renderer.domElement); // OrbitControls for globe view
if (!controls) return false;
controls.zoomSpeed = 0.25;
controls.minDistance = 1.5;
controls.maxDistance = 10;
controls.autoRotate = Boolean(options.rotateGlobe);
controls.autoRotateSpeed = options.rotateGlobe;
// ensure OrbitControls behavior (reset potentially changed defaults by MapControls)
controls.mouseButtons = {
LEFT: THREE.MOUSE.ROTATE,
MIDDLE: THREE.MOUSE.DOLLY,
RIGHT: THREE.MOUSE.PAN
};
controls.screenSpacePanning = true;
controls.minPolarAngle = 0;
controls.maxPolarAngle = Math.PI;
controls.addEventListener("change", render);
return true;
}
function OrbitControls(camera, domElement) {
if (THREE.OrbitControls) return new THREE.OrbitControls(camera, domElement);
return new Promise(resolve => {
const script = document.createElement("script");
script.src = "libs/orbitControls.min.js";
document.head.append(script);
script.onload = () => resolve(new THREE.OrbitControls(camera, domElement));
script.onerror = () => resolve(false);
});
}
function MapControls(camera, domElement) {
if (THREE.MapControls) return new THREE.MapControls(camera, domElement);
return new Promise(resolve => {
const script = document.createElement("script");
script.src = "libs/mapControls.min.js";
document.head.append(script);
script.onload = () => {
if (THREE.MapControls) {
resolve(new THREE.MapControls(camera, domElement));
} else {
resolve(false);
}
};
script.onerror = () => resolve(false);
});
}
async function updateGlobeTexure(addMesh) {
const world = mapCoordinates.latT > 179; // define if map covers whole world
@ -751,7 +813,7 @@ window.ThreeD = (function () {
// animate 3d scene and camera
function animate() {
animationFrame = requestAnimationFrame(animate);
controls.update();
if (controls && controls.update) controls.update();
}
function loadTHREE() {
@ -778,18 +840,6 @@ window.ThreeD = (function () {
});
}
function OrbitControls(camera, domElement) {
if (THREE.OrbitControls) return new THREE.OrbitControls(camera, domElement);
return new Promise(resolve => {
const script = document.createElement("script");
script.src = "libs/orbitControls.min.js";
document.head.append(script);
script.onload = () => resolve(new THREE.OrbitControls(camera, domElement));
script.onerror = () => resolve(false);
});
}
function OBJExporter() {
if (THREE.OBJExporter) return new THREE.OBJExporter();

View file

@ -66,7 +66,7 @@ function editBurgGroups() {
<option value="" ${!group.preview ? "selected" : ""}>no</option>
<option value="watabou-city" ${group.preview === "watabou-city" ? "selected" : ""}>Watabou City</option>
<option value="watabou-village" ${group.preview === "watabou-village" ? "selected" : ""}>Watabou Village</option>
<option value="watabou-dwelling" ${group.preview === "watabou-dwellings" ? "selected" : ""}>Watabou Dwelling</option>
<option value="watabou-dwelling" ${group.preview === "watabou-dwelling" ? "selected" : ""}>Watabou Dwelling</option>
</select>
</td>
<td data-tip="Set min population constraint"><input type="number" name="min" min="0" step="any" value="${group.min || ''}" /></td>

View file

@ -238,6 +238,7 @@ function editHeightmap(options) {
}
Biomes.define();
Features.defineGroups();
rankCells();
Cultures.generate();
@ -256,7 +257,7 @@ function editHeightmap(options) {
Provinces.getPoles();
Rivers.specify();
Features.specify();
Lakes.defineNames();
Military.generate();
Markers.generate();
@ -345,7 +346,10 @@ function editHeightmap(options) {
reGraph();
Features.markupPack();
if (erosionAllowed) Rivers.generate(true);
if (erosionAllowed) {
Rivers.generate(true);
Features.defineGroups();
}
// assign saved pack data from grid back to pack
const n = pack.cells.i.length;
@ -439,7 +443,7 @@ function editHeightmap(options) {
if (erosionAllowed) {
Rivers.specify();
Features.specify();
Lakes.defineNames();
}
// restore zones from grid

View file

@ -987,8 +987,7 @@ async function enter3dView(type) {
canvas.style.display = "block";
canvas.onmouseenter = () => {
const help =
"Left mouse to change angle, middle mouse. Mousewheel to zoom. Right mouse or hold Shift to pan. <b>O</b> to toggle options";
const help = "Drag to pan • Scroll to zoom • Right-click drag to rotate • <b>O</b> to toggle options";
+canvas.dataset.hovered > 2 ? tip("") : tip(help);
canvas.dataset.hovered = (+canvas.dataset.hovered | 0) + 1;
};

View file

@ -129,7 +129,8 @@ function regenerateRoutes() {
function regenerateRivers() {
Rivers.generate();
Rivers.specify();
Features.specify();
Features.defineGroups();
Lakes.defineNames();
if (layerIsOn("toggleRivers")) drawRivers();
}

View file

@ -89,7 +89,8 @@ function editWorld() {
Rivers.specify();
pack.cells.h = new Float32Array(heights);
Biomes.define();
Features.specify();
Features.defineGroups();
Lakes.defineNames();
if (layerIsOn("toggleTemperature")) drawTemperature();
if (layerIsOn("togglePrecipitation")) drawPrecipitation();