Web Dev Solutions

Catalin Mititiuc

From 792e4f1eb28aba54e045e5ca79377c22edc57767 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Tue, 25 Jun 2024 10:59:06 -0700 Subject: WIP: hide exits and windows when viewing basement levels --- public/assets/css/radial.css | 18 ++++++++++++++---- public/radial.html | 18 ++++++++++++------ src/radial.js | 10 +++++----- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/public/assets/css/radial.css b/public/assets/css/radial.css index b00df20..9bb0126 100644 --- a/public/assets/css/radial.css +++ b/public/assets/css/radial.css @@ -29,13 +29,18 @@ use[href="#hex"] { display: inline; fill: none; fill-opacity: 1; - stroke: #ff9900; - stroke-width: 2.5; + stroke: white; + stroke-width: 2.25; stroke-linecap: square; stroke-dasharray: none; stroke-opacity: 1; } +.building .door-edges, .building .windows { + stroke: #ff9900; + stroke-width: 2.25; +} + .building .floor, .terrain .floor { opacity: 1; @@ -138,12 +143,17 @@ use[href="#hex"] { display: none; } -[data-view-elevation="-1"] .building > * { +[data-view-elevation="-1"] .building > *, +[data-view-elevation="-1"] .building > .structure > * { display: none; } [data-view-elevation="-1"] .building > .elevation-basement, -[data-view-elevation="-1"] .building > .elevation-basement ~ .structure { +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure, +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure [class*="wall"], +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure .floor, +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure .doors:not(.exits), +[data-view-elevation="-1"] .building > .elevation-basement ~ .structure .door-edges:not(.exits) { display: inline; } diff --git a/public/radial.html b/public/radial.html index 96dd569..c8502d2 100644 --- a/public/radial.html +++ b/public/radial.html @@ -7,8 +7,8 @@ - - + + @@ -35,13 +35,19 @@ + d="m 38.97,67.500001 17.32,-30 V -7.5 L 38.97,-37.500001 v -30 h -77.94 v 30 L -56.29,-7.5 v 45.000001 l 17.32,30 z" /> + d="M -21.65,67.500001 V 7.5000022 M -4.3299999,-67.500001 v 30 M 17.32,15.000001 4.3300001,7.5000022 M 56.29,37.500001 l -12.99,-7.5 M 4.3300001,-37.500001 V 7.5000022 H -56.29 M -38.97,-37.500001 H 38.97 M -30.31,67.500001 h 69.28 l 17.32,-30 V -7.5 L 38.97,-37.500001 v -30 h -77.94 v 30 L -56.29,-7.5 v 45.000001 l 17.32,30 z" /> + d="M -21.65,67.500001 V 7.5000022 M -4.3299999,-67.500001 v 30 M 17.32,15.000001 4.3300001,7.5000022 M 56.29,37.500001 l -12.99,-7.5 M 4.3300001,-37.500001 V 7.5000022 H -56.29 M -38.97,-37.500001 H 38.97 M -30.31,67.500001 h 69.28 l 17.32,-30 V -7.5 L 38.97,-37.500001 v -30 h -77.94 v 30 L -56.29,-7.5 v 45.000001 l 17.32,30 z" /> + + + + + d="m -12.989997,7.5000022 h 8.6600001 m -34.6400001,0 h 8.66 m 8.66,-45.0000032 h 8.66 m 34.639997,0 h 8.66" /> diff --git a/src/radial.js b/src/radial.js index 92e2ae9..aea4d4a 100644 --- a/src/radial.js +++ b/src/radial.js @@ -634,14 +634,14 @@ function findScalar(arr) { let sheets = []; // sheets = [[mapsheet1]]; -// sheets = [[mapsheet3]]; +sheets = [[mapsheet3]]; // sheets = [[mapsheet2], [mapsheet3]]; // sheets = [[mapsheet2], [mapsheet1], [mapsheet3]]; -sheets = [ - [mapsheet2, mapsheet1], - [mapsheet3, mapsheet4] -]; +// sheets = [ +// [mapsheet2, mapsheet1], +// [mapsheet3, mapsheet4] +// ]; findScalar(findMult(sheets)).forEach(([vscalar, row]) => { const vertMapVect = function(coords) { -- cgit v1.2.3