This commit is contained in:
Aotumuri
2025-06-01 21:51:45 +09:00
parent 656a820123
commit 938e8b71a6
3 changed files with 8 additions and 5 deletions
+3 -3
View File
@@ -9,15 +9,15 @@
}, },
"pattern": { "pattern": {
"stripes_v": { "stripes_v": {
"pattern": "ARAIBQ==", "pattern": "ASQQVVU=",
"role_group": ["all"] "role_group": ["all"]
}, },
"stripes_h": { "stripes_h": {
"pattern": "ARAIAw==", "pattern": "ASQQDw8=",
"role_group": ["all"] "role_group": ["all"]
}, },
"checkerboard": { "checkerboard": {
"pattern": "ARAICQ==", "pattern": "ASQQpaU=",
"role_group": ["all"] "role_group": ["all"]
}, },
"diagonal": { "diagonal": {
+1 -1
View File
@@ -51,7 +51,7 @@ export class PatternDecoder {
height > 63 height > 63
) { ) {
throw new Error( throw new Error(
"Scale must be 1128, width must be 1127, and height must be 163.", `Invalid pattern metadata: scale (log₂)=${scale}, width=${width}, height=${height}. Expected: scale 07, width 1127, height 163.`,
); );
} }
+4 -1
View File
@@ -219,7 +219,10 @@ export class TerritoryPatternsModal extends LitElement {
const cellCountX = decoder.getTileWidth(); const cellCountX = decoder.getTileWidth();
const cellCountY = decoder.getTileHeight(); const cellCountY = decoder.getTileHeight();
const cellSize = Math.min(height / cellCountY, width / cellCountX); const cellSize =
cellCountX > 0 && cellCountY > 0
? Math.min(height / cellCountY, width / cellCountX)
: 1;
return html` return html`
<div <div