@industry-theme/repository-composition-panels 0.7.1 → 0.7.2
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-0bMCZc9S.js → BufferResource-B9csq5DK.js} +2 -2
- package/dist/{BufferResource-0bMCZc9S.js.map → BufferResource-B9csq5DK.js.map} +1 -1
- package/dist/{CanvasRenderer-COO-STVN.js → CanvasRenderer-C5QyB3e0.js} +3 -3
- package/dist/{CanvasRenderer-COO-STVN.js.map → CanvasRenderer-C5QyB3e0.js.map} +1 -1
- package/dist/{Filter-Bhz2Fws8.js → Filter-Lk3ql6ZX.js} +2 -2
- package/dist/{Filter-Bhz2Fws8.js.map → Filter-Lk3ql6ZX.js.map} +1 -1
- package/dist/{RenderTargetSystem-CHt5j3zt.js → RenderTargetSystem-Cb8ZG8ly.js} +3 -3
- package/dist/{RenderTargetSystem-CHt5j3zt.js.map → RenderTargetSystem-Cb8ZG8ly.js.map} +1 -1
- package/dist/{WebGLRenderer-BCeLuv-q.js → WebGLRenderer-CgS0GbWi.js} +4 -4
- package/dist/{WebGLRenderer-BCeLuv-q.js.map → WebGLRenderer-CgS0GbWi.js.map} +1 -1
- package/dist/{WebGPURenderer-BZJD_jqI.js → WebGPURenderer-C6CWv4Em.js} +4 -4
- package/dist/{WebGPURenderer-BZJD_jqI.js.map → WebGPURenderer-C6CWv4Em.js.map} +1 -1
- package/dist/{browserAll-CKPglyL3.js → browserAll-B0phuaL8.js} +3 -3
- package/dist/{browserAll-CKPglyL3.js.map → browserAll-B0phuaL8.js.map} +1 -1
- package/dist/{index-OydwIwzQ.js → index-C2t7iewg.js} +126 -25
- package/dist/{index-OydwIwzQ.js.map → index-C2t7iewg.js.map} +1 -1
- package/dist/{init-BFBagRaV.js → init-BxWoDtVc.js} +3 -3
- package/dist/{init-BFBagRaV.js.map → init-BxWoDtVc.js.map} +1 -1
- package/dist/panels/overworld-map/LicenseSignTest.d.ts.map +1 -1
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts +1 -0
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/buildingSpriteGenerator.d.ts.map +1 -1
- 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-Bv5OfnQp.js +3 -0
- package/dist/webworkerAll-Bv5OfnQp.js.map +1 -0
- package/package.json +1 -1
- package/dist/webworkerAll-Cg7mdcVI.js +0 -3
- package/dist/webworkerAll-Cg7mdcVI.js.map +0 -1
|
@@ -105994,7 +105994,7 @@ const browserExt = {
|
|
|
105994
105994
|
},
|
|
105995
105995
|
test: () => true,
|
|
105996
105996
|
load: async () => {
|
|
105997
|
-
await import("./browserAll-
|
|
105997
|
+
await import("./browserAll-B0phuaL8.js");
|
|
105998
105998
|
}
|
|
105999
105999
|
};
|
|
106000
106000
|
const webworkerExt = {
|
|
@@ -106005,7 +106005,7 @@ const webworkerExt = {
|
|
|
106005
106005
|
},
|
|
106006
106006
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
106007
106007
|
load: async () => {
|
|
106008
|
-
await import("./webworkerAll-
|
|
106008
|
+
await import("./webworkerAll-Bv5OfnQp.js");
|
|
106009
106009
|
}
|
|
106010
106010
|
};
|
|
106011
106011
|
class ObservablePoint {
|
|
@@ -118248,19 +118248,19 @@ async function autoDetectRenderer(options) {
|
|
|
118248
118248
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
118249
118249
|
const rendererType = preferredOrder[i2];
|
|
118250
118250
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
118251
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
118251
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-C6CWv4Em.js");
|
|
118252
118252
|
RendererClass = WebGPURenderer;
|
|
118253
118253
|
finalOptions = { ...options, ...options.webgpu };
|
|
118254
118254
|
break;
|
|
118255
118255
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
118256
118256
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
118257
118257
|
)) {
|
|
118258
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
118258
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-CgS0GbWi.js");
|
|
118259
118259
|
RendererClass = WebGLRenderer;
|
|
118260
118260
|
finalOptions = { ...options, ...options.webgl };
|
|
118261
118261
|
break;
|
|
118262
118262
|
} else if (rendererType === "canvas") {
|
|
118263
|
-
const { CanvasRenderer } = await import("./CanvasRenderer-
|
|
118263
|
+
const { CanvasRenderer } = await import("./CanvasRenderer-C5QyB3e0.js");
|
|
118264
118264
|
RendererClass = CanvasRenderer;
|
|
118265
118265
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
118266
118266
|
break;
|
|
@@ -132619,7 +132619,6 @@ function generateBuildingSprite(config) {
|
|
|
132619
132619
|
building.lineTo(isoWidth / 2, -height);
|
|
132620
132620
|
building.lineTo(isoWidth / 2, 0);
|
|
132621
132621
|
building.stroke();
|
|
132622
|
-
const decorationBaseY = isoDepthY + 12;
|
|
132623
132622
|
if (stars && stars > 0) {
|
|
132624
132623
|
const tier = getStarTier(stars);
|
|
132625
132624
|
if (tier) {
|
|
@@ -132635,9 +132634,10 @@ function generateBuildingSprite(config) {
|
|
|
132635
132634
|
decoration = generateStatueSprite(tier.color);
|
|
132636
132635
|
break;
|
|
132637
132636
|
}
|
|
132638
|
-
const decorationX =
|
|
132637
|
+
const decorationX = -isoWidth / 4;
|
|
132638
|
+
const decorationY = 0;
|
|
132639
132639
|
decoration.x = decorationX;
|
|
132640
|
-
decoration.y =
|
|
132640
|
+
decoration.y = decorationY;
|
|
132641
132641
|
decoration.scale.set(1.8);
|
|
132642
132642
|
building.addChild(decoration);
|
|
132643
132643
|
const countText = new Text({
|
|
@@ -132652,7 +132652,7 @@ function generateBuildingSprite(config) {
|
|
|
132652
132652
|
resolution: 2
|
|
132653
132653
|
});
|
|
132654
132654
|
countText.x = decorationX;
|
|
132655
|
-
countText.y =
|
|
132655
|
+
countText.y = decorationY + 18;
|
|
132656
132656
|
countText.anchor.set(0.5, 0);
|
|
132657
132657
|
building.addChild(countText);
|
|
132658
132658
|
}
|
|
@@ -132675,9 +132675,10 @@ function generateBuildingSprite(config) {
|
|
|
132675
132675
|
decoration = generateBandstandSprite(tier.color);
|
|
132676
132676
|
break;
|
|
132677
132677
|
}
|
|
132678
|
-
const decorationX =
|
|
132678
|
+
const decorationX = isoWidth / 4;
|
|
132679
|
+
const decorationY = 0;
|
|
132679
132680
|
decoration.x = decorationX;
|
|
132680
|
-
decoration.y =
|
|
132681
|
+
decoration.y = decorationY;
|
|
132681
132682
|
decoration.scale.set(1.8);
|
|
132682
132683
|
building.addChild(decoration);
|
|
132683
132684
|
const countText = new Text({
|
|
@@ -132692,7 +132693,7 @@ function generateBuildingSprite(config) {
|
|
|
132692
132693
|
resolution: 2
|
|
132693
132694
|
});
|
|
132694
132695
|
countText.x = decorationX;
|
|
132695
|
-
countText.y =
|
|
132696
|
+
countText.y = decorationY + 18;
|
|
132696
132697
|
countText.anchor.set(0.5, 0);
|
|
132697
132698
|
building.addChild(countText);
|
|
132698
132699
|
}
|
|
@@ -133640,6 +133641,9 @@ class IsometricRenderer {
|
|
|
133640
133641
|
if (instance.licenseSign) {
|
|
133641
133642
|
nodes.addChild(instance.licenseSign);
|
|
133642
133643
|
}
|
|
133644
|
+
if (instance.ownerAvatar) {
|
|
133645
|
+
nodes.addChild(instance.ownerAvatar);
|
|
133646
|
+
}
|
|
133643
133647
|
nodes.addChild(instance.label);
|
|
133644
133648
|
if (instance.hoverLabel) {
|
|
133645
133649
|
nodes.addChild(instance.hoverLabel);
|
|
@@ -133909,7 +133913,6 @@ class IsometricRenderer {
|
|
|
133909
133913
|
});
|
|
133910
133914
|
container.addChild(sprite);
|
|
133911
133915
|
}
|
|
133912
|
-
const decorationBaseY = footprintHeight * 0.5;
|
|
133913
133916
|
if (node2.stars && node2.stars > 0) {
|
|
133914
133917
|
const tier = getStarTier(node2.stars);
|
|
133915
133918
|
if (tier) {
|
|
@@ -133925,9 +133928,10 @@ class IsometricRenderer {
|
|
|
133925
133928
|
decoration = generateStatueSprite(tier.color);
|
|
133926
133929
|
break;
|
|
133927
133930
|
}
|
|
133928
|
-
const decorationX =
|
|
133931
|
+
const decorationX = -footprintWidth / 2;
|
|
133932
|
+
const decorationY = 0;
|
|
133929
133933
|
decoration.x = decorationX;
|
|
133930
|
-
decoration.y =
|
|
133934
|
+
decoration.y = decorationY;
|
|
133931
133935
|
decoration.scale.set(1.8);
|
|
133932
133936
|
container.addChild(decoration);
|
|
133933
133937
|
const countText = new Text({
|
|
@@ -133942,7 +133946,7 @@ class IsometricRenderer {
|
|
|
133942
133946
|
resolution: 2
|
|
133943
133947
|
});
|
|
133944
133948
|
countText.x = decorationX;
|
|
133945
|
-
countText.y =
|
|
133949
|
+
countText.y = decorationY + 18;
|
|
133946
133950
|
countText.anchor.set(0.5, 0);
|
|
133947
133951
|
container.addChild(countText);
|
|
133948
133952
|
}
|
|
@@ -133965,9 +133969,10 @@ class IsometricRenderer {
|
|
|
133965
133969
|
decoration = generateBandstandSprite(tier.color);
|
|
133966
133970
|
break;
|
|
133967
133971
|
}
|
|
133968
|
-
const decorationX =
|
|
133972
|
+
const decorationX = footprintWidth / 2;
|
|
133973
|
+
const decorationY = 0;
|
|
133969
133974
|
decoration.x = decorationX;
|
|
133970
|
-
decoration.y =
|
|
133975
|
+
decoration.y = decorationY;
|
|
133971
133976
|
decoration.scale.set(1.8);
|
|
133972
133977
|
container.addChild(decoration);
|
|
133973
133978
|
const countText = new Text({
|
|
@@ -133982,11 +133987,46 @@ class IsometricRenderer {
|
|
|
133982
133987
|
resolution: 2
|
|
133983
133988
|
});
|
|
133984
133989
|
countText.x = decorationX;
|
|
133985
|
-
countText.y =
|
|
133990
|
+
countText.y = decorationY + 18;
|
|
133986
133991
|
countText.anchor.set(0.5, 0);
|
|
133987
133992
|
container.addChild(countText);
|
|
133988
133993
|
}
|
|
133989
133994
|
}
|
|
133995
|
+
if (node2.ownerAvatar) {
|
|
133996
|
+
try {
|
|
133997
|
+
const avatarSize = 24;
|
|
133998
|
+
const avatarY = footprintHeight - avatarSize / 2;
|
|
133999
|
+
const background = new Graphics();
|
|
134000
|
+
background.circle(0, avatarY, avatarSize / 2);
|
|
134001
|
+
background.fill({ color: 6710886 });
|
|
134002
|
+
container.addChild(background);
|
|
134003
|
+
const mask = new Graphics();
|
|
134004
|
+
mask.circle(0, avatarY, avatarSize / 2);
|
|
134005
|
+
mask.fill({ color: 16777215 });
|
|
134006
|
+
container.addChild(mask);
|
|
134007
|
+
const avatarTexture = Texture.from(node2.ownerAvatar);
|
|
134008
|
+
if (avatarTexture) {
|
|
134009
|
+
const avatar = new Sprite(avatarTexture);
|
|
134010
|
+
avatar.anchor.set(0.5, 0.5);
|
|
134011
|
+
avatar.x = 0;
|
|
134012
|
+
avatar.y = avatarY;
|
|
134013
|
+
avatar.mask = mask;
|
|
134014
|
+
const updateSize = () => {
|
|
134015
|
+
const w2 = avatarTexture.width;
|
|
134016
|
+
const h2 = avatarTexture.height;
|
|
134017
|
+
if (w2 > 0 && h2 > 0) {
|
|
134018
|
+
avatar.scale.set(avatarSize / w2, avatarSize / h2);
|
|
134019
|
+
}
|
|
134020
|
+
};
|
|
134021
|
+
updateSize();
|
|
134022
|
+
if (avatarTexture.source) {
|
|
134023
|
+
avatarTexture.source.on("update", updateSize);
|
|
134024
|
+
}
|
|
134025
|
+
container.addChild(avatar);
|
|
134026
|
+
}
|
|
134027
|
+
} catch {
|
|
134028
|
+
}
|
|
134029
|
+
}
|
|
133990
134030
|
const highlight = this.createHighlight(
|
|
133991
134031
|
node2.gridX,
|
|
133992
134032
|
node2.gridY,
|
|
@@ -134194,6 +134234,45 @@ class IsometricRenderer {
|
|
|
134194
134234
|
licenseSign.zIndex = sprite.zIndex + 0.15;
|
|
134195
134235
|
label.visible = false;
|
|
134196
134236
|
}
|
|
134237
|
+
let ownerAvatar;
|
|
134238
|
+
if (node2.ownerAvatar) {
|
|
134239
|
+
try {
|
|
134240
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134241
|
+
const avatarSize = 24;
|
|
134242
|
+
ownerAvatar = new Container();
|
|
134243
|
+
const background = new Graphics();
|
|
134244
|
+
background.circle(0, 0, avatarSize / 2);
|
|
134245
|
+
background.fill({ color: 6710886 });
|
|
134246
|
+
ownerAvatar.addChild(background);
|
|
134247
|
+
const mask = new Graphics();
|
|
134248
|
+
mask.circle(0, 0, avatarSize / 2);
|
|
134249
|
+
mask.fill({ color: 16777215 });
|
|
134250
|
+
ownerAvatar.addChild(mask);
|
|
134251
|
+
const avatarTexture = Texture.from(node2.ownerAvatar);
|
|
134252
|
+
if (avatarTexture) {
|
|
134253
|
+
const avatar = new Sprite(avatarTexture);
|
|
134254
|
+
avatar.anchor.set(0.5, 0.5);
|
|
134255
|
+
avatar.mask = mask;
|
|
134256
|
+
const updateSize = () => {
|
|
134257
|
+
const w2 = avatarTexture.width;
|
|
134258
|
+
const h2 = avatarTexture.height;
|
|
134259
|
+
if (w2 > 0 && h2 > 0) {
|
|
134260
|
+
avatar.scale.set(avatarSize / w2, avatarSize / h2);
|
|
134261
|
+
}
|
|
134262
|
+
};
|
|
134263
|
+
updateSize();
|
|
134264
|
+
if (avatarTexture.source) {
|
|
134265
|
+
avatarTexture.source.on("update", updateSize);
|
|
134266
|
+
}
|
|
134267
|
+
ownerAvatar.addChild(avatar);
|
|
134268
|
+
}
|
|
134269
|
+
ownerAvatar.x = screenX;
|
|
134270
|
+
ownerAvatar.y = screenY + footprint.height - avatarSize / 2;
|
|
134271
|
+
ownerAvatar.zIndex = sprite.zIndex + 0.12;
|
|
134272
|
+
} catch {
|
|
134273
|
+
ownerAvatar = void 0;
|
|
134274
|
+
}
|
|
134275
|
+
}
|
|
134197
134276
|
const instance = {
|
|
134198
134277
|
sprite,
|
|
134199
134278
|
highlight,
|
|
@@ -134201,6 +134280,7 @@ class IsometricRenderer {
|
|
|
134201
134280
|
weathering,
|
|
134202
134281
|
licenseGround,
|
|
134203
134282
|
licenseSign,
|
|
134283
|
+
ownerAvatar,
|
|
134204
134284
|
gridPosition: { gridX: node2.gridX, gridY: node2.gridY },
|
|
134205
134285
|
size: sizeMultiplier,
|
|
134206
134286
|
spriteKey: node2.sprite,
|
|
@@ -134240,6 +134320,12 @@ class IsometricRenderer {
|
|
|
134240
134320
|
licenseSign.y = pos.screenY + footprint.height * 0.75;
|
|
134241
134321
|
licenseSign.zIndex = getIsometricZIndex(gridX, gridY) + 0.15;
|
|
134242
134322
|
}
|
|
134323
|
+
if (ownerAvatar) {
|
|
134324
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134325
|
+
ownerAvatar.x = pos.screenX;
|
|
134326
|
+
ownerAvatar.y = pos.screenY + footprint.height - 12;
|
|
134327
|
+
ownerAvatar.zIndex = getIsometricZIndex(gridX, gridY) + 0.12;
|
|
134328
|
+
}
|
|
134243
134329
|
instance.gridPosition = { gridX, gridY };
|
|
134244
134330
|
},
|
|
134245
134331
|
destroy: () => {
|
|
@@ -134249,6 +134335,7 @@ class IsometricRenderer {
|
|
|
134249
134335
|
weathering == null ? void 0 : weathering.destroy();
|
|
134250
134336
|
licenseGround == null ? void 0 : licenseGround.destroy();
|
|
134251
134337
|
licenseSign == null ? void 0 : licenseSign.destroy();
|
|
134338
|
+
ownerAvatar == null ? void 0 : ownerAvatar.destroy();
|
|
134252
134339
|
}
|
|
134253
134340
|
};
|
|
134254
134341
|
spriteInstances.set(node2.id, instance);
|
|
@@ -135442,7 +135529,8 @@ function nodesToUnifiedOverworldMap(nodes, options = {}) {
|
|
|
135442
135529
|
subdivisions,
|
|
135443
135530
|
stars: node2.stars,
|
|
135444
135531
|
collaborators: node2.collaborators,
|
|
135445
|
-
license: node2.license
|
|
135532
|
+
license: node2.license,
|
|
135533
|
+
ownerAvatar: node2.ownerAvatar
|
|
135446
135534
|
};
|
|
135447
135535
|
});
|
|
135448
135536
|
const paths = [];
|
|
@@ -135568,7 +135656,10 @@ const OverworldMapPanelContent = ({
|
|
|
135568
135656
|
const rendererRef = useRef(null);
|
|
135569
135657
|
const [isRendering, setIsRendering] = useState(true);
|
|
135570
135658
|
const [initializationComplete, setInitializationComplete] = useState(0);
|
|
135571
|
-
const visibleDimensionsRef = useRef({
|
|
135659
|
+
const visibleDimensionsRef = useRef({
|
|
135660
|
+
width: width || 800,
|
|
135661
|
+
height: height || 600
|
|
135662
|
+
});
|
|
135572
135663
|
const placeholdersRef = useRef(null);
|
|
135573
135664
|
const sceneContainersRef = useRef(null);
|
|
135574
135665
|
const offsetRef = useRef({
|
|
@@ -135790,7 +135881,10 @@ const OverworldMapPanelContent = ({
|
|
|
135790
135881
|
const firstRegion = mapData.regions[0];
|
|
135791
135882
|
const bounds = firstRegion.bounds;
|
|
135792
135883
|
const topCorner = gridToScreen(bounds.x, bounds.y);
|
|
135793
|
-
const bottomCorner = gridToScreen(
|
|
135884
|
+
const bottomCorner = gridToScreen(
|
|
135885
|
+
bounds.x + bounds.width,
|
|
135886
|
+
bounds.y + bounds.height
|
|
135887
|
+
);
|
|
135794
135888
|
const leftCorner = gridToScreen(bounds.x, bounds.y + bounds.height);
|
|
135795
135889
|
const rightCorner = gridToScreen(bounds.x + bounds.width, bounds.y);
|
|
135796
135890
|
const spriteHeightOffset = 140;
|
|
@@ -136036,7 +136130,10 @@ const OverworldMapPanelContent = ({
|
|
|
136036
136130
|
resizeObserver = new ResizeObserver((entries) => {
|
|
136037
136131
|
for (const entry of entries) {
|
|
136038
136132
|
const { width: newWidth, height: newHeight } = entry.contentRect;
|
|
136039
|
-
visibleDimensionsRef.current = {
|
|
136133
|
+
visibleDimensionsRef.current = {
|
|
136134
|
+
width: newWidth,
|
|
136135
|
+
height: newHeight
|
|
136136
|
+
};
|
|
136040
136137
|
if (viewportRef.current) {
|
|
136041
136138
|
viewportRef.current.resize(newWidth, newHeight);
|
|
136042
136139
|
}
|
|
@@ -136142,7 +136239,11 @@ const OverworldMapPanelContent = ({
|
|
|
136142
136239
|
if (toUpdatePosition.length > 0 && pathManagerRef.current) {
|
|
136143
136240
|
for (const id2 of toUpdatePosition) {
|
|
136144
136241
|
const node2 = newNodeMap.get(id2);
|
|
136145
|
-
pathManagerRef.current.updateNodePosition(
|
|
136242
|
+
pathManagerRef.current.updateNodePosition(
|
|
136243
|
+
id2,
|
|
136244
|
+
node2.gridX,
|
|
136245
|
+
node2.gridY
|
|
136246
|
+
);
|
|
136146
136247
|
}
|
|
136147
136248
|
}
|
|
136148
136249
|
return;
|
|
@@ -138317,4 +138418,4 @@ export {
|
|
|
138317
138418
|
UPDATE_PRIORITY as y,
|
|
138318
138419
|
removeItems as z
|
|
138319
138420
|
};
|
|
138320
|
-
//# sourceMappingURL=index-
|
|
138421
|
+
//# sourceMappingURL=index-C2t7iewg.js.map
|