WIP: dynamically add references to scenario svg

This commit is contained in:
2025-06-16 22:41:31 -07:00
parent df809ab174
commit cea0cecc5f
4 changed files with 168 additions and 68 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" standalone="no"?>
<svg viewBox="-15.639999389648438 -109 2320.879638671875 3280" xmlns="http://www.w3.org/2000/svg">
<svg viewBox="-10 -10 200 300" xmlns="http://www.w3.org/2000/svg">
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" href="../css/map.css" type="text/css" />
<style>
g[data-edge="north"] { --i: -2; }
@@ -44,34 +44,34 @@
<use x="-8.66" style="transform-origin: -8.66px 0;" class="ccw-60-deg" href="#ast-line"/>
</pattern>
<circle id="counter-base" style="r: inherit;" cx="0" cy="0" r="5"/>
<circle id="counter-base" style="r: inherit; stroke: none;" cx="0" cy="0" r="5"/>
<g style="r: inherit;" id="number-1">
<use style="r: inherit;" href="#counter-base"/>
<text style="fill: var(--text-fill); transform: translateY(var(--translateY))">1</text>
</g>
<g style="r: inherit;" id="number-2">
<use style="r: inherit;" href="#counter-base"/>
<g id="number-2">
<use href="#counter-base"/>
<text style="fill: var(--text-fill); transform: translateY(var(--translateY))">2</text>
</g>
<g style="r: inherit;" id="number-3">
<use style="r: inherit;" href="#counter-base"/>
<g id="number-3">
<use href="#counter-base"/>
<text style="fill: var(--text-fill); transform: translateY(var(--translateY))">3</text>
</g>
<g style="r: inherit;" id="number-4">
<use style="r: inherit;" href="#counter-base"/>
<g id="number-4">
<use href="#counter-base"/>
<text style="fill: var(--text-fill); transform: translateY(var(--translateY))">4</text>
</g>
<g style="r: inherit;" id="number-5">
<use style="r: inherit;" href="#counter-base"/>
<g id="number-5">
<use href="#counter-base"/>
<text style="fill: var(--text-fill); transform: translateY(var(--translateY))">5</text>
</g>
<g style="r: inherit;" id="number-6">
<use style="r: inherit;" href="#counter-base"/>
<g id="number-6">
<use href="#counter-base"/>
<text style="fill: var(--text-fill); transform: translateY(var(--translateY))">6</text>
</g>
<g style="r: inherit;" id="number-7">
<use style="r: inherit;" href="#counter-base"/>
<g id="number-7">
<use href="#counter-base"/>
<text style="fill: var(--text-fill); transform: translateY(var(--translateY))">7</text>
</g>
@@ -109,25 +109,13 @@
<image id="counter-prone" href="counter_prone.jpg" width="10"/>
<image id="counter-grenade" href="counter_grenade.jpg" width="10"/>
<image id="numbers" href="rendered_numbers.png" width="182" height="22"/>
<symbol id="n1" viewBox="1 0 17 22" width="17" height="22"><use href="#numbers"/></symbol>
<symbol id="n2" viewBox="19 0 16 22" width="16" height="22"><use href="#numbers"/></symbol>
<symbol id="n3" viewBox="36 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
<symbol id="n4" viewBox="54 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
<symbol id="n5" viewBox="0 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
<symbol id="n6" viewBox="0 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
<symbol id="n7" viewBox="0 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
<symbol id="n8" viewBox="0 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
<symbol id="n9" viewBox="0 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
<symbol id="n0" viewBox="0 0 18 22" width="18" height="22"><use href="#numbers"/></symbol>
</defs>
<rect id="background"/>
<g class="gameboard">
<use data-href="mapsheets.svg#map2"/>
<use data-href="mapsheets.svg#map3" style="transform: translate(0, 390.25px);"/>
<use href="mapsheets.svg#map2"/>
<use href="mapsheets.svg#map3" style="transform: translate(0, 390.25px);"/>
<rect id="dots" fill="url(#asterisk)"/>

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 86 KiB