Web Dev Solutions

Catalin Mititiuc

From 9b84117250ba980fac8228e94a210228cb786f30 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Mon, 24 Jun 2024 17:32:18 -0700 Subject: Add building8 structure to mapsheet4 --- public/radial.html | 13 +++++++++++-- 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 @@ - - + + @@ -344,6 +344,15 @@ + + + + + + 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) { -- cgit v1.2.3