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-07-16 18:57:47 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-16 18:57:47 -0700 |
commit | e2f6fbe291c10d4ae2a512ea1fb91cbc787fafa6 (patch) | |
tree | 7028df4ae09c2329f62681a453e31e01512d8281 | |
parent | 5483d4603b295fcfe6e7e024d3e91f21eef4b55c (diff) |
WIP: add fallen mech and vehicle templates
-rw-r--r-- | public/assets/images/counters.svg | 14 | ||||
-rw-r--r-- | public/assets/images/map4.svg | 3 | ||||
-rw-r--r-- | src/modules/gameboard.js | 18 |
3 files changed, 29 insertions, 6 deletions
diff --git a/public/assets/images/counters.svg b/public/assets/images/counters.svg index bf91f9f..ab525d9 100644 --- a/public/assets/images/counters.svg +++ b/public/assets/images/counters.svg @@ -81,7 +81,7 @@ <use href="#direction-arrow" fill="black" transform="rotate(-60)"/> </mask> <g id="mech-template-lower" class="lower-body" transform="rotate(0)"> - <g class="feet" style="fill: black; fill-opacity: 0.5;"> + <g class="feet" style="fill: #706680; fill-opacity: 1;"> <rect id="foot" class="left" x="-16.25" y="5.75" width="34.5" height="12.25" mask="url(#foot-mask)"/> <rect class="right" x="-16.25" y="5.75" width="34.5" height="12.25" mask="url(#foot-mask)" transform="scale(1 -1)"/> </g> @@ -127,4 +127,16 @@ <line x1="-31" y1="0" x2="-26" y2="0"/> </g> </g> + + <g id="standing-mech-template"> + <image href="counter-sheet-mech-template.png" opacity="0.5" width="74.5" height="74.5" transform="translate(-37.25 -37.25)"/> + </g> + + <g id="fallen-mech-template"> + <image href="counter-sheet-fallen-mech-template.png" opacity="0.5" width="66" height="26.5" transform="translate(-25 -13.25)"/> + </g> + + <g id="vehicle-template"> + <image href="counter-sheet-vehicle-template.png" opacity="0.5" width="74.5" height="57.5" transform="translate(-37.25 -28.75)"/> + </g> </svg> diff --git a/public/assets/images/map4.svg b/public/assets/images/map4.svg index 2969ca9..2603ed5 100644 --- a/public/assets/images/map4.svg +++ b/public/assets/images/map4.svg @@ -43,6 +43,9 @@ </g> </g> <use href="counters.svg#mech-template"/> + <use href="counters.svg#fallen-mech-template"/> + <use href="counters.svg#standing-mech-template"/> + <use href="counters.svg#vehicle-template"/> </defs> <g class="gameboard"> diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js index d35b2b9..538ff92 100644 --- a/src/modules/gameboard.js +++ b/src/modules/gameboard.js @@ -398,15 +398,23 @@ export function start(el) { arcs.append(leftArc); mech.append(arcs); - const cell = getCell(-4, 6, -2, 0); + //const cell = getCell(-4, 6, -2, 0); //cell.append(mask); //cell.append(mech); - const mechTemplate = document.createElementNS(svgns, 'use'); - mechTemplate.setAttribute('href', '#mech-template'); - cell.append(mechTemplate); - console.log(cell); + //const pt = document.createElementNS(svgns, 'circle'); + //pt.setAttributeNS(null, 'r', 3); + //pt.setAttributeNS(null, 'fill', 'lime'); + //pt.setAttributeNS(null, 'fill-opacity', 0.5); + + //const mechTemplate = document.createElementNS(svgns, 'use'); + //mechTemplate.setAttributeNS(null, 'href', '#fallen-mech-template'); + //mechTemplate.setAttribute('href', '#standing-mech-template'); + //mechTemplate.setAttributeNS(null, 'href', '#vehicle-template'); + //cell.append(pt); + //cell.append(mechTemplate); + //console.log(cell); /////////// Observable.subscribe('select', select); |