btroops/public/radial.html

508 lines
15 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<style>
polygon {
fill: inherit;
stroke: inherit;
stroke-width: 0.25px;
}
svg {
border: 1px solid slategray;
fill: none;
}
text {
font-size: 4px;
text-anchor: middle;
user-select: none;
font-family: sans-serif;
fill: black;
/* display: none; */
}
use[href="#hex"] {
stroke: #666;
/* fill: wheat; */
fill: navajowhite;
/* fill: url(#asterisk); */
}
.building .doors {
display: inline;
fill: none;
fill-opacity: 1;
stroke: #ff9900;
stroke-width: 2.5;
stroke-linecap: square;
stroke-dasharray: none;
stroke-opacity: 1;
}
.building .floor {
opacity: 1;
fill: #ffffff;
fill-opacity: 0.5;
stroke: none;
}
.building .inner-wall {
fill: none;
stroke: #ffffff;
stroke-width: 1;
stroke-linecap: square;
}
.building .outer-wall {
fill: none;
stroke: #000000;
stroke-width: 2;
stroke-linecap: square;
}
.view-elevation-roof .doors,
.view-elevation-roof .inner-wall,
.view-elevation-roof .outer-wall {
display: none;
}
/* [class^="elevation"] {
display: none;
}
[class="elevation-0"] {
display: inline;
} */
.elevation-basement {
fill: lightgray;
display: none;
}
.elevation-0 use[href="#hex"] {
/* fill: green; */
}
.elevation-1,
.elevation-2 {
display: inline;
}
.elevation-1 use[href="#hex"] {
fill: lightblue;
}
.elevation-2 use[href="#hex"] {
fill: lightpink;
}
.building .elevation-1 {
fill: lightblue;
}
.elevation-roof {
display: none;
}
.building .elevation-basement use {
fill: lightgray;
}
.building .elevation-0 use {
fill: white;
}
.building .elevation-1 use {
fill: lightblue;
}
.view-elevation-roof .floor {
fill: darkgray;
}
.building .elevation-1 {
display: none;
}
.building [class^="elevation"] {
display: none;
}
[data-view-elevation="-1"] [class^="elevation"] {
display: none;
}
[data-view-elevation="-1"] .building .elevation-basement {
display: inline;
}
[data-view-elevation="0"] .elevation-0 {
display: inline;
}
[data-view-elevation="1"]>.elevation-0,
[data-view-elevation="1"]>.elevation-1 {
display: inline;
}
[data-view-elevation="1"] .building .elevation-1 {
display: inline;
}
.view-elevation-0 .elevation-0 {
display: inline;
}
.view-elevation-1 .elevation-0 {
display: inline;
}
.view-elevation-1 .elevation-1 {
display: inline;
}
.view-elevation-1 .building .elevation-0 {
display: none;
}
.view-elevation-1 .building .elevation-1 {
/* display: none; */
}
.view-elevation-roof .elevation-roof {
display: inline;
}
.view-elevation-basement [class^="elevation"] {
display: none;
}
.view-elevation-basement .elevation-basement {
display: inline;
}
.view-elevation-basement .doors {
display: none;
}
.building [class*="elevation"] use {
/* fill-opacity: 0.33; */
stroke: black;
}
.building {
/* display: none; */
/* opacity: 0.2 */
}
.select-elevation {
position: fixed;
right: 0;
top: 50%;
margin-right: 10px;
background-color: #FFFFFF99;
border: 1px solid gray;
padding: 2px;
font-family: sans-serif;
font-size: 10pt;
}
.select-elevation label {
display: block;
margin: 2px 0;
text-align: center;
border: 1px solid transparent;
user-select: none;
}
.select-elevation input {
display: none;
}
input:checked+label {
border: 1px solid salmon;
border-radius: 3px;
background-color: #cdd9e9;
}
[class^="part"] use {
fill-opacity: 0.75;
}
.part-1 use {
fill: lightseagreen;
}
.part-2 use {
fill: lightyellow;
}
.part-3 use {
fill: lightblue;
}
.part-4 use {
fill: lightsteelblue;
}
.part-5 use {
fill: lightsalmon;
}
.part-6 use {
fill: lightgreen;
}
</style>
</head>
<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">
<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" />
<pattern id="asterisk" viewBox="-15 -15 30 30" width="30" height="30" patternUnits="userSpaceOnUse">
<rect x="-15" y="-15" width="30" height="30" fill="wheat" />
<use y="-15" x="-15" href="#ast-line" />
<use y="-15" x="15" href="#ast-line" />
<use y="15" x="-15" href="#ast-line" />
<use y="15" x="15" href="#ast-line" />
<use y="-15" x="-15" transform="rotate(60, -15, -15)" href="#ast-line" />
<use y="15" x="15" transform="rotate(60, 15, 15)" href="#ast-line" />
<use y="-15" x="15" transform="rotate(-60, 15, -15)" href="#ast-line" />
<use y="15" x="-15" transform="rotate(-60, -15, 15)" href="#ast-line" />
</pattern>
<g id="building1" class="building">
<path id="building1-floor" class="floor"
d="M -38.969999,-67.499999 H 38.969999 V 67.499999 h -77.939998 z" />
<path id="building1-outer-wall" class="outer-wall"
d="m 38.969998,-7.500001 h -12.99 v 12.5 m -21.6499995,32.5 H 38.969998 m -34.6399995,30 v -60 h -8.66 v -45 m -8.6600005,105 v -45 h -25.979997 m 0,-89.999998 H 38.969999 V 67.499999 h -77.939998 z" />
<path id="building1-inner-wall" class="inner-wall"
d="m 38.969998,-7.500001 h -12.99 v 12.5 m -21.6499995,32.5 H 38.969998 m -34.6399995,30 v -60 h -8.66 v -45 m -8.6600005,105 v -45 h -25.979997 m 0,-89.999998 H 38.969999 V 67.499999 h -77.939998 z" />
</g>
<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" />
<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" />
<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" />
<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" />
</g>
<g id="building3" class="building">
<rect id="building3-floor" class="floor" x="-32.25" y="-44" width="64.5" height="88" />
<path id="building3-outer-wall" class="outer-wall" d="
M -32.25 -44 h 64.5 v 88 h -64 z
m 37.5 0 v 18
m -37.5 0 h 64.5
m -36.5 0 v 10.5
m 0 21 V 44
m 24.5 -34.5 h 12
" />
<path id="building3-inner-wall" class="inner-wall" d="
M -32.25 -44 h 64.5 v 88 h -64 z
m 37.5 0 v 18
m -37.5 0 h 64.5
m -36.5 0 v 10.5
m 0 21 V 44
m 24.5 -34.5 h 12
" />
<path id="building3-windows" class="windows" d="
M -13.75 -44 h 10.5
M 32.25 -10 v 10
M 23 44 h -10.5
M -32.25 29 v -10.5
m 0 -21 v -10
" />
<path id="building3-door-edges" class="door-edges" d="
M 12 -44 h 10.5
m -45 18 h 10.5
m 24.5 0 h 10.5
M -22 44 h 10.5
" />
<path id="building3-doors" class="doors" d="
M 15 -44 h 5
m -40 18 h 5.5
m 29 0 h 5.5
M -19.5 44 h 5.5
" />
</g>
<g id="building4" class="building">
<rect id="building4-floor" class="floor" x="-35.25" y="-62.25" width="70.5" height="124.5"/>
<path id="building4-outer-wall" class="outer-wall" d="
M -35.25 -62.25 h 70.5 v 124.5 h -70.5 z
m 35.5 0 v 50 h -35.5
m 35.5 -14 h 35
m -17 0 v 30
m 17 0 h -34.5 v 58
m 34.5 -22.25 h -34
m -16 1.5 h -20
"/>
<path id="building4-inner-wall" class="inner-wall" d="
M -35.25 -62.25 h 70.5 v 124.5 h -70.5 z
m 35.5 0 v 50 h -35.5
m 35.5 -14 h 35
m -17 0 v 30
m 17 0 h -34.5 v 58
m 34.5 -22.25 h -34
m -16 1.5 h -20
"/>
<path id="building4-windows" class="windows" d="
M 35.25 -44 v 10.5
m 0 51 v 10
m -14.5 34.75 h -15.5
m -40.5 -50 v -10
m 0 -18 v -10
"/>
<path id="building4-door-edges" class="door-edges" d="
M -27 -62.25 h 10
m 20 36 h 10
m -31 14 h 10
m 26.25 -1.5 v 10
m -15.25 7.5 h 10
m -12.25 40 v 10
m -31 8.5 h 16
"/>
<path id="building4-doors" class="doors" d="
M -24.5 -62.25 h 5
m 25 36 h 5
m -26 14 h 5
m 28.75 1 v 5
m -13 10 h 5.5
m -10 42.25 v 5.5
m -28.5 10.75 h 11
"/>
</g>
<g id="building5" class="building">
<rect id="building5-floor" class="floor" x="-75" y="-32.75" width="150" height="65.5"/>
<path id="building5-outer-wall" class="outer-wall" d="
M -75 -32.75 h 150 v 65.5 h -150 z
m 0 13 h 8 m 13 0 h 7
m 0 -13 v 26.5
m 43 -26.5 v 26.5
m 38 -26.5 v 26.5
m 23.5 -26.5 v 65.5
m -132.5 -39 h 7 m 14 0 h 111
m 15 1.5 h 3
m -105.25 -1.5 v 7.5
m 0 17.5 v 13.5
m 36.5 0 v -13.5
m 4.5 -19 v -6
"/>
<path id="building5-inner-wall" class="inner-wall" d="
M -75 -32.75 h 150 v 65.5 h -150 z
m 0 13 h 8 m 13 0 h 7
m 0 -13 v 26.5
m 43 -26.5 v 26.5
m 38 -26.5 v 26.5
m 23.5 -26.5 v 65.5
m -132.5 -39 h 7 m 14 0 h 111
m 15 1.5 h 3
m -105.25 -1.5 v 7.5
m 0 17.5 v 13.5
m 36.5 0 v -13.5
m 4.5 -19 v -6
"/>
<path id="building5-windows" class="windows" d="
M -21 -32.75 h 10
m 33 0 h 10
m 6.5 0 h 10
m 9 51 v 10
m -31 4.5 h -16
m -19.5 0 h -16
M -75 2 v 10
m 0 7 v 10
"/>
<path id="building5-door-edges" class="door-edges" d="
M -75 -17.75 v 9.5
m 150 -22 v 10
m -17.5 21 v 10
m -2 -17 h -9
m -38 0 h -10
m -10.5 0 h -10
"/>
<path id="building5-doors" class="doors" d="
M -75 -15.75 v 5.5
m 150 -18 v 6
m -17.5 25 v 6
m -4 -15 h -5
m -43 0 h -4.5
m -15.5 0 h -5
"/>
</g>
<g id="building6" class="building">
<rect id="building6-floor" class="floor" x="-23" y="-58.75" width="46" height="117.5" />
<path id="building6-outer-wall" class="outer-wall" d="
M -23 -58.75 h 46 v 117.5 h -46 z
m 19.5 0 v 44 h 26.5
M -23 26.25 h 46
m -18.5 0 v -16
" />
<path id="building6-inner-wall" class="inner-wall" d="
M -23 -58.75 h 46 v 117.5 h -46 z
m 19.5 0 v 44 h 26.5
M -23 26.25 h 46
m -18.5 0 v -16
" />
<path id="building6-windows" class="windows" d="
M 3.5 -58.75 h 10
m 9.5 56 v 10.5
m 0 20.5 v 10.5
M -23 -31 v 10.5
m 0 18 v 10.5
" />
<path id="building6-door-edges" class="door-edges" d="
M -23 -46.5 v 10
m 23.5 21.75 h 16.5
m -30.75 41 h 10
m -10 32.5 h 10
" />
<path id="building6-door-doors" class="doors" d="
M -23 -44 v 5
m 26 24.25 h 11.5
m -26 41 h 5.5
m -5 32.5 h 5
" />
</g>
<g id="building7" class="building">
<path id="building7-floor" class="floor"
d="m -116.91,-52.5 v 105 h 25.98 l 8.66,-15 h 77.94 l 8.66038,15.00022 h 103.92 v -120 h -155.88 L -73.61,-52.5 Z" />
<path id="building7-outer-wall" class="outer-wall"
d="M -86.6,20 V 7.5 h 21.65 v 15 h 4.33 M -77.94,25 V 37.5 M 38.970381,52.50022 v -30 M -43.3,37.5 v -15 h -17.32 v 15 m 38.97,0 v -15 h 17.32 m 43.300001,-60 v -30 M 4.33038,-37.49978 v -30 m -43.30076,44.99956 H 4.33038 v -14.99956 h 69.280001 m 34.639999,60 H -4.33038 V 37.5 m 77.940761,15.00022 v -120 M -108.25,-7.5 h -8.66 m 77.93962,-59.99978 v 60 H -82.26962 M -116.91,-52.5 v 105 h 25.98 l 8.66,-15 h 77.94 l 8.66038,15.00022 h 103.92 v -120 h -155.88 L -73.61,-52.5 Z" />
<path id="building7-inner-wall" class="inner-wall"
d="M -86.6,20 V 7.5 h 21.65 v 15 h 4.33 M -77.94,25 V 37.5 M 38.970381,52.50022 v -30 M -43.3,37.5 v -15 h -17.32 v 15 m 38.97,0 v -15 h 17.32 m 43.300001,-60 v -30 M 4.33038,-37.49978 v -30 m -43.30076,44.99956 H 4.33038 v -14.99956 h 69.280001 m 34.639999,60 H -4.33038 V 37.5 m 77.940761,15.00022 v -120 M -108.25,-7.5 h -8.66 m 77.93962,-59.99978 v 60 H -82.26962 M -116.91,-52.5 v 105 h 25.98 l 8.66,-15 h 77.94 l 8.66038,15.00022 h 103.92 v -120 h -155.88 L -73.61,-52.5 Z" />
</g>
</defs>
<g class="gameboard" data-view-elevation="0"></g>
</svg>
<div class="select-elevation">
<button>🡅</button>
<input type="radio" id="select-elevation-2" name="select-elevation" value="2" />
<label for="select-elevation-2">2</label>
<input type="radio" id="select-elevation-1" name="select-elevation" value="1" />
<label for="select-elevation-1">1</label>
<input type="radio" id="select-elevation-0" name="select-elevation" value="0" checked />
<label for="select-elevation-0">0</label>
<input type="radio" id="select-elevation-basement" name="select-elevation" value="-1" />
<label for="select-elevation-basement">-1</label>
<button>🡇</button>
</div>
<script src="radial.js"></script>
</body>
</html>