From 3b641620ab6c2fdfa6b551c019e44726064029c5 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Sat, 18 May 2024 16:26:59 -0700
Subject: Add furniture
---
public/assets/css/map.css | 7 +-
public/assets/images/map1.svg | 372 ++++++++++++++++++++++++++++++++++--------
public/assets/images/map3.svg | 4 +-
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);
}
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -133,19 +132,6 @@
M 2.25 42.75 V 50.75
M -0.75 -62.25 H 11.25
"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -189,20 +175,6 @@
M -9.5 5.5 H -4
M -3.5 60.5 H 8
"/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -462,34 +434,301 @@
"/>
-
+
+
+
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2330,5 +2569,10 @@
+
+
+
+
+
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
"/>
+
+
-
+
diff --git a/src/map.js b/src/map.js
index e5c9cd4..e82e809 100644
--- a/src/map.js
+++ b/src/map.js
@@ -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) {
--
cgit v1.2.3