index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
-rw-r--r-- | public/assets/css/radial.css | 18 | ||||
-rw-r--r-- | public/radial.html | 18 | ||||
-rw-r--r-- | src/radial.js | 10 |
3 files changed, 31 insertions, 15 deletions
diff --git a/public/assets/css/radial.css b/public/assets/css/radial.css index b00df20..9bb0126 100644 --- a/public/assets/css/radial.css +++ b/public/assets/css/radial.css @@ -29,13 +29,18 @@ use[href="#hex"] { display: inline; fill: none; fill-opacity: 1; - stroke: #ff9900; - stroke-width: 2.5; + stroke: white; + stroke-width: 2.25; stroke-linecap: square; stroke-dasharray: none; stroke-opacity: 1; } +.building .door-edges, .building .windows { + stroke: #ff9900; + stroke-width: 2.25; +} + .building .floor, .terrain .floor { opacity: 1; @@ -138,12 +143,17 @@ use[href="#hex"] { display: none; } -[data-view-elevation="-1"] .building > * { +[data-view-elevation="-1"] .building > *, +[data-view-elevation="-1"] .building > .structure > * { display: none; } [data-view-elevation="-1"] .building > .elevation-basement, -[data-view-elevation="-1"] .building > .elevation-basement ~ .structure { +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure, +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure [class*="wall"], +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure .floor, +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure .doors:not(.exits), +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure .door-edges:not(.exits) { display: inline; } diff --git a/public/radial.html b/public/radial.html index 96dd569..c8502d2 100644 --- a/public/radial.html +++ b/public/radial.html @@ -7,8 +7,8 @@ <body> <!-- <svg viewBox="-150 -130 300 260" xmlns="http://www.w3.org/2000/svg"> --> - <!-- <svg viewBox="-300 -250 600 500" xmlns="http://www.w3.org/2000/svg"> --> - <svg viewBox="-900 -600 1800 1200" xmlns="http://www.w3.org/2000/svg"> + <svg viewBox="-300 -250 600 500" xmlns="http://www.w3.org/2000/svg"> + <!-- <svg viewBox="-900 -600 1800 1200" xmlns="http://www.w3.org/2000/svg"> --> <defs> <polygon id="hex" points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5" /> <line id="ast-line" stroke="#000000" stroke-width="0.3" x1="-1.2" y1="0" x2="1.2" y2="0" /> @@ -35,13 +35,19 @@ <g id="building2" class="building"> <path id="building2-floor" class="floor" - d="m 38.786985,67.5 17.32,-30 v -45 l -17.32,-30 v -30 h -77.94 v 30 l -17.32,30 v 45 l 17.32,30 z" /> + d="m 38.97,67.500001 17.32,-30 V -7.5 L 38.97,-37.500001 v -30 h -77.94 v 30 L -56.29,-7.5 v 45.000001 l 17.32,30 z" /> <path id="building2-outer-wall" class="outer-wall" - d="m -21.833015,67.5 v -60 m 17.3200004,-75 v 30 M 17.136985,15 4.146985,7.5 m 51.96,30 -12.99,-7.5 m -38.97,-67.5 v 45 h -60.62 m 17.32,-45 h 77.94 m -69.28,105 h 69.28 l 17.32,-30 v -45 l -17.32,-30 v -30 h -77.94 v 30 l -17.32,30 v 45 l 17.32,30 z" /> + d="M -21.65,67.500001 V 7.5000022 M -4.3299999,-67.500001 v 30 M 17.32,15.000001 4.3300001,7.5000022 M 56.29,37.500001 l -12.99,-7.5 M 4.3300001,-37.500001 V 7.5000022 H -56.29 M -38.97,-37.500001 H 38.97 M -30.31,67.500001 h 69.28 l 17.32,-30 V -7.5 L 38.97,-37.500001 v -30 h -77.94 v 30 L -56.29,-7.5 v 45.000001 l 17.32,30 z" /> <path id="building2-inner-wall" class="inner-wall" - d="m -21.833015,67.5 v -60 m 17.3200004,-75 v 30 M 17.136985,15 4.146985,7.5 m 51.96,30 -12.99,-7.5 m -38.97,-67.5 v 45 h -60.62 m 17.32,-45 h 77.94 m -69.28,105 h 69.28 l 17.32,-30 v -45 l -17.32,-30 v -30 h -77.94 v 30 l -17.32,30 v 45 l 17.32,30 z" /> + d="M -21.65,67.500001 V 7.5000022 M -4.3299999,-67.500001 v 30 M 17.32,15.000001 4.3300001,7.5000022 M 56.29,37.500001 l -12.99,-7.5 M 4.3300001,-37.500001 V 7.5000022 H -56.29 M -38.97,-37.500001 H 38.97 M -30.31,67.500001 h 69.28 l 17.32,-30 V -7.5 L 38.97,-37.500001 v -30 h -77.94 v 30 L -56.29,-7.5 v 45.000001 l 17.32,30 z" /> + <path id="building2-windows" class="windows" + d="M 56.29001,21.521741 56.29,8.4782622 M -46.534138,54.397991 -53.05588,43.102011 M 53.05585,-13.102013 46.53411,-24.397989 m 6e-5,78.79591 6.52172,-11.29599" /> + <path id="building2-exit-edges" class="exits door-edges" d="M 8.6600001,-67.500001 H 25.98 M 0,67.500001 H 17.32" /> + <path id="building2-exits" class="exits doors" d="m 12.99,-67.500001 h 8.66 M 4.3300001,67.500001 H 12.99" /> + <path id="building2-door-edges" class="door-edges" + d="M -17.32,7.5000022 H 1.1999999e-7 M -43.3,7.5000022 h 17.32 m 0,-45.0000032 h 17.3200001 m 25.9799999,0 h 17.32" /> <path id="building2-doors" class="doors" - d="m 3.698745,-67.5 h 9.55648 m 7.76351,30 h 9.55648 M -4.9612546,67.5 H 4.595225 m -18.71725,-60 h 9.5564804 m -35.0357204,0 h 9.55648 m 33.74353,-75 h 9.55648 m -35.53648,30 h 9.55648 m 7.7635204,105 H 4.595225 m -18.71725,-60 h 9.5564804 m -35.0357204,0 h 9.55648" /> + d="m -12.989997,7.5000022 h 8.6600001 m -34.6400001,0 h 8.66 m 8.66,-45.0000032 h 8.66 m 34.639997,0 h 8.66" /> </g> <g id="building3" class="building"> diff --git a/src/radial.js b/src/radial.js index 92e2ae9..aea4d4a 100644 --- a/src/radial.js +++ b/src/radial.js @@ -634,14 +634,14 @@ function findScalar(arr) { let sheets = []; // sheets = [[mapsheet1]]; -// sheets = [[mapsheet3]]; +sheets = [[mapsheet3]]; // sheets = [[mapsheet2], [mapsheet3]]; // sheets = [[mapsheet2], [mapsheet1], [mapsheet3]]; -sheets = [ - [mapsheet2, mapsheet1], - [mapsheet3, mapsheet4] -]; +// sheets = [ +// [mapsheet2, mapsheet1], +// [mapsheet3, mapsheet4] +// ]; findScalar(findMult(sheets)).forEach(([vscalar, row]) => { const vertMapVect = function(coords) { |