btroops/public/radial.html

312 lines
7.8 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 class="building2">
<g data-grid-footprint="0,0,0:1,0,-1:-1,0,1:1,-1,0:-1,1,0:0,1,-1:0,-1,1:2,0,-2:2,-1,-1:1,1,-2:-2,0,2:-2,1,1:-1,-1,2:2,-2,0:1,-2,1:-2,2,0:-1,2,-1:0,2,-2:0,-2,2:3,-2,-1:1,2,-3:-3,2,1:-1,-2,3:3,-3,0:2,-3,1:1,-3,2:-3,3,0:-2,3,-1:-1,3,-2:0,3,-3:0,-3,3:4,-4,0:3,-4,1:2,-4,2:1,-4,3:-4,4,0:-3,4,-1:-2,4,-2:-1,4,-3:0,4,-4:0,-4,4:3,0,-3:2,1,-3:3,-1,-2:2,2,-4:1,3,-4:-3,0,3:-2,-1,3:-3,1,2:-4,2,2:-4,3,1">
<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>
</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>