@industry-theme/repository-composition-panels 0.6.30 → 0.6.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BufferResource-BBok61RS.js → BufferResource-Dski1EZQ.js} +2 -2
- package/dist/{BufferResource-BBok61RS.js.map → BufferResource-Dski1EZQ.js.map} +1 -1
- package/dist/{CanvasRenderer-ChUHHBzp.js → CanvasRenderer--e2h72qI.js} +3 -3
- package/dist/{CanvasRenderer-ChUHHBzp.js.map → CanvasRenderer--e2h72qI.js.map} +1 -1
- package/dist/{Filter-CIW5VDE6.js → Filter-BZX7p5SC.js} +2 -2
- package/dist/{Filter-CIW5VDE6.js.map → Filter-BZX7p5SC.js.map} +1 -1
- package/dist/{RenderTargetSystem-DHo9fiqa.js → RenderTargetSystem-CTgCs7jw.js} +3 -3
- package/dist/{RenderTargetSystem-DHo9fiqa.js.map → RenderTargetSystem-CTgCs7jw.js.map} +1 -1
- package/dist/{WebGLRenderer-9uzpEisE.js → WebGLRenderer-BSys64oZ.js} +4 -4
- package/dist/{WebGLRenderer-9uzpEisE.js.map → WebGLRenderer-BSys64oZ.js.map} +1 -1
- package/dist/{WebGPURenderer-Bjpg8hkG.js → WebGPURenderer-BcDZvCNz.js} +4 -4
- package/dist/{WebGPURenderer-Bjpg8hkG.js.map → WebGPURenderer-BcDZvCNz.js.map} +1 -1
- package/dist/{browserAll-B0PE4Ly2.js → browserAll-DI7lMMAJ.js} +3 -3
- package/dist/{browserAll-B0PE4Ly2.js.map → browserAll-DI7lMMAJ.js.map} +1 -1
- package/dist/{index-B5obJmUS.js → index-CBrdpzxz.js} +970 -28
- package/dist/{index-B5obJmUS.js.map → index-CBrdpzxz.js.map} +1 -1
- package/dist/{init-BE3Rk_Ji.js → init-DzaJL8I_.js} +3 -3
- package/dist/{init-BE3Rk_Ji.js.map → init-DzaJL8I_.js.map} +1 -1
- package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/LayoutEngineTest.d.ts +1 -0
- package/dist/panels/overworld-map/LayoutEngineTest.d.ts.map +1 -1
- package/dist/panels/overworld-map/LicenseSignTest.d.ts +7 -0
- package/dist/panels/overworld-map/LicenseSignTest.d.ts.map +1 -0
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts +4 -0
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/licenseSignSprites.d.ts +122 -0
- package/dist/panels/overworld-map/components/licenseSignSprites.d.ts.map +1 -0
- package/dist/panels/overworld-map/genericMapper.d.ts +1 -0
- package/dist/panels/overworld-map/genericMapper.d.ts.map +1 -1
- package/dist/panels/overworld-map/types.d.ts +1 -0
- package/dist/panels/overworld-map/types.d.ts.map +1 -1
- package/dist/panels.bundle.js +1 -1
- package/dist/webworkerAll-BDQrDn0n.js +3 -0
- package/dist/webworkerAll-BDQrDn0n.js.map +1 -0
- package/package.json +1 -1
- package/dist/panels/overworld-map/IsometricGridTest.d.ts +0 -15
- package/dist/panels/overworld-map/IsometricGridTest.d.ts.map +0 -1
- package/dist/webworkerAll-BBVbOe1V.js +0 -3
- package/dist/webworkerAll-BBVbOe1V.js.map +0 -1
|
@@ -106176,7 +106176,7 @@ const browserExt = {
|
|
|
106176
106176
|
},
|
|
106177
106177
|
test: () => true,
|
|
106178
106178
|
load: async () => {
|
|
106179
|
-
await import("./browserAll-
|
|
106179
|
+
await import("./browserAll-DI7lMMAJ.js");
|
|
106180
106180
|
}
|
|
106181
106181
|
};
|
|
106182
106182
|
const webworkerExt = {
|
|
@@ -106187,7 +106187,7 @@ const webworkerExt = {
|
|
|
106187
106187
|
},
|
|
106188
106188
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
106189
106189
|
load: async () => {
|
|
106190
|
-
await import("./webworkerAll-
|
|
106190
|
+
await import("./webworkerAll-BDQrDn0n.js");
|
|
106191
106191
|
}
|
|
106192
106192
|
};
|
|
106193
106193
|
class ObservablePoint {
|
|
@@ -118430,19 +118430,19 @@ async function autoDetectRenderer(options) {
|
|
|
118430
118430
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
118431
118431
|
const rendererType = preferredOrder[i2];
|
|
118432
118432
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
118433
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
118433
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-BcDZvCNz.js");
|
|
118434
118434
|
RendererClass = WebGPURenderer;
|
|
118435
118435
|
finalOptions = { ...options, ...options.webgpu };
|
|
118436
118436
|
break;
|
|
118437
118437
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
118438
118438
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
118439
118439
|
)) {
|
|
118440
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
118440
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-BSys64oZ.js");
|
|
118441
118441
|
RendererClass = WebGLRenderer;
|
|
118442
118442
|
finalOptions = { ...options, ...options.webgl };
|
|
118443
118443
|
break;
|
|
118444
118444
|
} else if (rendererType === "canvas") {
|
|
118445
|
-
const { CanvasRenderer } = await import("./CanvasRenderer
|
|
118445
|
+
const { CanvasRenderer } = await import("./CanvasRenderer--e2h72qI.js");
|
|
118446
118446
|
RendererClass = CanvasRenderer;
|
|
118447
118447
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
118448
118448
|
break;
|
|
@@ -132920,6 +132920,834 @@ function domEventToGridCoords(clientX, clientY, viewport, canvasElement) {
|
|
|
132920
132920
|
const gridCoords = screenToGrid(worldPoint.x, worldPoint.y);
|
|
132921
132921
|
return gridCoords;
|
|
132922
132922
|
}
|
|
132923
|
+
const TILE_WIDTH = ISO_TILE_WIDTH$1;
|
|
132924
|
+
const TILE_HEIGHT = ISO_TILE_HEIGHT$1;
|
|
132925
|
+
function calculateFootprint(sizeMultiplier) {
|
|
132926
|
+
const tiles = 4 * sizeMultiplier;
|
|
132927
|
+
return {
|
|
132928
|
+
tiles,
|
|
132929
|
+
width: tiles * TILE_WIDTH / 2,
|
|
132930
|
+
height: tiles * TILE_HEIGHT / 2
|
|
132931
|
+
};
|
|
132932
|
+
}
|
|
132933
|
+
const COLORS = {
|
|
132934
|
+
// Wood colors
|
|
132935
|
+
woodDark: 6111287,
|
|
132936
|
+
woodMedium: 7951688,
|
|
132937
|
+
woodLight: 9268835,
|
|
132938
|
+
// Flower/vine colors (MIT - welcoming, open)
|
|
132939
|
+
flowerPink: 16738740,
|
|
132940
|
+
flowerPinkDark: 14381203,
|
|
132941
|
+
flowerYellow: 16766720,
|
|
132942
|
+
leafGreen: 2263842,
|
|
132943
|
+
leafGreenLight: 3329330,
|
|
132944
|
+
vineGreen: 3050327,
|
|
132945
|
+
// Grass colors
|
|
132946
|
+
grassLight: 9498256,
|
|
132947
|
+
grassMedium: 3329330,
|
|
132948
|
+
grassDark: 2263842
|
|
132949
|
+
};
|
|
132950
|
+
function generateMITFlowerArch(config) {
|
|
132951
|
+
const { name: name2, sizeMultiplier, archWidth: customArchWidth } = config;
|
|
132952
|
+
const container = new Container();
|
|
132953
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
132954
|
+
const archWidth = customArchWidth ?? footprint.width * 0.5;
|
|
132955
|
+
const scale = archWidth / 80;
|
|
132956
|
+
const postWidth = Math.max(3, 4 * scale);
|
|
132957
|
+
const postHeight = Math.max(25, 35 * scale);
|
|
132958
|
+
const archHeight = postHeight + 4 * scale;
|
|
132959
|
+
const graphics = new Graphics();
|
|
132960
|
+
graphics.rect(-archWidth / 2, -postHeight, postWidth, postHeight);
|
|
132961
|
+
graphics.fill(COLORS.woodMedium);
|
|
132962
|
+
graphics.rect(-archWidth / 2, -postHeight, Math.max(1, scale), postHeight);
|
|
132963
|
+
graphics.fill(COLORS.woodLight);
|
|
132964
|
+
graphics.rect(
|
|
132965
|
+
-archWidth / 2 + postWidth - Math.max(1, scale),
|
|
132966
|
+
-postHeight,
|
|
132967
|
+
Math.max(1, scale),
|
|
132968
|
+
postHeight
|
|
132969
|
+
);
|
|
132970
|
+
graphics.fill(COLORS.woodDark);
|
|
132971
|
+
graphics.rect(archWidth / 2 - postWidth, -postHeight, postWidth, postHeight);
|
|
132972
|
+
graphics.fill(COLORS.woodMedium);
|
|
132973
|
+
graphics.rect(
|
|
132974
|
+
archWidth / 2 - postWidth,
|
|
132975
|
+
-postHeight,
|
|
132976
|
+
Math.max(1, scale),
|
|
132977
|
+
postHeight
|
|
132978
|
+
);
|
|
132979
|
+
graphics.fill(COLORS.woodLight);
|
|
132980
|
+
graphics.rect(
|
|
132981
|
+
archWidth / 2 - Math.max(1, scale),
|
|
132982
|
+
-postHeight,
|
|
132983
|
+
Math.max(1, scale),
|
|
132984
|
+
postHeight
|
|
132985
|
+
);
|
|
132986
|
+
graphics.fill(COLORS.woodDark);
|
|
132987
|
+
const crossbarHeight = Math.max(3, 4 * scale);
|
|
132988
|
+
graphics.rect(-archWidth / 2, -archHeight, archWidth, crossbarHeight);
|
|
132989
|
+
graphics.fill(COLORS.woodMedium);
|
|
132990
|
+
graphics.rect(-archWidth / 2, -archHeight, archWidth, Math.max(1, scale));
|
|
132991
|
+
graphics.fill(COLORS.woodLight);
|
|
132992
|
+
graphics.rect(
|
|
132993
|
+
-archWidth / 2,
|
|
132994
|
+
-archHeight + crossbarHeight - Math.max(1, scale),
|
|
132995
|
+
archWidth,
|
|
132996
|
+
Math.max(1, scale)
|
|
132997
|
+
);
|
|
132998
|
+
graphics.fill(COLORS.woodDark);
|
|
132999
|
+
const flagWidth = archWidth * 0.5;
|
|
133000
|
+
const flagHeight = Math.max(18, 24 * scale);
|
|
133001
|
+
const flagTop = -postHeight + 2 * scale;
|
|
133002
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, flagHeight);
|
|
133003
|
+
graphics.fill(9498256);
|
|
133004
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, Math.max(1, scale));
|
|
133005
|
+
graphics.fill(8244349);
|
|
133006
|
+
graphics.rect(
|
|
133007
|
+
-flagWidth / 2,
|
|
133008
|
+
flagTop + flagHeight - Math.max(1, scale),
|
|
133009
|
+
flagWidth,
|
|
133010
|
+
Math.max(1, scale)
|
|
133011
|
+
);
|
|
133012
|
+
graphics.fill(7059563);
|
|
133013
|
+
graphics.rect(-flagWidth / 2, flagTop, Math.max(1, scale), flagHeight);
|
|
133014
|
+
graphics.fill(8244349);
|
|
133015
|
+
graphics.rect(
|
|
133016
|
+
flagWidth / 2 - Math.max(1, scale),
|
|
133017
|
+
flagTop,
|
|
133018
|
+
Math.max(1, scale),
|
|
133019
|
+
flagHeight
|
|
133020
|
+
);
|
|
133021
|
+
graphics.fill(7059563);
|
|
133022
|
+
const vineSize = Math.max(2, 3 * scale);
|
|
133023
|
+
const vinePositions = [
|
|
133024
|
+
{ x: -archWidth / 2 - 2 * scale, y: -postHeight * 0.9 },
|
|
133025
|
+
{ x: -archWidth / 2 - 1 * scale, y: -postHeight * 0.6 },
|
|
133026
|
+
{ x: -archWidth / 2 + 1 * scale, y: -postHeight * 0.4 },
|
|
133027
|
+
{ x: -archWidth / 2 - 2 * scale, y: -postHeight * 0.2 }
|
|
133028
|
+
];
|
|
133029
|
+
for (const pos of vinePositions) {
|
|
133030
|
+
graphics.rect(pos.x, pos.y, vineSize, vineSize * 0.66);
|
|
133031
|
+
graphics.fill(COLORS.vineGreen);
|
|
133032
|
+
}
|
|
133033
|
+
const rightVinePositions = [
|
|
133034
|
+
{ x: archWidth / 2 - 1 * scale, y: -postHeight * 0.8 },
|
|
133035
|
+
{ x: archWidth / 2 + 1 * scale, y: -postHeight * 0.5 },
|
|
133036
|
+
{ x: archWidth / 2 - 2 * scale, y: -postHeight * 0.3 },
|
|
133037
|
+
{ x: archWidth / 2, y: -postHeight * 0.1 }
|
|
133038
|
+
];
|
|
133039
|
+
for (const pos of rightVinePositions) {
|
|
133040
|
+
graphics.rect(pos.x, pos.y, vineSize, vineSize * 0.66);
|
|
133041
|
+
graphics.fill(COLORS.vineGreen);
|
|
133042
|
+
}
|
|
133043
|
+
const flowerCount = Math.max(4, Math.floor(6 * scale));
|
|
133044
|
+
const flowerSpacing = archWidth / (flowerCount + 1);
|
|
133045
|
+
const flowerSize = Math.max(3, 4 * scale);
|
|
133046
|
+
for (let i2 = 0; i2 < flowerCount; i2++) {
|
|
133047
|
+
const fx = -archWidth / 2 + flowerSpacing * (i2 + 1);
|
|
133048
|
+
const flowerColor = i2 % 2 === 0 ? COLORS.flowerPink : COLORS.flowerYellow;
|
|
133049
|
+
graphics.rect(
|
|
133050
|
+
fx - flowerSize * 0.5,
|
|
133051
|
+
-flowerSize - 2 * scale,
|
|
133052
|
+
flowerSize * 0.5,
|
|
133053
|
+
flowerSize * 0.5
|
|
133054
|
+
);
|
|
133055
|
+
graphics.fill(COLORS.leafGreen);
|
|
133056
|
+
graphics.rect(
|
|
133057
|
+
fx + flowerSize * 0.25,
|
|
133058
|
+
-flowerSize - 1 * scale,
|
|
133059
|
+
flowerSize * 0.5,
|
|
133060
|
+
flowerSize * 0.5
|
|
133061
|
+
);
|
|
133062
|
+
graphics.fill(COLORS.leafGreenLight);
|
|
133063
|
+
graphics.rect(fx - flowerSize * 0.5, -flowerSize, flowerSize, flowerSize);
|
|
133064
|
+
graphics.fill(flowerColor);
|
|
133065
|
+
graphics.rect(
|
|
133066
|
+
fx - flowerSize * 0.25,
|
|
133067
|
+
-flowerSize * 0.75,
|
|
133068
|
+
flowerSize * 0.5,
|
|
133069
|
+
flowerSize * 0.5
|
|
133070
|
+
);
|
|
133071
|
+
graphics.fill(COLORS.flowerYellow);
|
|
133072
|
+
}
|
|
133073
|
+
const cornerFlowerSize = Math.max(4, 5 * scale);
|
|
133074
|
+
graphics.rect(
|
|
133075
|
+
-archWidth / 2 - cornerFlowerSize * 0.3,
|
|
133076
|
+
-cornerFlowerSize,
|
|
133077
|
+
cornerFlowerSize,
|
|
133078
|
+
cornerFlowerSize
|
|
133079
|
+
);
|
|
133080
|
+
graphics.fill(COLORS.flowerPink);
|
|
133081
|
+
graphics.rect(
|
|
133082
|
+
-archWidth / 2 - cornerFlowerSize * 0.1,
|
|
133083
|
+
-cornerFlowerSize * 0.8,
|
|
133084
|
+
cornerFlowerSize * 0.6,
|
|
133085
|
+
cornerFlowerSize * 0.6
|
|
133086
|
+
);
|
|
133087
|
+
graphics.fill(COLORS.flowerPinkDark);
|
|
133088
|
+
graphics.rect(
|
|
133089
|
+
archWidth / 2 - cornerFlowerSize * 0.7,
|
|
133090
|
+
-cornerFlowerSize,
|
|
133091
|
+
cornerFlowerSize,
|
|
133092
|
+
cornerFlowerSize
|
|
133093
|
+
);
|
|
133094
|
+
graphics.fill(COLORS.flowerPink);
|
|
133095
|
+
graphics.rect(
|
|
133096
|
+
archWidth / 2 - cornerFlowerSize * 0.5,
|
|
133097
|
+
-cornerFlowerSize * 0.8,
|
|
133098
|
+
cornerFlowerSize * 0.6,
|
|
133099
|
+
cornerFlowerSize * 0.6
|
|
133100
|
+
);
|
|
133101
|
+
graphics.fill(COLORS.flowerPinkDark);
|
|
133102
|
+
container.addChild(graphics);
|
|
133103
|
+
const mitFontSize = Math.max(10, 14 * scale);
|
|
133104
|
+
const mitText = new Text({
|
|
133105
|
+
text: "MIT",
|
|
133106
|
+
style: {
|
|
133107
|
+
fontSize: mitFontSize,
|
|
133108
|
+
fill: 2263842,
|
|
133109
|
+
// Forest green text
|
|
133110
|
+
fontFamily: "Arial",
|
|
133111
|
+
fontWeight: "bold"
|
|
133112
|
+
},
|
|
133113
|
+
resolution: 2
|
|
133114
|
+
});
|
|
133115
|
+
mitText.anchor.set(0.5, 0.5);
|
|
133116
|
+
mitText.y = flagTop + flagHeight * 0.5;
|
|
133117
|
+
container.addChild(mitText);
|
|
133118
|
+
const signBoard = new Graphics();
|
|
133119
|
+
const fontSize = Math.max(8, 9 * scale);
|
|
133120
|
+
const estimatedTextWidth = name2.length * fontSize * 0.6;
|
|
133121
|
+
const signWidth = Math.min(
|
|
133122
|
+
estimatedTextWidth + 16 * scale,
|
|
133123
|
+
archWidth - 8 * scale
|
|
133124
|
+
);
|
|
133125
|
+
const signHeight = Math.max(8, 10 * scale);
|
|
133126
|
+
const signBoardY = -archHeight - signHeight - 2 * scale;
|
|
133127
|
+
signBoard.rect(-signWidth / 2, signBoardY, signWidth, signHeight);
|
|
133128
|
+
signBoard.fill(COLORS.woodLight);
|
|
133129
|
+
signBoard.rect(-signWidth / 2, signBoardY, signWidth, Math.max(1, scale));
|
|
133130
|
+
signBoard.fill(COLORS.woodMedium);
|
|
133131
|
+
signBoard.rect(
|
|
133132
|
+
-signWidth / 2,
|
|
133133
|
+
signBoardY + signHeight - Math.max(1, scale),
|
|
133134
|
+
signWidth,
|
|
133135
|
+
Math.max(1, scale)
|
|
133136
|
+
);
|
|
133137
|
+
signBoard.fill(COLORS.woodDark);
|
|
133138
|
+
container.addChild(signBoard);
|
|
133139
|
+
const nameText = new Text({
|
|
133140
|
+
text: name2,
|
|
133141
|
+
style: {
|
|
133142
|
+
fontSize,
|
|
133143
|
+
fill: 4073251,
|
|
133144
|
+
// Dark brown text
|
|
133145
|
+
fontFamily: "Arial",
|
|
133146
|
+
fontWeight: "600"
|
|
133147
|
+
},
|
|
133148
|
+
resolution: 2
|
|
133149
|
+
});
|
|
133150
|
+
nameText.anchor.set(0.5, 0.5);
|
|
133151
|
+
nameText.y = signBoardY + signHeight / 2;
|
|
133152
|
+
container.addChild(nameText);
|
|
133153
|
+
return container;
|
|
133154
|
+
}
|
|
133155
|
+
function generateOpenGrassGround(sizeMultiplier) {
|
|
133156
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133157
|
+
const grass = new Graphics();
|
|
133158
|
+
const halfW = footprint.width;
|
|
133159
|
+
const halfH = footprint.height;
|
|
133160
|
+
grass.moveTo(0, -halfH);
|
|
133161
|
+
grass.lineTo(halfW, 0);
|
|
133162
|
+
grass.lineTo(0, halfH);
|
|
133163
|
+
grass.lineTo(-halfW, 0);
|
|
133164
|
+
grass.closePath();
|
|
133165
|
+
grass.fill(COLORS.grassMedium);
|
|
133166
|
+
const textureCount = Math.max(6, Math.floor(8 * sizeMultiplier));
|
|
133167
|
+
for (let i2 = 0; i2 < textureCount; i2++) {
|
|
133168
|
+
const angle = i2 / textureCount * Math.PI * 2;
|
|
133169
|
+
const radius = 0.3 + i2 % 3 * 0.15;
|
|
133170
|
+
const x2 = Math.cos(angle) * halfW * radius;
|
|
133171
|
+
const y2 = Math.sin(angle) * halfH * radius;
|
|
133172
|
+
const dotSize = Math.max(1.5, 2 * sizeMultiplier);
|
|
133173
|
+
grass.circle(x2, y2, dotSize);
|
|
133174
|
+
grass.fill(i2 % 2 === 0 ? COLORS.grassLight : COLORS.grassDark);
|
|
133175
|
+
}
|
|
133176
|
+
const flowerSize = Math.max(1, 1.5 * sizeMultiplier);
|
|
133177
|
+
const flowerSpots = [
|
|
133178
|
+
{ x: -halfW * 0.5, y: -halfH * 0.2 },
|
|
133179
|
+
{ x: halfW * 0.4, y: halfH * 0.3 },
|
|
133180
|
+
{ x: -halfW * 0.2, y: halfH * 0.4 },
|
|
133181
|
+
{ x: halfW * 0.3, y: -halfH * 0.35 }
|
|
133182
|
+
];
|
|
133183
|
+
for (const spot of flowerSpots) {
|
|
133184
|
+
grass.circle(spot.x, spot.y, flowerSize);
|
|
133185
|
+
grass.fill(COLORS.flowerPink);
|
|
133186
|
+
}
|
|
133187
|
+
return grass;
|
|
133188
|
+
}
|
|
133189
|
+
function generateApacheSign(config) {
|
|
133190
|
+
const { name: name2, sizeMultiplier, archWidth: customArchWidth } = config;
|
|
133191
|
+
const container = new Container();
|
|
133192
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133193
|
+
const archWidth = customArchWidth ?? footprint.width * 0.5;
|
|
133194
|
+
const scale = archWidth / 80;
|
|
133195
|
+
const graphics = new Graphics();
|
|
133196
|
+
const postWidth = Math.max(3, 4 * scale);
|
|
133197
|
+
const postHeight = Math.max(25, 35 * scale);
|
|
133198
|
+
graphics.rect(-archWidth / 2, -postHeight, postWidth, postHeight);
|
|
133199
|
+
graphics.fill(COLORS.woodMedium);
|
|
133200
|
+
graphics.rect(-archWidth / 2, -postHeight, Math.max(1, scale), postHeight);
|
|
133201
|
+
graphics.fill(COLORS.woodLight);
|
|
133202
|
+
graphics.rect(
|
|
133203
|
+
-archWidth / 2 + postWidth - Math.max(1, scale),
|
|
133204
|
+
-postHeight,
|
|
133205
|
+
Math.max(1, scale),
|
|
133206
|
+
postHeight
|
|
133207
|
+
);
|
|
133208
|
+
graphics.fill(COLORS.woodDark);
|
|
133209
|
+
graphics.rect(archWidth / 2 - postWidth, -postHeight, postWidth, postHeight);
|
|
133210
|
+
graphics.fill(COLORS.woodMedium);
|
|
133211
|
+
graphics.rect(
|
|
133212
|
+
archWidth / 2 - postWidth,
|
|
133213
|
+
-postHeight,
|
|
133214
|
+
Math.max(1, scale),
|
|
133215
|
+
postHeight
|
|
133216
|
+
);
|
|
133217
|
+
graphics.fill(COLORS.woodLight);
|
|
133218
|
+
graphics.rect(
|
|
133219
|
+
archWidth / 2 - Math.max(1, scale),
|
|
133220
|
+
-postHeight,
|
|
133221
|
+
Math.max(1, scale),
|
|
133222
|
+
postHeight
|
|
133223
|
+
);
|
|
133224
|
+
graphics.fill(COLORS.woodDark);
|
|
133225
|
+
const crossbarHeight = Math.max(3, 4 * scale);
|
|
133226
|
+
graphics.rect(
|
|
133227
|
+
-archWidth / 2,
|
|
133228
|
+
-postHeight - crossbarHeight,
|
|
133229
|
+
archWidth,
|
|
133230
|
+
crossbarHeight
|
|
133231
|
+
);
|
|
133232
|
+
graphics.fill(COLORS.woodMedium);
|
|
133233
|
+
graphics.rect(
|
|
133234
|
+
-archWidth / 2,
|
|
133235
|
+
-postHeight - crossbarHeight,
|
|
133236
|
+
archWidth,
|
|
133237
|
+
Math.max(1, scale)
|
|
133238
|
+
);
|
|
133239
|
+
graphics.fill(COLORS.woodLight);
|
|
133240
|
+
const flagWidth = archWidth * 0.5;
|
|
133241
|
+
const flagHeight = Math.max(18, 24 * scale);
|
|
133242
|
+
const flagTop = -postHeight + 2 * scale;
|
|
133243
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, flagHeight);
|
|
133244
|
+
graphics.fill(16777215);
|
|
133245
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, Math.max(1, scale));
|
|
133246
|
+
graphics.fill(14540253);
|
|
133247
|
+
graphics.rect(
|
|
133248
|
+
-flagWidth / 2,
|
|
133249
|
+
flagTop + flagHeight - Math.max(1, scale),
|
|
133250
|
+
flagWidth,
|
|
133251
|
+
Math.max(1, scale)
|
|
133252
|
+
);
|
|
133253
|
+
graphics.fill(13421772);
|
|
133254
|
+
graphics.rect(-flagWidth / 2, flagTop, Math.max(1, scale), flagHeight);
|
|
133255
|
+
graphics.fill(14540253);
|
|
133256
|
+
graphics.rect(
|
|
133257
|
+
flagWidth / 2 - Math.max(1, scale),
|
|
133258
|
+
flagTop,
|
|
133259
|
+
Math.max(1, scale),
|
|
133260
|
+
flagHeight
|
|
133261
|
+
);
|
|
133262
|
+
graphics.fill(13421772);
|
|
133263
|
+
const leafCenterY = flagTop + flagHeight * 0.55;
|
|
133264
|
+
const leafSize = Math.min(flagWidth, flagHeight) * 0.35;
|
|
133265
|
+
const leafColor = 13369344;
|
|
133266
|
+
const leafGraphics = new Graphics();
|
|
133267
|
+
leafGraphics.rect(-scale * 0.5, 0, scale, leafSize * 0.6);
|
|
133268
|
+
leafGraphics.fill(9109504);
|
|
133269
|
+
leafGraphics.beginPath();
|
|
133270
|
+
leafGraphics.moveTo(0, -leafSize * 0.8);
|
|
133271
|
+
leafGraphics.lineTo(leafSize * 0.3, -leafSize * 0.4);
|
|
133272
|
+
leafGraphics.lineTo(leafSize * 0.6, -leafSize * 0.3);
|
|
133273
|
+
leafGraphics.lineTo(leafSize * 0.3, -leafSize * 0.1);
|
|
133274
|
+
leafGraphics.lineTo(leafSize * 0.4, leafSize * 0.2);
|
|
133275
|
+
leafGraphics.lineTo(leafSize * 0.15, leafSize * 0.15);
|
|
133276
|
+
leafGraphics.lineTo(0, leafSize * 0.4);
|
|
133277
|
+
leafGraphics.lineTo(-leafSize * 0.15, leafSize * 0.15);
|
|
133278
|
+
leafGraphics.lineTo(-leafSize * 0.4, leafSize * 0.2);
|
|
133279
|
+
leafGraphics.lineTo(-leafSize * 0.3, -leafSize * 0.1);
|
|
133280
|
+
leafGraphics.lineTo(-leafSize * 0.6, -leafSize * 0.3);
|
|
133281
|
+
leafGraphics.lineTo(-leafSize * 0.3, -leafSize * 0.4);
|
|
133282
|
+
leafGraphics.closePath();
|
|
133283
|
+
leafGraphics.fill(leafColor);
|
|
133284
|
+
leafGraphics.x = 0;
|
|
133285
|
+
leafGraphics.y = leafCenterY;
|
|
133286
|
+
leafGraphics.rotation = 0.3;
|
|
133287
|
+
graphics.addChild(leafGraphics);
|
|
133288
|
+
container.addChild(graphics);
|
|
133289
|
+
const signBoard = new Graphics();
|
|
133290
|
+
const fontSize = Math.max(8, 9 * scale);
|
|
133291
|
+
const estimatedTextWidth = name2.length * fontSize * 0.6;
|
|
133292
|
+
const signBoardWidth = Math.min(
|
|
133293
|
+
estimatedTextWidth + 16 * scale,
|
|
133294
|
+
archWidth - 8 * scale
|
|
133295
|
+
);
|
|
133296
|
+
const signBoardHeight = Math.max(8, 10 * scale);
|
|
133297
|
+
const signBoardY = -postHeight - crossbarHeight + 2 * scale;
|
|
133298
|
+
signBoard.rect(
|
|
133299
|
+
-signBoardWidth / 2,
|
|
133300
|
+
signBoardY,
|
|
133301
|
+
signBoardWidth,
|
|
133302
|
+
signBoardHeight
|
|
133303
|
+
);
|
|
133304
|
+
signBoard.fill(COLORS.woodLight);
|
|
133305
|
+
signBoard.rect(
|
|
133306
|
+
-signBoardWidth / 2,
|
|
133307
|
+
signBoardY,
|
|
133308
|
+
signBoardWidth,
|
|
133309
|
+
Math.max(1, scale)
|
|
133310
|
+
);
|
|
133311
|
+
signBoard.fill(COLORS.woodMedium);
|
|
133312
|
+
signBoard.rect(
|
|
133313
|
+
-signBoardWidth / 2,
|
|
133314
|
+
signBoardY + signBoardHeight - Math.max(1, scale),
|
|
133315
|
+
signBoardWidth,
|
|
133316
|
+
Math.max(1, scale)
|
|
133317
|
+
);
|
|
133318
|
+
signBoard.fill(COLORS.woodDark);
|
|
133319
|
+
container.addChild(signBoard);
|
|
133320
|
+
const nameText = new Text({
|
|
133321
|
+
text: name2,
|
|
133322
|
+
style: {
|
|
133323
|
+
fontSize,
|
|
133324
|
+
fill: 4073251,
|
|
133325
|
+
fontFamily: "Arial",
|
|
133326
|
+
fontWeight: "600"
|
|
133327
|
+
},
|
|
133328
|
+
resolution: 2
|
|
133329
|
+
});
|
|
133330
|
+
nameText.anchor.set(0.5, 0.5);
|
|
133331
|
+
nameText.y = signBoardY + signBoardHeight / 2;
|
|
133332
|
+
container.addChild(nameText);
|
|
133333
|
+
return container;
|
|
133334
|
+
}
|
|
133335
|
+
function generateGPLSign(config) {
|
|
133336
|
+
const { name: name2, sizeMultiplier, archWidth: customArchWidth } = config;
|
|
133337
|
+
const container = new Container();
|
|
133338
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133339
|
+
const archWidth = customArchWidth ?? footprint.width * 0.5;
|
|
133340
|
+
const scale = archWidth / 80;
|
|
133341
|
+
const graphics = new Graphics();
|
|
133342
|
+
const ironDark = 2763306;
|
|
133343
|
+
const ironMedium = 3815994;
|
|
133344
|
+
const ironLight = 4868682;
|
|
133345
|
+
const ironHighlight = 5921370;
|
|
133346
|
+
const postWidth = Math.max(4, 5 * scale);
|
|
133347
|
+
const postHeight = Math.max(25, 35 * scale);
|
|
133348
|
+
graphics.rect(-archWidth / 2, -postHeight, postWidth, postHeight);
|
|
133349
|
+
graphics.fill(ironMedium);
|
|
133350
|
+
graphics.rect(-archWidth / 2, -postHeight, Math.max(1, scale), postHeight);
|
|
133351
|
+
graphics.fill(ironHighlight);
|
|
133352
|
+
graphics.rect(
|
|
133353
|
+
-archWidth / 2 + postWidth - Math.max(1, scale),
|
|
133354
|
+
-postHeight,
|
|
133355
|
+
Math.max(1, scale),
|
|
133356
|
+
postHeight
|
|
133357
|
+
);
|
|
133358
|
+
graphics.fill(ironDark);
|
|
133359
|
+
const finialSize = postWidth * 1.2;
|
|
133360
|
+
graphics.circle(
|
|
133361
|
+
-archWidth / 2 + postWidth / 2,
|
|
133362
|
+
-postHeight - finialSize / 2,
|
|
133363
|
+
finialSize / 2
|
|
133364
|
+
);
|
|
133365
|
+
graphics.fill(ironMedium);
|
|
133366
|
+
graphics.circle(
|
|
133367
|
+
-archWidth / 2 + postWidth / 2 - finialSize * 0.15,
|
|
133368
|
+
-postHeight - finialSize * 0.65,
|
|
133369
|
+
finialSize * 0.15
|
|
133370
|
+
);
|
|
133371
|
+
graphics.fill(ironHighlight);
|
|
133372
|
+
graphics.rect(archWidth / 2 - postWidth, -postHeight, postWidth, postHeight);
|
|
133373
|
+
graphics.fill(ironMedium);
|
|
133374
|
+
graphics.rect(
|
|
133375
|
+
archWidth / 2 - postWidth,
|
|
133376
|
+
-postHeight,
|
|
133377
|
+
Math.max(1, scale),
|
|
133378
|
+
postHeight
|
|
133379
|
+
);
|
|
133380
|
+
graphics.fill(ironHighlight);
|
|
133381
|
+
graphics.rect(
|
|
133382
|
+
archWidth / 2 - Math.max(1, scale),
|
|
133383
|
+
-postHeight,
|
|
133384
|
+
Math.max(1, scale),
|
|
133385
|
+
postHeight
|
|
133386
|
+
);
|
|
133387
|
+
graphics.fill(ironDark);
|
|
133388
|
+
graphics.circle(
|
|
133389
|
+
archWidth / 2 - postWidth / 2,
|
|
133390
|
+
-postHeight - finialSize / 2,
|
|
133391
|
+
finialSize / 2
|
|
133392
|
+
);
|
|
133393
|
+
graphics.fill(ironMedium);
|
|
133394
|
+
graphics.circle(
|
|
133395
|
+
archWidth / 2 - postWidth / 2 - finialSize * 0.15,
|
|
133396
|
+
-postHeight - finialSize * 0.65,
|
|
133397
|
+
finialSize * 0.15
|
|
133398
|
+
);
|
|
133399
|
+
graphics.fill(ironHighlight);
|
|
133400
|
+
const crossbarHeight = Math.max(4, 5 * scale);
|
|
133401
|
+
graphics.rect(
|
|
133402
|
+
-archWidth / 2,
|
|
133403
|
+
-postHeight - crossbarHeight,
|
|
133404
|
+
archWidth,
|
|
133405
|
+
crossbarHeight
|
|
133406
|
+
);
|
|
133407
|
+
graphics.fill(ironMedium);
|
|
133408
|
+
graphics.rect(
|
|
133409
|
+
-archWidth / 2,
|
|
133410
|
+
-postHeight - crossbarHeight,
|
|
133411
|
+
archWidth,
|
|
133412
|
+
Math.max(1, scale)
|
|
133413
|
+
);
|
|
133414
|
+
graphics.fill(ironHighlight);
|
|
133415
|
+
graphics.rect(
|
|
133416
|
+
-archWidth / 2,
|
|
133417
|
+
-postHeight - Math.max(1, scale),
|
|
133418
|
+
archWidth,
|
|
133419
|
+
Math.max(1, scale)
|
|
133420
|
+
);
|
|
133421
|
+
graphics.fill(ironDark);
|
|
133422
|
+
const scrollY = -postHeight + 3 * scale;
|
|
133423
|
+
const scrollWidth = archWidth * 0.15;
|
|
133424
|
+
graphics.circle(-archWidth / 4, scrollY, scrollWidth);
|
|
133425
|
+
graphics.stroke({ width: Math.max(2, 2 * scale), color: ironMedium });
|
|
133426
|
+
graphics.circle(archWidth / 4, scrollY, scrollWidth);
|
|
133427
|
+
graphics.stroke({ width: Math.max(2, 2 * scale), color: ironMedium });
|
|
133428
|
+
const flagWidth = archWidth * 0.5;
|
|
133429
|
+
const flagHeight = Math.max(18, 24 * scale);
|
|
133430
|
+
const flagTop = -postHeight + 8 * scale;
|
|
133431
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, flagHeight);
|
|
133432
|
+
graphics.fill(2250154);
|
|
133433
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, Math.max(1, scale));
|
|
133434
|
+
graphics.fill(3368635);
|
|
133435
|
+
graphics.rect(
|
|
133436
|
+
-flagWidth / 2,
|
|
133437
|
+
flagTop + flagHeight - Math.max(1, scale),
|
|
133438
|
+
flagWidth,
|
|
133439
|
+
Math.max(1, scale)
|
|
133440
|
+
);
|
|
133441
|
+
graphics.fill(1131690);
|
|
133442
|
+
graphics.rect(-flagWidth / 2, flagTop, Math.max(1, scale), flagHeight);
|
|
133443
|
+
graphics.fill(3368635);
|
|
133444
|
+
graphics.rect(
|
|
133445
|
+
flagWidth / 2 - Math.max(1, scale),
|
|
133446
|
+
flagTop,
|
|
133447
|
+
Math.max(1, scale),
|
|
133448
|
+
flagHeight
|
|
133449
|
+
);
|
|
133450
|
+
graphics.fill(1131690);
|
|
133451
|
+
container.addChild(graphics);
|
|
133452
|
+
const gplFontSize = Math.max(10, 14 * scale);
|
|
133453
|
+
const gplText = new Text({
|
|
133454
|
+
text: "GPL",
|
|
133455
|
+
style: {
|
|
133456
|
+
fontSize: gplFontSize,
|
|
133457
|
+
fill: 16777215,
|
|
133458
|
+
fontFamily: "Arial",
|
|
133459
|
+
fontWeight: "bold"
|
|
133460
|
+
},
|
|
133461
|
+
resolution: 2
|
|
133462
|
+
});
|
|
133463
|
+
gplText.anchor.set(0.5, 0.5);
|
|
133464
|
+
gplText.y = flagTop + flagHeight * 0.5;
|
|
133465
|
+
container.addChild(gplText);
|
|
133466
|
+
const signBoard = new Graphics();
|
|
133467
|
+
const fontSize = Math.max(8, 9 * scale);
|
|
133468
|
+
const estimatedTextWidth = name2.length * fontSize * 0.6;
|
|
133469
|
+
const signBoardWidth = Math.min(
|
|
133470
|
+
estimatedTextWidth + 16 * scale,
|
|
133471
|
+
archWidth - 8 * scale
|
|
133472
|
+
);
|
|
133473
|
+
const signBoardHeight = Math.max(8, 10 * scale);
|
|
133474
|
+
const signBoardY = -postHeight - crossbarHeight - signBoardHeight - 2 * scale;
|
|
133475
|
+
signBoard.rect(
|
|
133476
|
+
-signBoardWidth / 2,
|
|
133477
|
+
signBoardY,
|
|
133478
|
+
signBoardWidth,
|
|
133479
|
+
signBoardHeight
|
|
133480
|
+
);
|
|
133481
|
+
signBoard.fill(ironLight);
|
|
133482
|
+
signBoard.rect(
|
|
133483
|
+
-signBoardWidth / 2,
|
|
133484
|
+
signBoardY,
|
|
133485
|
+
signBoardWidth,
|
|
133486
|
+
Math.max(1, scale)
|
|
133487
|
+
);
|
|
133488
|
+
signBoard.fill(ironHighlight);
|
|
133489
|
+
signBoard.rect(
|
|
133490
|
+
-signBoardWidth / 2,
|
|
133491
|
+
signBoardY + signBoardHeight - Math.max(1, scale),
|
|
133492
|
+
signBoardWidth,
|
|
133493
|
+
Math.max(1, scale)
|
|
133494
|
+
);
|
|
133495
|
+
signBoard.fill(ironDark);
|
|
133496
|
+
container.addChild(signBoard);
|
|
133497
|
+
const nameText = new Text({
|
|
133498
|
+
text: name2,
|
|
133499
|
+
style: {
|
|
133500
|
+
fontSize,
|
|
133501
|
+
fill: 16777215,
|
|
133502
|
+
fontFamily: "Arial",
|
|
133503
|
+
fontWeight: "600"
|
|
133504
|
+
},
|
|
133505
|
+
resolution: 2
|
|
133506
|
+
});
|
|
133507
|
+
nameText.anchor.set(0.5, 0.5);
|
|
133508
|
+
nameText.y = signBoardY + signBoardHeight / 2;
|
|
133509
|
+
container.addChild(nameText);
|
|
133510
|
+
return container;
|
|
133511
|
+
}
|
|
133512
|
+
function generatePicketFenceGround(sizeMultiplier) {
|
|
133513
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133514
|
+
const ground = new Graphics();
|
|
133515
|
+
const halfW = footprint.width;
|
|
133516
|
+
const halfH = footprint.height;
|
|
133517
|
+
ground.moveTo(0, -halfH);
|
|
133518
|
+
ground.lineTo(halfW, 0);
|
|
133519
|
+
ground.lineTo(0, halfH);
|
|
133520
|
+
ground.lineTo(-halfW, 0);
|
|
133521
|
+
ground.closePath();
|
|
133522
|
+
ground.fill(COLORS.grassMedium);
|
|
133523
|
+
const textureCount = Math.max(6, Math.floor(8 * sizeMultiplier));
|
|
133524
|
+
for (let i2 = 0; i2 < textureCount; i2++) {
|
|
133525
|
+
const angle = i2 / textureCount * Math.PI * 2;
|
|
133526
|
+
const radius = 0.3 + i2 % 3 * 0.1;
|
|
133527
|
+
const x2 = Math.cos(angle) * halfW * radius;
|
|
133528
|
+
const y2 = Math.sin(angle) * halfH * radius;
|
|
133529
|
+
const dotSize = Math.max(1.5, 2 * sizeMultiplier);
|
|
133530
|
+
ground.circle(x2, y2, dotSize);
|
|
133531
|
+
ground.fill(i2 % 2 === 0 ? COLORS.grassLight : COLORS.grassDark);
|
|
133532
|
+
}
|
|
133533
|
+
const fenceWhite = 16119285;
|
|
133534
|
+
const fenceHighlight = 16777215;
|
|
133535
|
+
const picketWidth = Math.max(2, 3 * sizeMultiplier);
|
|
133536
|
+
const picketHeight = Math.max(8, 12 * sizeMultiplier);
|
|
133537
|
+
const picketSpacing = Math.max(4, 6 * sizeMultiplier);
|
|
133538
|
+
const edgeLength = Math.sqrt(halfW * halfW + halfH * halfH);
|
|
133539
|
+
const picketCount = Math.floor(edgeLength / picketSpacing);
|
|
133540
|
+
const slopeRatio = 0.5;
|
|
133541
|
+
const drawPicket = (px, py, edgeDir) => {
|
|
133542
|
+
const halfW2 = picketWidth / 2;
|
|
133543
|
+
const dx = halfW2 * edgeDir;
|
|
133544
|
+
const dy = halfW2 * slopeRatio;
|
|
133545
|
+
const bottomLeftX = px - dx;
|
|
133546
|
+
const bottomLeftY = py - dy;
|
|
133547
|
+
const bottomRightX = px + dx;
|
|
133548
|
+
const bottomRightY = py + dy;
|
|
133549
|
+
const topLeftX = bottomLeftX;
|
|
133550
|
+
const topLeftY = bottomLeftY - picketHeight;
|
|
133551
|
+
const topRightX = bottomRightX;
|
|
133552
|
+
const topRightY = bottomRightY - picketHeight;
|
|
133553
|
+
ground.beginPath();
|
|
133554
|
+
ground.moveTo(bottomLeftX, bottomLeftY);
|
|
133555
|
+
ground.lineTo(bottomRightX, bottomRightY);
|
|
133556
|
+
ground.lineTo(topRightX, topRightY);
|
|
133557
|
+
ground.lineTo(topLeftX, topLeftY);
|
|
133558
|
+
ground.closePath();
|
|
133559
|
+
ground.fill(fenceWhite);
|
|
133560
|
+
const highlightWidth = Math.max(1, sizeMultiplier * 0.5);
|
|
133561
|
+
ground.beginPath();
|
|
133562
|
+
if (edgeDir > 0) {
|
|
133563
|
+
ground.moveTo(bottomLeftX, bottomLeftY);
|
|
133564
|
+
ground.lineTo(
|
|
133565
|
+
bottomLeftX + highlightWidth * 0.5,
|
|
133566
|
+
bottomLeftY + highlightWidth * 0.25
|
|
133567
|
+
);
|
|
133568
|
+
ground.lineTo(
|
|
133569
|
+
topLeftX + highlightWidth * 0.5,
|
|
133570
|
+
topLeftY + highlightWidth * 0.25
|
|
133571
|
+
);
|
|
133572
|
+
ground.lineTo(topLeftX, topLeftY);
|
|
133573
|
+
} else {
|
|
133574
|
+
ground.moveTo(bottomRightX, bottomRightY);
|
|
133575
|
+
ground.lineTo(
|
|
133576
|
+
bottomRightX - highlightWidth * 0.5,
|
|
133577
|
+
bottomRightY + highlightWidth * 0.25
|
|
133578
|
+
);
|
|
133579
|
+
ground.lineTo(
|
|
133580
|
+
topRightX - highlightWidth * 0.5,
|
|
133581
|
+
topRightY + highlightWidth * 0.25
|
|
133582
|
+
);
|
|
133583
|
+
ground.lineTo(topRightX, topRightY);
|
|
133584
|
+
}
|
|
133585
|
+
ground.closePath();
|
|
133586
|
+
ground.fill(fenceHighlight);
|
|
133587
|
+
ground.beginPath();
|
|
133588
|
+
ground.moveTo(topLeftX, topLeftY);
|
|
133589
|
+
ground.lineTo(px, py - dy * 0 - picketHeight - picketWidth);
|
|
133590
|
+
ground.lineTo(topRightX, topRightY);
|
|
133591
|
+
ground.closePath();
|
|
133592
|
+
ground.fill(fenceWhite);
|
|
133593
|
+
};
|
|
133594
|
+
for (let i2 = 1; i2 < picketCount; i2++) {
|
|
133595
|
+
const t2 = i2 / picketCount;
|
|
133596
|
+
const px = -halfW * t2;
|
|
133597
|
+
const py = -halfH * (1 - t2);
|
|
133598
|
+
drawPicket(px, py, -1);
|
|
133599
|
+
}
|
|
133600
|
+
for (let i2 = 1; i2 < picketCount; i2++) {
|
|
133601
|
+
const t2 = i2 / picketCount;
|
|
133602
|
+
const px = halfW * t2;
|
|
133603
|
+
const py = -halfH * (1 - t2);
|
|
133604
|
+
drawPicket(px, py, 1);
|
|
133605
|
+
}
|
|
133606
|
+
for (let i2 = 1; i2 < picketCount * 0.75; i2++) {
|
|
133607
|
+
const t2 = i2 / picketCount;
|
|
133608
|
+
const px = -halfW * (1 - t2);
|
|
133609
|
+
const py = halfH * t2;
|
|
133610
|
+
drawPicket(px, py, 1);
|
|
133611
|
+
}
|
|
133612
|
+
for (let i2 = 1; i2 < picketCount * 0.75; i2++) {
|
|
133613
|
+
const t2 = i2 / picketCount;
|
|
133614
|
+
const px = halfW * (1 - t2);
|
|
133615
|
+
const py = halfH * t2;
|
|
133616
|
+
drawPicket(px, py, -1);
|
|
133617
|
+
}
|
|
133618
|
+
const cornerPostWidth = picketWidth * 1.5;
|
|
133619
|
+
const cornerPostHeight = picketHeight * 1.2;
|
|
133620
|
+
ground.rect(
|
|
133621
|
+
-cornerPostWidth / 2,
|
|
133622
|
+
-halfH - cornerPostHeight,
|
|
133623
|
+
cornerPostWidth,
|
|
133624
|
+
cornerPostHeight
|
|
133625
|
+
);
|
|
133626
|
+
ground.fill(fenceWhite);
|
|
133627
|
+
ground.rect(
|
|
133628
|
+
-halfW - cornerPostWidth / 2,
|
|
133629
|
+
-cornerPostHeight,
|
|
133630
|
+
cornerPostWidth,
|
|
133631
|
+
cornerPostHeight
|
|
133632
|
+
);
|
|
133633
|
+
ground.fill(fenceWhite);
|
|
133634
|
+
ground.rect(
|
|
133635
|
+
halfW - cornerPostWidth / 2,
|
|
133636
|
+
-cornerPostHeight,
|
|
133637
|
+
cornerPostWidth,
|
|
133638
|
+
cornerPostHeight
|
|
133639
|
+
);
|
|
133640
|
+
ground.fill(fenceWhite);
|
|
133641
|
+
const gatePostT = 0.75;
|
|
133642
|
+
const gatePostLeftX = -halfW * (1 - gatePostT);
|
|
133643
|
+
const gatePostLeftY = halfH * gatePostT;
|
|
133644
|
+
const gatePostRightX = halfW * (1 - gatePostT);
|
|
133645
|
+
const gatePostRightY = halfH * gatePostT;
|
|
133646
|
+
ground.rect(
|
|
133647
|
+
gatePostLeftX - cornerPostWidth / 2,
|
|
133648
|
+
gatePostLeftY - cornerPostHeight,
|
|
133649
|
+
cornerPostWidth,
|
|
133650
|
+
cornerPostHeight
|
|
133651
|
+
);
|
|
133652
|
+
ground.fill(fenceWhite);
|
|
133653
|
+
ground.rect(
|
|
133654
|
+
gatePostRightX - cornerPostWidth / 2,
|
|
133655
|
+
gatePostRightY - cornerPostHeight,
|
|
133656
|
+
cornerPostWidth,
|
|
133657
|
+
cornerPostHeight
|
|
133658
|
+
);
|
|
133659
|
+
ground.fill(fenceWhite);
|
|
133660
|
+
return ground;
|
|
133661
|
+
}
|
|
133662
|
+
function generateCobblestoneGround(sizeMultiplier) {
|
|
133663
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133664
|
+
const ground = new Graphics();
|
|
133665
|
+
const halfW = footprint.width;
|
|
133666
|
+
const halfH = footprint.height;
|
|
133667
|
+
ground.moveTo(0, -halfH);
|
|
133668
|
+
ground.lineTo(halfW, 0);
|
|
133669
|
+
ground.lineTo(0, halfH);
|
|
133670
|
+
ground.lineTo(-halfW, 0);
|
|
133671
|
+
ground.closePath();
|
|
133672
|
+
ground.fill(COLORS.grassMedium);
|
|
133673
|
+
const textureCount = Math.max(6, Math.floor(8 * sizeMultiplier));
|
|
133674
|
+
for (let i2 = 0; i2 < textureCount; i2++) {
|
|
133675
|
+
const angle = i2 / textureCount * Math.PI * 2;
|
|
133676
|
+
const radius = 0.4 + i2 % 3 * 0.15;
|
|
133677
|
+
const x2 = Math.cos(angle) * halfW * radius;
|
|
133678
|
+
const y2 = Math.sin(angle) * halfH * radius;
|
|
133679
|
+
if (Math.abs(x2) > halfW * 0.15 || Math.abs(y2) < halfH * 0.3) {
|
|
133680
|
+
const dotSize = Math.max(1.5, 2 * sizeMultiplier);
|
|
133681
|
+
ground.circle(x2, y2, dotSize);
|
|
133682
|
+
ground.fill(i2 % 2 === 0 ? COLORS.grassLight : COLORS.grassDark);
|
|
133683
|
+
}
|
|
133684
|
+
}
|
|
133685
|
+
const stoneSize = Math.max(3, 5 * sizeMultiplier);
|
|
133686
|
+
const stoneColors = [8421504, 9474192, 7368816, 8947848];
|
|
133687
|
+
const pathSteps = Math.max(4, Math.floor(6 * sizeMultiplier));
|
|
133688
|
+
for (let i2 = 0; i2 < pathSteps; i2++) {
|
|
133689
|
+
const progress = i2 / (pathSteps - 1);
|
|
133690
|
+
const y2 = -halfH * 0.5 + progress * halfH * 1.2;
|
|
133691
|
+
for (let j2 = -1; j2 <= 1; j2 += 2) {
|
|
133692
|
+
const offsetX = j2 * stoneSize * 0.6;
|
|
133693
|
+
const offsetY = i2 % 2 * stoneSize * 0.3;
|
|
133694
|
+
const color2 = stoneColors[(i2 + j2 + 10) % stoneColors.length];
|
|
133695
|
+
ground.roundRect(
|
|
133696
|
+
offsetX - stoneSize / 2,
|
|
133697
|
+
y2 + offsetY - stoneSize / 2,
|
|
133698
|
+
stoneSize,
|
|
133699
|
+
stoneSize * 0.7,
|
|
133700
|
+
stoneSize * 0.2
|
|
133701
|
+
);
|
|
133702
|
+
ground.fill(color2);
|
|
133703
|
+
}
|
|
133704
|
+
if (i2 < pathSteps - 1) {
|
|
133705
|
+
const centerY = y2 + stoneSize * 0.5;
|
|
133706
|
+
const color2 = stoneColors[(i2 + 2) % stoneColors.length];
|
|
133707
|
+
ground.roundRect(
|
|
133708
|
+
-stoneSize / 2,
|
|
133709
|
+
centerY - stoneSize / 2,
|
|
133710
|
+
stoneSize,
|
|
133711
|
+
stoneSize * 0.7,
|
|
133712
|
+
stoneSize * 0.2
|
|
133713
|
+
);
|
|
133714
|
+
ground.fill(color2);
|
|
133715
|
+
}
|
|
133716
|
+
}
|
|
133717
|
+
return ground;
|
|
133718
|
+
}
|
|
133719
|
+
function generateLicenseSign(license, config) {
|
|
133720
|
+
switch (license) {
|
|
133721
|
+
case "MIT":
|
|
133722
|
+
case "BSD":
|
|
133723
|
+
case "ISC":
|
|
133724
|
+
case "Unlicense":
|
|
133725
|
+
return generateMITFlowerArch(config);
|
|
133726
|
+
case "Apache-2.0":
|
|
133727
|
+
return generateApacheSign(config);
|
|
133728
|
+
case "GPL-3.0":
|
|
133729
|
+
case "LGPL-3.0":
|
|
133730
|
+
return generateGPLSign(config);
|
|
133731
|
+
default:
|
|
133732
|
+
return generateMITFlowerArch(config);
|
|
133733
|
+
}
|
|
133734
|
+
}
|
|
133735
|
+
function generateLicenseGround(license, sizeMultiplier) {
|
|
133736
|
+
switch (license) {
|
|
133737
|
+
case "MIT":
|
|
133738
|
+
case "BSD":
|
|
133739
|
+
case "ISC":
|
|
133740
|
+
case "Unlicense":
|
|
133741
|
+
return generateOpenGrassGround(sizeMultiplier);
|
|
133742
|
+
case "Apache-2.0":
|
|
133743
|
+
return generateCobblestoneGround(sizeMultiplier);
|
|
133744
|
+
case "GPL-3.0":
|
|
133745
|
+
case "LGPL-3.0":
|
|
133746
|
+
return generatePicketFenceGround(sizeMultiplier);
|
|
133747
|
+
default:
|
|
133748
|
+
return generateOpenGrassGround(sizeMultiplier);
|
|
133749
|
+
}
|
|
133750
|
+
}
|
|
132923
133751
|
const ISO_TILE_WIDTH = 64;
|
|
132924
133752
|
const ISO_TILE_HEIGHT = 32;
|
|
132925
133753
|
class IsometricRenderer {
|
|
@@ -132958,9 +133786,11 @@ class IsometricRenderer {
|
|
|
132958
133786
|
renderScene(mapData, showGrid = true) {
|
|
132959
133787
|
const background = new Container();
|
|
132960
133788
|
const tiles = new Container();
|
|
133789
|
+
const licenseGrounds = new Container();
|
|
132961
133790
|
const bridges = new Container();
|
|
132962
133791
|
const paths = new Container();
|
|
132963
133792
|
const nodes = new Container();
|
|
133793
|
+
licenseGrounds.sortableChildren = true;
|
|
132964
133794
|
if (showGrid) {
|
|
132965
133795
|
const grid = this.renderGrid(
|
|
132966
133796
|
mapData.width,
|
|
@@ -132981,11 +133811,17 @@ class IsometricRenderer {
|
|
|
132981
133811
|
}
|
|
132982
133812
|
const spriteInstances = this.renderSprites(mapData.nodes);
|
|
132983
133813
|
for (const instance of spriteInstances.values()) {
|
|
133814
|
+
if (instance.licenseGround) {
|
|
133815
|
+
licenseGrounds.addChild(instance.licenseGround);
|
|
133816
|
+
}
|
|
132984
133817
|
nodes.addChild(instance.highlight);
|
|
132985
133818
|
nodes.addChild(instance.sprite);
|
|
132986
133819
|
if (instance.weathering) {
|
|
132987
133820
|
nodes.addChild(instance.weathering);
|
|
132988
133821
|
}
|
|
133822
|
+
if (instance.licenseSign) {
|
|
133823
|
+
nodes.addChild(instance.licenseSign);
|
|
133824
|
+
}
|
|
132989
133825
|
nodes.addChild(instance.label);
|
|
132990
133826
|
if (instance.hoverLabel) {
|
|
132991
133827
|
nodes.addChild(instance.hoverLabel);
|
|
@@ -132994,6 +133830,7 @@ class IsometricRenderer {
|
|
|
132994
133830
|
return {
|
|
132995
133831
|
background,
|
|
132996
133832
|
tiles,
|
|
133833
|
+
licenseGrounds,
|
|
132997
133834
|
bridges,
|
|
132998
133835
|
paths,
|
|
132999
133836
|
nodes,
|
|
@@ -133253,22 +134090,6 @@ class IsometricRenderer {
|
|
|
133253
134090
|
(_a = this.onPackageClick) == null ? void 0 : _a.call(this, nodeId, packageName);
|
|
133254
134091
|
});
|
|
133255
134092
|
container.addChild(sprite);
|
|
133256
|
-
if (subCount <= 5) {
|
|
133257
|
-
const subLabel = new Text({
|
|
133258
|
-
text: sub.name,
|
|
133259
|
-
style: {
|
|
133260
|
-
fontSize: 10,
|
|
133261
|
-
fill: 16777215,
|
|
133262
|
-
fontFamily: "Arial",
|
|
133263
|
-
fontWeight: "400"
|
|
133264
|
-
},
|
|
133265
|
-
resolution: 2
|
|
133266
|
-
});
|
|
133267
|
-
subLabel.x = offset.x;
|
|
133268
|
-
subLabel.y = offset.y + sprite.height * 0.15 + 4;
|
|
133269
|
-
subLabel.anchor.set(0.5, 0);
|
|
133270
|
-
container.addChild(subLabel);
|
|
133271
|
-
}
|
|
133272
134093
|
}
|
|
133273
134094
|
const decorationBaseY = footprintHeight * 0.5;
|
|
133274
134095
|
if (node2.stars && node2.stars > 0) {
|
|
@@ -133386,6 +134207,24 @@ class IsometricRenderer {
|
|
|
133386
134207
|
);
|
|
133387
134208
|
weathering.zIndex = container.zIndex + 0.1;
|
|
133388
134209
|
}
|
|
134210
|
+
let licenseGround;
|
|
134211
|
+
let licenseSign;
|
|
134212
|
+
if (node2.license) {
|
|
134213
|
+
const licenseType = node2.license;
|
|
134214
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134215
|
+
licenseGround = generateLicenseGround(licenseType, sizeMultiplier);
|
|
134216
|
+
licenseGround.x = screenX;
|
|
134217
|
+
licenseGround.y = screenY;
|
|
134218
|
+
licenseGround.zIndex = screenY;
|
|
134219
|
+
licenseSign = generateLicenseSign(licenseType, {
|
|
134220
|
+
name: node2.label,
|
|
134221
|
+
sizeMultiplier
|
|
134222
|
+
});
|
|
134223
|
+
licenseSign.x = screenX;
|
|
134224
|
+
licenseSign.y = screenY + footprint.height * 0.75;
|
|
134225
|
+
licenseSign.zIndex = container.zIndex + 0.15;
|
|
134226
|
+
label.visible = false;
|
|
134227
|
+
}
|
|
133389
134228
|
const instance = {
|
|
133390
134229
|
sprite: container,
|
|
133391
134230
|
// Container acts as the sprite
|
|
@@ -133393,8 +134232,12 @@ class IsometricRenderer {
|
|
|
133393
134232
|
label,
|
|
133394
134233
|
hoverLabel,
|
|
133395
134234
|
weathering,
|
|
134235
|
+
licenseGround,
|
|
134236
|
+
licenseSign,
|
|
133396
134237
|
gridPosition: { gridX: node2.gridX, gridY: node2.gridY },
|
|
133397
134238
|
size: sizeMultiplier,
|
|
134239
|
+
spriteKey: node2.sprite,
|
|
134240
|
+
// Store for diffing - allows detecting visual changes
|
|
133398
134241
|
update: (gridX, gridY) => {
|
|
133399
134242
|
const pos = gridToScreen(gridX, gridY);
|
|
133400
134243
|
container.x = pos.screenX;
|
|
@@ -133421,6 +134264,17 @@ class IsometricRenderer {
|
|
|
133421
134264
|
weathering.x = pos.screenX;
|
|
133422
134265
|
weathering.y = pos.screenY;
|
|
133423
134266
|
}
|
|
134267
|
+
if (licenseGround) {
|
|
134268
|
+
licenseGround.x = pos.screenX;
|
|
134269
|
+
licenseGround.y = pos.screenY;
|
|
134270
|
+
licenseGround.zIndex = pos.screenY;
|
|
134271
|
+
}
|
|
134272
|
+
if (licenseSign) {
|
|
134273
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134274
|
+
licenseSign.x = pos.screenX;
|
|
134275
|
+
licenseSign.y = pos.screenY + footprint.height * 0.75;
|
|
134276
|
+
licenseSign.zIndex = getIsometricZIndex(gridX, gridY) + 0.15;
|
|
134277
|
+
}
|
|
133424
134278
|
instance.gridPosition = { gridX, gridY };
|
|
133425
134279
|
},
|
|
133426
134280
|
destroy: () => {
|
|
@@ -133429,6 +134283,8 @@ class IsometricRenderer {
|
|
|
133429
134283
|
label.destroy();
|
|
133430
134284
|
hoverLabel.destroy();
|
|
133431
134285
|
weathering == null ? void 0 : weathering.destroy();
|
|
134286
|
+
licenseGround == null ? void 0 : licenseGround.destroy();
|
|
134287
|
+
licenseSign == null ? void 0 : licenseSign.destroy();
|
|
133432
134288
|
}
|
|
133433
134289
|
};
|
|
133434
134290
|
return instance;
|
|
@@ -133502,13 +134358,35 @@ class IsometricRenderer {
|
|
|
133502
134358
|
label.y = screenY + sprite.height * 0.15 + 8;
|
|
133503
134359
|
label.anchor.set(0.5, 0);
|
|
133504
134360
|
label.zIndex = sprite.zIndex + 0.2;
|
|
134361
|
+
let licenseGround;
|
|
134362
|
+
let licenseSign;
|
|
134363
|
+
if (node2.license) {
|
|
134364
|
+
const licenseType = node2.license;
|
|
134365
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134366
|
+
licenseGround = generateLicenseGround(licenseType, sizeMultiplier);
|
|
134367
|
+
licenseGround.x = screenX;
|
|
134368
|
+
licenseGround.y = screenY;
|
|
134369
|
+
licenseGround.zIndex = screenY;
|
|
134370
|
+
licenseSign = generateLicenseSign(licenseType, {
|
|
134371
|
+
name: node2.label,
|
|
134372
|
+
sizeMultiplier
|
|
134373
|
+
});
|
|
134374
|
+
licenseSign.x = screenX;
|
|
134375
|
+
licenseSign.y = screenY + footprint.height * 0.75;
|
|
134376
|
+
licenseSign.zIndex = sprite.zIndex + 0.15;
|
|
134377
|
+
label.visible = false;
|
|
134378
|
+
}
|
|
133505
134379
|
const instance = {
|
|
133506
134380
|
sprite,
|
|
133507
134381
|
highlight,
|
|
133508
134382
|
label,
|
|
133509
134383
|
weathering,
|
|
134384
|
+
licenseGround,
|
|
134385
|
+
licenseSign,
|
|
133510
134386
|
gridPosition: { gridX: node2.gridX, gridY: node2.gridY },
|
|
133511
134387
|
size: sizeMultiplier,
|
|
134388
|
+
spriteKey: node2.sprite,
|
|
134389
|
+
// Store for diffing - allows detecting visual changes
|
|
133512
134390
|
update: (gridX, gridY) => {
|
|
133513
134391
|
const pos = gridToScreen(gridX, gridY);
|
|
133514
134392
|
sprite.x = pos.screenX;
|
|
@@ -133533,6 +134411,17 @@ class IsometricRenderer {
|
|
|
133533
134411
|
weathering.x = pos.screenX;
|
|
133534
134412
|
weathering.y = pos.screenY;
|
|
133535
134413
|
}
|
|
134414
|
+
if (licenseGround) {
|
|
134415
|
+
licenseGround.x = pos.screenX;
|
|
134416
|
+
licenseGround.y = pos.screenY;
|
|
134417
|
+
licenseGround.zIndex = pos.screenY;
|
|
134418
|
+
}
|
|
134419
|
+
if (licenseSign) {
|
|
134420
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134421
|
+
licenseSign.x = pos.screenX;
|
|
134422
|
+
licenseSign.y = pos.screenY + footprint.height * 0.75;
|
|
134423
|
+
licenseSign.zIndex = getIsometricZIndex(gridX, gridY) + 0.15;
|
|
134424
|
+
}
|
|
133536
134425
|
instance.gridPosition = { gridX, gridY };
|
|
133537
134426
|
},
|
|
133538
134427
|
destroy: () => {
|
|
@@ -133540,6 +134429,8 @@ class IsometricRenderer {
|
|
|
133540
134429
|
highlight.destroy();
|
|
133541
134430
|
label.destroy();
|
|
133542
134431
|
weathering == null ? void 0 : weathering.destroy();
|
|
134432
|
+
licenseGround == null ? void 0 : licenseGround.destroy();
|
|
134433
|
+
licenseSign == null ? void 0 : licenseSign.destroy();
|
|
133543
134434
|
}
|
|
133544
134435
|
};
|
|
133545
134436
|
spriteInstances.set(node2.id, instance);
|
|
@@ -134732,7 +135623,8 @@ function nodesToUnifiedOverworldMap(nodes, options = {}) {
|
|
|
134732
135623
|
aging: node2.aging,
|
|
134733
135624
|
subdivisions,
|
|
134734
135625
|
stars: node2.stars,
|
|
134735
|
-
collaborators: node2.collaborators
|
|
135626
|
+
collaborators: node2.collaborators,
|
|
135627
|
+
license: node2.license
|
|
134736
135628
|
};
|
|
134737
135629
|
});
|
|
134738
135630
|
const paths = [];
|
|
@@ -134906,6 +135798,7 @@ const OverworldMapPanelContent = ({
|
|
|
134906
135798
|
if (sceneContainersRef.current) {
|
|
134907
135799
|
viewport.removeChild(sceneContainersRef.current.background);
|
|
134908
135800
|
viewport.removeChild(sceneContainersRef.current.tiles);
|
|
135801
|
+
viewport.removeChild(sceneContainersRef.current.licenseGrounds);
|
|
134909
135802
|
viewport.removeChild(sceneContainersRef.current.bridges);
|
|
134910
135803
|
viewport.removeChild(sceneContainersRef.current.paths);
|
|
134911
135804
|
viewport.removeChild(sceneContainersRef.current.nodes);
|
|
@@ -134913,6 +135806,7 @@ const OverworldMapPanelContent = ({
|
|
|
134913
135806
|
const scene = renderer.renderScene(mapData, true);
|
|
134914
135807
|
viewport.addChild(scene.background);
|
|
134915
135808
|
viewport.addChild(scene.tiles);
|
|
135809
|
+
viewport.addChild(scene.licenseGrounds);
|
|
134916
135810
|
viewport.addChild(scene.bridges);
|
|
134917
135811
|
viewport.addChild(scene.paths);
|
|
134918
135812
|
viewport.addChild(scene.nodes);
|
|
@@ -135004,6 +135898,7 @@ const OverworldMapPanelContent = ({
|
|
|
135004
135898
|
const scene = renderer.renderScene(mapData, true);
|
|
135005
135899
|
viewport.addChild(scene.background);
|
|
135006
135900
|
viewport.addChild(scene.tiles);
|
|
135901
|
+
viewport.addChild(scene.licenseGrounds);
|
|
135007
135902
|
viewport.addChild(scene.bridges);
|
|
135008
135903
|
viewport.addChild(scene.paths);
|
|
135009
135904
|
viewport.addChild(scene.nodes);
|
|
@@ -135354,7 +136249,7 @@ const OverworldMapPanelContent = ({
|
|
|
135354
136249
|
};
|
|
135355
136250
|
}, [stableCollectionKey, width, height]);
|
|
135356
136251
|
useEffect(() => {
|
|
135357
|
-
var _a;
|
|
136252
|
+
var _a, _b;
|
|
135358
136253
|
if (!isInitializedRef.current) {
|
|
135359
136254
|
return;
|
|
135360
136255
|
}
|
|
@@ -135397,14 +136292,57 @@ const OverworldMapPanelContent = ({
|
|
|
135397
136292
|
buildingGraphics.destroy();
|
|
135398
136293
|
}
|
|
135399
136294
|
}
|
|
136295
|
+
const currentSprites = (_b = sceneContainersRef.current) == null ? void 0 : _b.spriteInstances;
|
|
136296
|
+
if (currentSprites && currentSprites.size > 0) {
|
|
136297
|
+
const newNodeMap = new Map(mapData.nodes.map((n2) => [n2.id, n2]));
|
|
136298
|
+
const currentIds = new Set(currentSprites.keys());
|
|
136299
|
+
const newIds = new Set(newNodeMap.keys());
|
|
136300
|
+
const toRemove = [...currentIds].filter((id2) => !newIds.has(id2));
|
|
136301
|
+
const toAdd = [...newIds].filter((id2) => !currentIds.has(id2));
|
|
136302
|
+
const toRecreate = [...newIds].filter((id2) => {
|
|
136303
|
+
if (!currentIds.has(id2)) return false;
|
|
136304
|
+
const node2 = newNodeMap.get(id2);
|
|
136305
|
+
const sprite = currentSprites.get(id2);
|
|
136306
|
+
return node2.sprite !== sprite.spriteKey;
|
|
136307
|
+
});
|
|
136308
|
+
const toUpdatePosition = [...newIds].filter((id2) => {
|
|
136309
|
+
if (!currentIds.has(id2)) return false;
|
|
136310
|
+
const node2 = newNodeMap.get(id2);
|
|
136311
|
+
const sprite = currentSprites.get(id2);
|
|
136312
|
+
return node2.sprite === sprite.spriteKey && (node2.gridX !== sprite.gridPosition.gridX || node2.gridY !== sprite.gridPosition.gridY);
|
|
136313
|
+
});
|
|
136314
|
+
if (toRemove.length === 0 && toAdd.length === 0 && toRecreate.length === 0) {
|
|
136315
|
+
for (const id2 of toUpdatePosition) {
|
|
136316
|
+
const node2 = newNodeMap.get(id2);
|
|
136317
|
+
const sprite = currentSprites.get(id2);
|
|
136318
|
+
sprite.update(node2.gridX, node2.gridY);
|
|
136319
|
+
}
|
|
136320
|
+
if (toUpdatePosition.length > 0 && pathManagerRef.current) {
|
|
136321
|
+
for (const id2 of toUpdatePosition) {
|
|
136322
|
+
const node2 = newNodeMap.get(id2);
|
|
136323
|
+
pathManagerRef.current.updateNodePosition(id2, node2.gridX, node2.gridY);
|
|
136324
|
+
}
|
|
136325
|
+
}
|
|
136326
|
+
return;
|
|
136327
|
+
}
|
|
136328
|
+
if (toRemove.length > 0 || toAdd.length > 0 || toRecreate.length > 0) {
|
|
136329
|
+
console.log("[OverworldMapPanel] Full recreation needed:", {
|
|
136330
|
+
toRemove: toRemove.length,
|
|
136331
|
+
toAdd: toAdd.length,
|
|
136332
|
+
toRecreate: toRecreate.length
|
|
136333
|
+
});
|
|
136334
|
+
}
|
|
136335
|
+
}
|
|
135400
136336
|
if (sceneContainersRef.current) {
|
|
135401
136337
|
viewport.removeChild(sceneContainersRef.current.background);
|
|
135402
136338
|
viewport.removeChild(sceneContainersRef.current.tiles);
|
|
136339
|
+
viewport.removeChild(sceneContainersRef.current.licenseGrounds);
|
|
135403
136340
|
viewport.removeChild(sceneContainersRef.current.bridges);
|
|
135404
136341
|
viewport.removeChild(sceneContainersRef.current.paths);
|
|
135405
136342
|
viewport.removeChild(sceneContainersRef.current.nodes);
|
|
135406
136343
|
sceneContainersRef.current.background.destroy({ children: true });
|
|
135407
136344
|
sceneContainersRef.current.tiles.destroy({ children: true });
|
|
136345
|
+
sceneContainersRef.current.licenseGrounds.destroy({ children: true });
|
|
135408
136346
|
sceneContainersRef.current.bridges.destroy({ children: true });
|
|
135409
136347
|
sceneContainersRef.current.paths.destroy({ children: true });
|
|
135410
136348
|
sceneContainersRef.current.nodes.destroy({ children: true });
|
|
@@ -135412,6 +136350,7 @@ const OverworldMapPanelContent = ({
|
|
|
135412
136350
|
const scene = renderer.renderScene(mapData, true);
|
|
135413
136351
|
viewport.addChild(scene.background);
|
|
135414
136352
|
viewport.addChild(scene.tiles);
|
|
136353
|
+
viewport.addChild(scene.licenseGrounds);
|
|
135415
136354
|
viewport.addChild(scene.bridges);
|
|
135416
136355
|
viewport.addChild(scene.paths);
|
|
135417
136356
|
viewport.addChild(scene.nodes);
|
|
@@ -136010,7 +136949,7 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136010
136949
|
});
|
|
136011
136950
|
const nodes = useMemo(() => {
|
|
136012
136951
|
const memberNodes = collection.members.map((membership) => {
|
|
136013
|
-
var _a2, _b, _c, _d, _e2, _f, _g;
|
|
136952
|
+
var _a2, _b, _c, _d, _e2, _f, _g, _h;
|
|
136014
136953
|
const repo = repositories.find((r2) => {
|
|
136015
136954
|
var _a3;
|
|
136016
136955
|
const repoId = ((_a3 = r2.github) == null ? void 0 : _a3.id) || r2.name;
|
|
@@ -136047,6 +136986,7 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136047
136986
|
const decorationBonus = getCollaboratorDecorationSizeBonus(collaborators);
|
|
136048
136987
|
size = size + decorationBonus;
|
|
136049
136988
|
}
|
|
136989
|
+
const license = (_e2 = repo.github) == null ? void 0 : _e2.license;
|
|
136050
136990
|
const node2 = {
|
|
136051
136991
|
id: membership.repositoryId,
|
|
136052
136992
|
name: repo.name,
|
|
@@ -136063,11 +137003,13 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
136063
137003
|
// GitHub star count for decorations
|
|
136064
137004
|
collaborators,
|
|
136065
137005
|
// Contributor count for community space decorations
|
|
137006
|
+
license,
|
|
137007
|
+
// License identifier for sign/ground treatment
|
|
136066
137008
|
dependencies: dependencies[membership.repositoryId] || [],
|
|
136067
|
-
isRoot: ((
|
|
136068
|
-
regionId: (
|
|
137009
|
+
isRoot: ((_f = membership.metadata) == null ? void 0 : _f.pinned) || false,
|
|
137010
|
+
regionId: (_g = membership.metadata) == null ? void 0 : _g.regionId,
|
|
136069
137011
|
// Preserve region assignment
|
|
136070
|
-
layout: (
|
|
137012
|
+
layout: (_h = membership.metadata) == null ? void 0 : _h.layout
|
|
136071
137013
|
// Pass saved position data
|
|
136072
137014
|
};
|
|
136073
137015
|
return node2;
|
|
@@ -137555,4 +138497,4 @@ export {
|
|
|
137555
138497
|
UPDATE_PRIORITY as y,
|
|
137556
138498
|
removeItems as z
|
|
137557
138499
|
};
|
|
137558
|
-
//# sourceMappingURL=index-
|
|
138500
|
+
//# sourceMappingURL=index-CBrdpzxz.js.map
|