index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-06-24 17:32:18 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-06-24 17:32:18 -0700 |
commit | 9b84117250ba980fac8228e94a210228cb786f30 (patch) | |
tree | e3eb2fa03be5d4bcd78c06656ab545d8bf4816ea | |
parent | 05030f7ad690ef2c7eba24df4ae7a6d80491f73f (diff) |
Add building8 structure to mapsheet4
-rw-r--r-- | public/radial.html | 13 | ||||
-rw-r--r-- | src/radial.js | 24 |
2 files changed, 29 insertions, 8 deletions
diff --git a/public/radial.html b/public/radial.html index 20b4bfb..26aa032 100644 --- a/public/radial.html +++ b/public/radial.html @@ -259,8 +259,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" /> @@ -344,6 +344,15 @@ <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> + + <g id="building8" class="building"> + <path id="building8-floor" class="floor" + d="m -90.93,-112.5 h 51.96 l 8.66,15 h 95.26 l 8.66,-15 h 43.3 v 15 l -25.98,45 v 60 h 34.64 v 75 h -43.3 v -30 H 12.99 l -25.98,45 h -103.92 v -90 h 25.98 z" /> + <path id="building8-outer-wall" class="outer-wall" + d="m -90.93,-112.5 h 51.96 l 8.66,15 h 95.26 l 8.66,-15 h 43.3 v 15 l -25.98,45 v 60 h 34.64 v 75 h -43.3 v -30 H 12.99 l -25.98,45 h -103.92 v -90 h 25.98 z m 77.94,30 v 15 h 69.28 v -15 m -86.6,37.5 v 7.5 m 0,-60 V -75 M 73.61,-112.5 V -75 M -90.93,-37.5 H 90.93 m 0,45 H -90.93 m 173.2,45 v -15 h 43.3 m -112.58,0 h -43.3 v 60 m 43.3,-45 v -45 m -69.28,30 h -60.62 m 60.62,30 h -60.62 m 60.62,-60 v 90" /> + <path id="building8-inner-wall" class="inner-wall" + d="m -90.93,-112.5 h 51.96 l 8.66,15 h 95.26 l 8.66,-15 h 43.3 v 15 l -25.98,45 v 60 h 34.64 v 75 h -43.3 v -30 H 12.99 l -25.98,45 h -103.92 v -90 h 25.98 z m 77.94,30 v 15 h 69.28 v -15 m -86.6,37.5 v 7.5 m 0,-60 V -75 M 73.61,-112.5 V -75 M -90.93,-37.5 H 90.93 m 0,45 H -90.93 m 173.2,45 v -15 h 43.3 m -112.58,0 h -43.3 v 60 m 43.3,-45 v -45 m -69.28,30 h -60.62 m 60.62,30 h -60.62 m 60.62,-60 v 90" /> + </g> </defs> <g class="gameboard" data-view-elevation="0"></g> diff --git a/src/radial.js b/src/radial.js index 3e89f23..281c1b4 100644 --- a/src/radial.js +++ b/src/radial.js @@ -453,6 +453,18 @@ let mapsheet30 = { ] }; +let mapsheet40 = { + id: 'mapsheet4', + grid: new Map(mapsheetHexCoords), + buildings: [ + { + type: 'building8', + grid: buildingHexes.bld8, + position: ({ q, r, s }) => ({ q: q + 1, r: r + 1, s: s - 2 }) + }, + ] +} + function rotate180(coords) { return function ({ q, r, s }) { return { @@ -597,7 +609,7 @@ let sheets = []; // sheets = [[mapsheet30]]; -// drawHexes(gameboard, buildingHexes.bld4, true); +// drawHexes(gameboard, buildingHexes.bld8, true); // drawHexes(gameboard, translateCoords(buildingHexes.bld4, rotate180({ q: -9, r: -6, s: 15 })), true); // drawHexes(gameboard, translateCoords(buildingHexes.bld4, rotate180({ q: 0, r: 0, s: 0 })), true); @@ -620,12 +632,12 @@ for (let child of buildingTemplate.children) { // sheets = [[mapsheet20], [mapsheet30]]; // sheets = [[mapsheet20], [mapsheet10], [mapsheet30]]; -sheets = [[mapsheet10]]; +// sheets = [[mapsheet10]]; -// const sheets = [ -// [mapsheet2, mapsheet1], -// [mapsheet3, mapsheet4] -// ]; +sheets = [ + [mapsheet20, mapsheet10], + [mapsheet30, mapsheet40] +]; findScalar(findMult(sheets)).forEach(([vscalar, row]) => { const vertMapVect = function(coords) { |