diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-05-23 17:56:43 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:31:29 +0100 |
commit | 61f109eb37d7fee9532d029ce9a3d111cc5cfd8a (patch) | |
tree | 54b3db6d73918f9a391a33046fc240ae6dcc792d | |
parent | 7b84af0c0ce9901105d85df27959b5585840045c (diff) | |
download | pax-pamir-61f109eb37d7fee9532d029ce9a3d111cc5cfd8a.tar.gz |
Tweak cylinder layout.
-rw-r--r-- | pieces/cylinder_black.svg | 2 | ||||
-rw-r--r-- | play.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pieces/cylinder_black.svg b/pieces/cylinder_black.svg index b934b0f..e36ad02 100644 --- a/pieces/cylinder_black.svg +++ b/pieces/cylinder_black.svg @@ -1,5 +1,5 @@ <svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"> -<path d="M367 341c-7.6 0-13.7-3.3-13.7-7.3v-13.4c0-4 6.1-7.3 13.7-7.3 7.5 0 13.7 3.2 13.7 7.3v13.4c0 4-6.2 7.3-13.7 7.3" fill="#231f20ff" transform="matrix(1.33333 0 0 -1.33333 -469 456.4)"/> +<path d="M367 341c-7.6 0-13.7-3.3-13.7-7.3v-13.4c0-4 6.1-7.3 13.7-7.3 7.5 0 13.7 3.2 13.7 7.3v13.4c0 4-6.2 7.3-13.7 7.3" fill="#231f20" transform="matrix(1.33333 0 0 -1.33333 -469 456.4)"/> <path d="M380.1 334.3c-.2 0-.1.8-.9 2l-.3.4-.4.4-.6.5a10.8 10.8 0 0 1-3.5 2l-.9.4-1 .3-2.1.4-2.3.2c-.8.1-1.6.2-2.4.1-.8 0-1.6 0-2.4-.2l-1.3-.3-1.3-.3a11.6 11.6 0 0 1-4.7-2c-.6-.5-1.2-1-1.6-1.7-.5-.6-.7-1.3-.8-2 0-1.4.8-2.7 1.9-3.6l1.8-1.2 1-.5 1-.4 1-.4 1-.2c.7-.1 1.3-.3 2-.3l2-.2 1.7-.1h1.6a16.4 16.4 0 0 1 2.7.3 13.7 13.7 0 0 1 2.5.6 10.8 10.8 0 0 1 1.8.7l1.6.8.7.5.6.5.6.5.5.5c.5.6.8 1.2 1 1.6l.3.7v-1c-.1-.5-.4-1.3-1-2l-.4-.5-.5-.5-.6-.5-.7-.6-1.8-1a16.3 16.3 0 0 0-3.5-1l-2.3-.4-1.5-.1H365l-.9.2h-1l-2 .5-1 .2-1.1.4-2 1c-.4.1-.7.4-1 .6l-1 .7c-.6.5-1.1 1-1.5 1.8-.4.7-.7 1.5-.6 2.3 0 .8.3 1.6.8 2.3.4.7 1 1.3 1.7 1.8a12.8 12.8 0 0 0 5 2.2l1.2.3 1.2.2c.8.2 1.7.4 2.6.4h2.6l2.2-.3 1.2-.1 1-.2 2-.6 1-.4 1-.4 1.4-1 .6-.5.5-.5.4-.5.3-.5.5-1V334.3" fill="#ffffff" transform="matrix(1.33333 0 0 -1.33333 -469 456.4)"/> <path d="M380.5 334.3c.1 0 .2-.8.2-2.2v-11.7l-.3-1.2-.6-1-1.5-1.7-1-.7-1.2-.6-1.1-.5a15.5 15.5 0 0 0-2.3-.8l-1.2-.2c-3-.7-6-.7-9-.2l-2 .4a10.6 10.6 0 0 0-2 .7 19.4 19.4 0 0 0-2.6 1.3l-.8.6-.7.6-.7.7-.5.8-.3.8-.2.7V324.4a1751.6 1751.6 0 0 1 0 3.2l.1 1.6a40.8 40.8 0 0 0 .5 5l.1-.6a42.4 42.4 0 0 0 0-3v-5l-.1-1.4v-4.1l.2-.7.3-.7.4-.6.5-.6.6-.6 1.6-1a17.5 17.5 0 0 1 2.7-1.2l.9-.3a22.8 22.8 0 0 1 13 .2l1.3.4a10.5 10.5 0 0 1 2.1 1l1 .6.8.8.7 1c.5.6.8 1.3.9 2V331a297 297 0 0 1 .2 3.3" fill="#ffffff" transform="matrix(1.33333 0 0 -1.33333 -469 456.4)"/> </svg> @@ -434,7 +434,7 @@ function layout_tribes_radial(list, xc, yc, maxcol) { ui.pieces[i].style = `top:${Math.round(y)}px;left:${Math.round(x)}px`; } let angle = 2 * Math.PI / Math.max(list.length, 7); - let phase = (list.length - 1) * angle / 2; + let phase = (list.length <= 3) ? Math.PI * 2 / 7 : (list.length - 1) * angle / 2; for (let i = 0; i < list.length; ++i) { let x = xc + Math.sin(i * angle - phase) * 46 - 14; let y = yc - Math.cos(i * angle - phase) * 44 - 14; @@ -694,7 +694,7 @@ function on_update() { layout_region_armies(Herat, 454, 458, 6); layout_region_armies(Kabul, 671, 238, 8); layout_region_armies(Kandahar, 730, 477, 5); - layout_region_armies(Punjab, 928, 381, 3); + layout_region_armies(Punjab, 928+10, 381, 4); layout_region_tribes(Persia, 204, 426, 5); layout_region_tribes(Transcaspia, 252, 152+5, 10); |