btroops/public/radial.html

422 lines
11 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">
<rect id="building1-floor" class="floor" x="-33.25" y="-62.25" width="66.5" height="124.5"/>
<path id="building1-outer-wall" class="outer-wall" d="
M -33.25 -62.25 V 62.25 H 33.25 V -62.25 Z
M -6.75 -37.75 V 6.25 H 2.25 V 62.25
M -33.25 16.25 H -7.75 V 62.25
M 2.25 39.25 H 33.25
M 13.75 6.25 V -1.25 H 33.25
"/>
<path id="building1-inner-wall" class="inner-wall" d="
M -33.25 -62.25 V 62.25 H 33.25 V -62.25 Z
M -6.75 -37.75 V 6.25 H 2.25 V 62.25
M -33.25 16.25 H -7.75 V 62.25
M 2.25 39.25 H 33.25
M 13.75 6.25 V -1.25 H 33.25
"/>
<path id="building1-windows" class="windows" d="
M -33.25 -45.74 V -33.25
M -33.25 40.75 V 53.75
M 11.75 62.25 H 31.25
"/>
<path id="building1-door-edges" class="door-edges" d="
M -33.25 -16.25 V -13.75 M -33.25 -5.75 V -3.25
M -7.75 26.25 V 29.25 M -7.75 36.25 V 39.25
M 2.25 13.75 V 16.25 M 2.25 24.25 V 26.75
M 2.25 40.25 V 42.75 M 2.25 50.75 V 53.25
M -3.25 -62.25 H -0.75 M 11.25 -62.25 H 13.25
"/>
<path id="building1-doors" class="doors" d="
M -33.25 -13.75 V -5.75
M -7.75 29.25 V 36.25
M 2.25 16.25 V 24.25
M 2.25 42.75 V 50.75
M -0.75 -62.25 H 11.25
"/>
</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="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="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>
</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>