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/map.css | 7 | ||||
-rw-r--r-- | public/assets/images/map1.svg | 372 | ||||
-rw-r--r-- | public/assets/images/map3.svg | 4 | ||||
-rw-r--r-- | src/map.js | 4 |
4 files changed, 314 insertions, 73 deletions
diff --git a/public/assets/css/map.css b/public/assets/css/map.css index 22431da..4af73cf 100644 --- a/public/assets/css/map.css +++ b/public/assets/css/map.css @@ -400,24 +400,19 @@ g[data-y="76"] { --i: 76; } transform: scale(0.9); } -#buildings { - /* display: none; */ -} - .building, #terrain { opacity: 1; } .building .floor { fill: white; - /* fill: none; */ } .building path { fill: none; } -.building .furniture { +.furniture { fill: violet; } diff --git a/public/assets/images/map1.svg b/public/assets/images/map1.svg index 61dd787..47f8e26 100644 --- a/public/assets/images/map1.svg +++ b/public/assets/images/map1.svg @@ -7,6 +7,7 @@ #background { stroke: #304b75; + fill: #bacae3; } pattern use { @@ -14,33 +15,31 @@ stroke-width: 0.3px; } - pattern rect { - fill: #bacae3; + .cw-60-deg { + transform: rotate(60deg); } - .building .floor { - opacity: 0.3; + .ccw-60-deg { + transform: rotate(-60deg); } </style> <defs> <line id="ast-line" x1="-1.2" y1="0" x2="1.2" y2="0"/> <pattern id="asterisk" viewBox="-8.66 -15 17.32 30" width="17.32" height="30" patternUnits="userSpaceOnUse"> - <rect x="-8.66" y="-15" width="17.32" height="30"/> - <use y="-15" href="#ast-line"/> - <use y="-15" style="transform-origin: 0 -15px; transform: rotate(60deg)" href="#ast-line"/> - <use y="-15" style="transform-origin: 0 -15px; transform: rotate(-60deg)" href="#ast-line"/> + <use y="-15" style="transform-origin: 0 -15px;" class="cw-60-deg" href="#ast-line"/> + <use y="-15" style="transform-origin: 0 -15px;" class="ccw-60-deg" href="#ast-line"/> <use y="15" href="#ast-line"/> - <use y="15" style="transform-origin: 0 15px; transform: rotate(60deg)" href="#ast-line"/> - <use y="15" style="transform-origin: 0 15px; transform: rotate(-60deg)" href="#ast-line"/> + <use y="15" style="transform-origin: 0 15px;" class="cw-60-deg" href="#ast-line"/> + <use y="15" style="transform-origin: 0 15px;" class="ccw-60-deg" href="#ast-line"/> <use x="8.66" href="#ast-line"/> - <use x="8.66" style="transform-origin: 8.66px 0; transform: rotate(60deg)" href="#ast-line"/> - <use x="8.66" style="transform-origin: 8.66px 0; transform: rotate(-60deg)" href="#ast-line"/> + <use x="8.66" style="transform-origin: 8.66px 0;" class="cw-60-deg" href="#ast-line"/> + <use x="8.66" style="transform-origin: 8.66px 0;" class="ccw-60-deg" href="#ast-line"/> <use x="-8.66" href="#ast-line"/> - <use x="-8.66" style="transform-origin: -8.66px 0; transform: rotate(60deg)" href="#ast-line"/> - <use x="-8.66" style="transform-origin: -8.66px 0; transform: rotate(-60deg)" href="#ast-line"/> + <use x="-8.66" style="transform-origin: -8.66px 0;" class="cw-60-deg" href="#ast-line"/> + <use x="-8.66" style="transform-origin: -8.66px 0;" class="ccw-60-deg" href="#ast-line"/> </pattern> <polygon id="hex" points="0,10 8.66,5 8.66,-5 0,-10 -8.66,-5 -8.66,5"/> @@ -133,19 +132,6 @@ M 2.25 42.75 V 50.75 M -0.75 -62.25 H 11.25 "/> - - <g class="furniture"> - <rect class="couch" x="-28.75" y="-51.75" width="16" height="8.5"/> - <rect class="coffee-table" x="12.75" y="-48.75" width="9.5" height="5"/> - <rect class="coffee-table" x="22.75" y="-34.75" width="9.5" height="5"/> - <rect class="coffee-table" x="-18.75" y="-2.75" width="9.5" height="5"/> - <rect class="coffee-table" x="-31.75" y="24.25" width="9.5" height="5"/> - <rect class="coffee-table" x="22.25" y="27.25" width="9.5" height="5"/> - <rect class="coffee-table" x="23.25" y="10.75" width="5" height="9.5"/> - <rect class="coffee-table" x="12.25" y="-29.75" width="5" height="9.5"/> - <rect class="bed" x="-19.75" y="42.25" width="10" height="18"/> - <rect class="bed" x="17.25" y="41.25" width="10" height="18"/> - </g> </g> <g id="building2" class="building"> @@ -189,20 +175,6 @@ M -9.5 5.5 H -4 M -3.5 60.5 H 8 "/> - <g class="furniture"> - <rect class="couch" x="-46" y="11" width="8.5" height="16"/> - <rect class="couch" x="-15.5" y="36" width="16" height="8.5"/> - <rect class="coffee-table" x="3.5" y="-54.5" width="5" height="9.5"/> - <rect class="coffee-table" x="-2" y="-20" width="9.5" height="5"/> - <rect class="coffee-table" x="40" y="-4.5" width="9.5" height="5"/> - <rect class="coffee-table" x="-29.5" y="36" width="9.5" height="5"/> - <rect class="coffee-table" style="transform-origin: 13.25px 16.5px; transform: rotate(-57deg)" x="8.5" y="14.5" width="9.5" height="5"/> - <use href="#desk"/> - <use x="-5.5" y="27.5" href="#desk"/> - <use x="44" y="48" href="#desk"/> - <use style="transform-origin: -24px -49px; transform: rotate(90deg)" x="87.8" y="-44.4" href="#desk"/> - <use style="transform-origin: -24px -49px; transform: rotate(180deg)" x="-51.5" y="-2" href="#desk"/> - </g> </g> <g id="building3" class="building"> @@ -462,34 +434,301 @@ "/> </g> - <polygon id="desk" points="-26,-56 -20,-56 -20,-42 -26,-42 -27,-43 -27,-46 -29,-46 -29,-52 -27,-52 -27,-55"/> + <polygon id="desk" points="-1.5,-7 4.5,-7 4.5,7 -1.5,7 -2.5,6 -2.5,3 -4.5,3 -4.5,-3 -2.5,-3 -2.5,-6"/> + <rect id="couch" x="-4.25" y="-8" width="8.5" height="16"/> + <rect id="bed" x="-5" y="-9" width="10" height="18"/> + <rect id="dresser" x="-2.5" y="-4.75" width="5" height="9.5"/> + <path id="stairs" d=" + M -6.375 -13.6 h 12.75 v 3 h -12.75 z + m 0 3.5 h 12.75 v 3 h -12.75 z + m 0 3.5 h 12.75 v 3 h -12.75 z + m 0 3.5 h 12.75 v 3 h -12.75 z + "/> </defs> - <!-- <g id="image-maps"> - <image id="map2" class="map-scans" href="scans/map2.jpg" width="2284" height="1518"/> - <image class="map-scans" href="row.jpg" width="2284" height="55" y="1505" /> - <image id="map3" class="map-scans" href="scans/map3.jpg" width="2284" height="1518"/> - </g> --> - - <rect id="background" fill="url(#asterisk)"/> + <rect id="background"/> <g class="gameboard"> - <g id="buildings"> - <use x="359" y="488.75" href="#building1"/> - <use x="220" y="280" href="#building1"/> - <use x="108" y="282" href="#building2"/> - <use style="transform: translate(185px, 467px) rotate(180deg)" href="#building2"/> - <use x="51.25" y="456" href="#building3"/> - <use style="transform: translate(485.5px, 264.5px) rotate(180deg)" href="#building3"/> - <use x="377.25" y="278.75" href="#building4"/> - <use style="transform: translate(499px, 486px) rotate(180deg)" href="#building4"/> - <use x="103" y="84.75" href="#building5"/> - <use x="103" y="684.75" href="#building5"/> - <use x="224" y="85.75" href="#building6"/> - <use style="transform: translate(224.5px, 665.25px) rotate(180deg)" href="#building6"/> - <use x="427.75" y="110" href="#building7"/> - <use x="419" y="696" href="#building7"/> + <g id="svg-map2"> + <g class="building1" style="transform: translate(220px, 280px)"> + <use href="#building1"/> + <g class="furniture"> + <use style="transform: translate(-22.5px, -49px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-22.5px, 37px)" href="#bed"/> + <use style="transform: translate(22.5px, 50.5px)" href="#bed"/> + <use style="transform: translate(17.5px, -47px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(20.5px, -19px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(7.5px, -10.75px)" href="#dresser"/> + <use style="transform: translate(-14.5px, -1px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(26px, 11.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(27px, 26px)" href="#dresser"/> + <use style="transform: translate(-26.75px, 58px) rotate(90deg)" href="#dresser"/> + </g> + </g> + <g class="building2" style="transform: translate(108px, 282px)"> + <use href="#building2"/> + <g class="furniture"> + <rect class="couch" x="-46" y="11" width="8.5" height="16"/> + <rect class="couch" x="-15.5" y="36" width="16" height="8.5"/> + <rect class="coffee-table" x="3.5" y="-54.5" width="5" height="9.5"/> + <rect class="coffee-table" x="-2" y="-20" width="9.5" height="5"/> + <rect class="coffee-table" x="40" y="-4.5" width="9.5" height="5"/> + <rect class="coffee-table" x="-29.5" y="36" width="9.5" height="5"/> + <rect class="coffee-table" style="transform-origin: 13.25px 16.5px; transform: rotate(-57deg)" x="8.5" y="14.5" width="9.5" height="5"/> + <use style="transform: translate(19.5px, -1px)" href="#desk"/> + <use style="transform: translate(28px, -47px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(20.5px, 38px) rotate(90deg)" href="#desk"/> + <use style="transform: translate(-30px, -21.5px)" href="#desk"/> + <use style="transform: translate(-25px, -49px)" href="#desk"/> + </g> + </g> + <g class="building3" style="transform: translate(485.5px, 264.5px)"> + <use style="transform: rotate(180deg)" href="#building3"/> + <g class="furniture"> + <use style="transform: translate(-2px, -28.5px)" href="#couch"/> + <use style="transform: translate(-18px, 12.5px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(17.75px, 35.25px)" href="#dresser"/> + <use style="transform: translate(17.75px, 5px)" href="#dresser"/> + <use style="transform: translate(-.5px, 4px)" href="#dresser"/> + <use style="transform: translate(-17px, -1px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-24.5px, -18px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(17.5px, -17.5px) rotate(-90deg)" href="#desk"/> + </g> + </g> + <g class="building4" style="transform: translate(377.25px, 278.75px)"> + <use href="#building4"/> + <g class="furniture"> + <use style="transform: translate(-13.5px, -39px)" href="#bed"/> + <use style="transform: translate(12px, -51px)" href="#bed"/> + <use style="transform: translate(23.5px, 48px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(-22.75px, -1.5px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-28px, -29.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(28px, -48.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(29px, -18px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-6px, 14.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(28px, 10.5px)" href="#dresser"/> + <use style="transform: translate(-22.5px, 34px)" href="#dresser"/> + <use style="transform: translate(7.5px, 29px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-30.5px, 48.5px)" href="#dresser"/> + </g> + </g> + <g class="building5" style="transform: translate(103px, 84.75px)"> + <use href="#building5"/> + <g class="furniture"> + <use style="transform: translate(-36px, -17.25px) rotate(90deg)" href="#bed"/> + <use style="transform: translate(23px, -17.25px) rotate(90deg)" href="#bed"/> + <use style="transform: translate(-40.25px, -.5px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-58.5px, 27px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-8px, 20.5px) rotate(90deg)" href="#desk"/> + <use style="transform: translate(-48px, 12.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(17.5px, 2.5px)" href="#dresser"/> + <use style="transform: translate(35.75px, 2.25px)" href="#dresser"/> + <use style="transform: translate(30.25px, 25.5px)" href="#dresser"/> + <use style="transform: translate(38.5px, -17.5px)" href="#dresser"/> + <use style="transform: translate(49.75px, 13.75px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(65px, -5.5px)" href="#stairs"/> + </g> + </g> + <g class="building6" style="transform: translate(224px, 85.75px)"> + <use href="#building6"/> + <g class="furniture"> + <use style="transform: translate(9.5px, -40.5px)" href="#bed"/> + <use style="transform: translate(-8px, 11.5px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(8.75px, 48.75px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(-8px, -41px)" href="#dresser"/> + <use style="transform: translate(12px, 12px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-15px, 42.5px) rotate(90deg)" href="#dresser"/> + </g> + </g> + <g class="building7" style="transform: translate(427.75px, 110px)"> + <use href="#building7"/> + <g class="furniture"> + <use style="transform: translate(-99px, -46.5px)" href="#desk"/> + <use style="transform: translate(-106px, 22px)" href="#desk"/> + <use style="transform: translate(-46px, -58.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(-1.5px, -61.5px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(-1px, -41.5px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(-28.75px, 16.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(32.5px, 32px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(54.5px, 32.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(69.5px, 28.25px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(88px, 31.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(104px, 23.75px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(104.5px, -2px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(103.5px, -41.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(103.25px, -59.75px) rotate(90deg)" href="#desk"/> + + <use style="transform: translate(-107px, -27.75px) rotate(0deg)" href="#dresser"/> + <use style="transform: translate(-75.5px, -37.75px) rotate(0deg)" href="#dresser"/> + <use style="transform: translate(-63.5px, -26.75px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-62px, 17.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(6px, 5.5px)" href="#dresser"/> + <use style="transform: translate(12.5px, 21.5px)" href="#dresser"/> + <use style="transform: translate(48.25px, -32.5px)" href="#dresser"/> + <use style="transform: translate(65px, -58px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(73px, -29.25px) rotate(90deg)" href="#dresser"/> + + <path class="stairs" style="transform: translate(34.5px, -63.25px) rotate(-90deg)" d=" + M -5.25 -10.95 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + "/> + </g> + </g> + </g> + <g id="svg-map3"> + <g class="building1" style="transform: translate(359px, 488.75px)"> + <use href="#building1"/> + <g class="furniture"> + <rect class="couch" x="-28.75" y="-51.75" width="16" height="8.5"/> + <rect class="coffee-table" x="12.75" y="-48.75" width="9.5" height="5"/> + <rect class="coffee-table" x="22.75" y="-34.75" width="9.5" height="5"/> + <rect class="coffee-table" x="-18.75" y="-2.75" width="9.5" height="5"/> + <rect class="coffee-table" x="-31.75" y="24.25" width="9.5" height="5"/> + <rect class="coffee-table" x="22.25" y="27.25" width="9.5" height="5"/> + <rect class="coffee-table" x="23.25" y="10.75" width="5" height="9.5"/> + <rect class="coffee-table" x="12.25" y="-29.75" width="5" height="9.5"/> + <rect class="bed" x="-19.75" y="42.25" width="10" height="18"/> + <rect class="bed" x="17.25" y="41.25" width="10" height="18"/> + </g> + </g> + <g class="building2" style="transform: translate(185px, 467px)"> + <use style="transform: rotate(180deg)" href="#building2"/> + <g class="furniture"> + <use style="transform: translate(-39px, -2.75px)" href="#couch"/> + <use style="transform: translate(5.25px, -41px) rotate(90deg)" href="#couch"/> + + <use style="transform: translate(-14.5px, -16.25px) rotate(29deg)" href="#dresser"/> + <use style="transform: translate(-16.75px, 6.75px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-28.25px, 52px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(23.75px, -38.25px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(32.5px, 21.5px) rotate(-60deg)" href="#dresser"/> + + <use style="transform: translate(-20px, -40px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(40px, -19px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(4.5px, 10.5px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(-11px, 48px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(25px, 48px) rotate(180deg)" href="#desk"/> + + <path id="stairs" style="transform: translate(8px, -16px)" d=" + M -7 -16.3 h 14 v 2.3 h -14 z + m 0 2.75 h 14 v 2.3 h -14 z + m 0 2.75 h 14 v 2.3 h -14 z + m 0 2.75 h 14 v 2.3 h -14 z + m 0 2.75 h 14 v 2.3 h -14 z + m 0 2.75 h 14 v 2.3 h -14 z + m 0 2.75 h 14 v 2.3 h -14 z + "/> + </g> + </g> + <g class="building3" style="transform: translate(51.25px, 456px)"> + <use href="#building3"/> + <g class="furniture"> + <use style="transform: translate(2.25px, 23px)" href="#couch"/> + <use style="transform: translate(6.5px, -14px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-18.5px, -37px)" href="#dresser"/> + <use style="transform: translate(-27px, 37px)" href="#dresser"/> + <use style="transform: translate(-25.5px, -17.75px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(26px, 29.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-13.75px, 16px) rotate(90deg)" href="#desk"/> + </g> + </g> + + <g class="building4" style="transform: translate(499px, 486px)"> + <use style="transform: rotate(180deg)" href="#building4"/> + <g class="furniture"> + <use style="transform: translate(13.5px, 42px)" href="#bed"/> + <use style="transform: translate(-11.5px, 51px)" href="#bed"/> + <use style="transform: translate(-23px, -51px)" href="#desk"/> + <use style="transform: translate(25px, 2.5px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-7px, -29px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(31.5px, -49.25px)" href="#dresser"/> + <use style="transform: translate(29px, -29.25px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(7.5px, -29px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-26.75px, -11px)" href="#dresser"/> + <use style="transform: translate(-28px, 16.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(28.75px, 31.75px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-28px, 48.25px) rotate(90deg)" href="#dresser"/> + </g> + </g> + + <g class="building5" style="transform: translate(103px, 684.75px)"> + <use href="#building5"/> + <g class="furniture"> + <use style="transform: translate(-37px, -17.25px) rotate(90deg)" href="#bed"/> + <use style="transform: translate(22px, -17.25px) rotate(90deg)" href="#bed"/> + <use style="transform: translate(-41.25px, -.5px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-59.75px, 27px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(-9px, 25.5px) rotate(90deg)" href="#desk"/> + <use style="transform: translate(-49.5px, 13.75px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(16.5px, 2.75px)" href="#dresser"/> + <use style="transform: translate(34.75px, 2.75px)" href="#dresser"/> + <use style="transform: translate(29px, 26px)" href="#dresser"/> + <use style="transform: translate(37.5px, -17.25px)" href="#dresser"/> + <use style="transform: translate(48.5px, 14px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(65px, -5.5px)" href="#stairs"/> + </g> + </g> + + <g class="building6" style="transform: translate(224.5px, 665.25px)"> + <use style="transform: rotate(180deg)" href="#building6"/> + <g class="furniture"> + <use style="transform: translate(-9px, 39px)" href="#bed"/> + <use style="transform: translate(.5px, 1px) rotate(90deg)" href="#couch"/> + <use style="transform: translate(14px, 24.75px)" href="#couch"/> + <use style="transform: translate(-10px, -47.75px)" href="#desk"/> + <use style="transform: translate(18.5px, -37.25px)" href="#dresser"/> + <use style="transform: translate(3px, -13.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-11px, -13.5px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(8px, 42.5px)" href="#dresser"/> + </g> + </g> + + <g class="building7" style="transform: translate(419px, 696px)"> + <use href="#building7"/> + <g class="furniture"> + <use style="transform: translate(-99px, -46.75px)" href="#desk"/> + <use style="transform: translate(-106px, 21.25px)" href="#desk"/> + <use style="transform: translate(-46.5px, -57.25px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(-2.5px, -61.5px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(-2px, -41.5px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(-29.5px, 16.25px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(31.25px, 31px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(53.75px, 32.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(68.25px, 28px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(87px, 31.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(102.5px, 23.5px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(103.5px, -2px) rotate(180deg)" href="#desk"/> + <use style="transform: translate(102px, -41.75px) rotate(-90deg)" href="#desk"/> + <use style="transform: translate(101.75px, -59.75px) rotate(90deg)" href="#desk"/> + + <use style="transform: translate(-101.75px, -26.25px) rotate(0deg)" href="#dresser"/> + <use style="transform: translate(-71.5px, -36.75px) rotate(0deg)" href="#dresser"/> + <use style="transform: translate(-59px, -26px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(-62.5px, 17px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(5px, 4.75px)" href="#dresser"/> + <use style="transform: translate(11.5px, 20.25px)" href="#dresser"/> + <use style="transform: translate(46.25px, -32.5px)" href="#dresser"/> + <use style="transform: translate(62.5px, -57px) rotate(90deg)" href="#dresser"/> + <use style="transform: translate(71.5px, -29.25px) rotate(90deg)" href="#dresser"/> + + <path class="stairs" style="transform: translate(33.5px, -63.25px) rotate(-90deg)" d=" + M -5.25 -10.95 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + m 0 3.3 h 10.5 v 3 h -10.5 z + "/> + </g> + </g> </g> + <rect id="dots" fill="url(#asterisk)"/> <g id="firing-arcs"> <g id="shapes"/> <g id="lines"/> @@ -2330,5 +2569,10 @@ </g> </g> </g> + <g id="image-maps" style="opacity: 0.2"> + <image id="map2" class="map-scans" href="scans/map2.jpg" width="2284" height="1518"/> + <image class="map-scans" href="row.jpg" width="2284" height="55" y="1505" /> + <image id="map3" class="map-scans" href="scans/map3.jpg" width="2284" height="1518"/> + </g> <script href="http://localhost:8080/map.js"/> </svg> diff --git a/public/assets/images/map3.svg b/public/assets/images/map3.svg index e7055af..556ad91 100644 --- a/public/assets/images/map3.svg +++ b/public/assets/images/map3.svg @@ -66,9 +66,11 @@ m -42.5 25.5 v 5 m -26.5 1.75 v -5 m -26 -4.5 h -6 m .25 -35 h 5.5 m 104.5 -70 h 11 "/> </g> + + <rect id="background"/> </defs> - <rect id="background"/> + <use href="#background"/> <g id="image-maps"> <image id="map4" class="map-scans" href="scans/map4.jpg" width="2284" height="1518"/> @@ -5,6 +5,7 @@ const gb = svg.querySelector('.gameboard'); const bg = svg.querySelector('#background'); const imageMaps = svg.querySelector('#image-maps'); const grid = gb.querySelector('.grid'); +const dots = gb.querySelector('#dots'); if ('cols' in dataset && 'rows' in dataset) { const cellTemplate = svg.querySelector('#hex'); @@ -18,9 +19,8 @@ bg.style.transform = mtx; const bbox = grid.getBBox(); -bbox.height += 5; - setElAttrs(bg, bbox); +setElAttrs(dots, bbox) svg.setAttribute('viewBox', formatForViewBox(calcComputedBboxFor(gb))); function setElAttrs(el, attrs) { |