@almadar/ui 5.54.0 → 5.56.0
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/avl/index.cjs +144 -95
- package/dist/avl/index.js +146 -97
- package/dist/components/game/molecules/GameCanvas3D.d.ts +4 -0
- package/dist/components/game/molecules/IsometricCanvas.d.ts +5 -1
- package/dist/components/game/molecules/three/index.cjs +150 -111
- package/dist/components/game/molecules/three/index.js +150 -111
- package/dist/components/game/organisms/BattleBoard.d.ts +5 -1
- package/dist/components/game/organisms/GameBoard3D.d.ts +5 -1
- package/dist/components/game/organisms/RoguelikeBoard.d.ts +3 -1
- package/dist/components/game/organisms/TowerDefenseBoard.d.ts +4 -1
- package/dist/components/game/organisms/WorldMapBoard.d.ts +5 -1
- package/dist/components/game/templates/GameCanvas3DBattleTemplate.d.ts +5 -1
- package/dist/components/game/templates/GameCanvas3DCastleTemplate.d.ts +5 -1
- package/dist/components/game/templates/GameCanvas3DWorldMapTemplate.d.ts +5 -1
- package/dist/components/index.cjs +81 -42
- package/dist/components/index.js +81 -42
- package/dist/providers/index.cjs +132 -86
- package/dist/providers/index.js +132 -86
- package/dist/runtime/index.cjs +131 -82
- package/dist/runtime/index.js +133 -84
- package/package.json +1 -1
|
@@ -2559,6 +2559,8 @@ var GameCanvas3D = forwardRef(
|
|
|
2559
2559
|
attackTargets = [],
|
|
2560
2560
|
selectedTileIds = [],
|
|
2561
2561
|
selectedUnitId = null,
|
|
2562
|
+
unitScale = 1,
|
|
2563
|
+
scale = 0.45,
|
|
2562
2564
|
children
|
|
2563
2565
|
}, ref) => {
|
|
2564
2566
|
const containerRef = useRef(null);
|
|
@@ -2775,12 +2777,18 @@ var GameCanvas3D = forwardRef(
|
|
|
2775
2777
|
},
|
|
2776
2778
|
[selectedTileIds, hoveredTile, validMoves, attackTargets, handleTileClick, handleTileHover]
|
|
2777
2779
|
);
|
|
2780
|
+
const UNIT_BASE_MODEL_SCALE = 0.5;
|
|
2781
|
+
const UNIT_BASE_BILLBOARD_HEIGHT = 1.2;
|
|
2782
|
+
const UNIT_BASE_PRIMITIVE_RADIUS = 0.3;
|
|
2778
2783
|
const DefaultUnitRenderer = useCallback(
|
|
2779
2784
|
({ unit, position }) => {
|
|
2780
2785
|
const isSelected = selectedUnitId === unit.id;
|
|
2781
2786
|
const color = unit.faction === "player" ? 4491519 : unit.faction === "enemy" ? 16729156 : 16777028;
|
|
2782
2787
|
const hasAtlas = unitAtlasUrl(unit) !== null;
|
|
2783
2788
|
const initialFrame = hasAtlas ? resolveUnitFrame(unit.id) : null;
|
|
2789
|
+
const modelScale = UNIT_BASE_MODEL_SCALE * unitScale;
|
|
2790
|
+
const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale;
|
|
2791
|
+
const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale;
|
|
2784
2792
|
return /* @__PURE__ */ jsxs(
|
|
2785
2793
|
"group",
|
|
2786
2794
|
{
|
|
@@ -2798,7 +2806,8 @@ var GameCanvas3D = forwardRef(
|
|
|
2798
2806
|
UnitSpriteBillboard,
|
|
2799
2807
|
{
|
|
2800
2808
|
sheetUrl: initialFrame.sheetUrl,
|
|
2801
|
-
resolveFrame: () => resolveUnitFrame(unit.id)
|
|
2809
|
+
resolveFrame: () => resolveUnitFrame(unit.id),
|
|
2810
|
+
height: billboardHeight
|
|
2802
2811
|
}
|
|
2803
2812
|
) })
|
|
2804
2813
|
) : unit.modelUrl ? (
|
|
@@ -2807,22 +2816,22 @@ var GameCanvas3D = forwardRef(
|
|
|
2807
2816
|
ModelLoader,
|
|
2808
2817
|
{
|
|
2809
2818
|
url: unit.modelUrl,
|
|
2810
|
-
scale:
|
|
2819
|
+
scale: modelScale,
|
|
2811
2820
|
fallbackGeometry: "box",
|
|
2812
2821
|
castShadow: true
|
|
2813
2822
|
}
|
|
2814
2823
|
)
|
|
2815
2824
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2816
|
-
/* @__PURE__ */ jsxs("mesh", { position: [0,
|
|
2817
|
-
/* @__PURE__ */ jsx("cylinderGeometry", { args: [
|
|
2825
|
+
/* @__PURE__ */ jsxs("mesh", { position: [0, primitiveRadius, 0], children: [
|
|
2826
|
+
/* @__PURE__ */ jsx("cylinderGeometry", { args: [primitiveRadius, primitiveRadius, primitiveRadius * 0.33, 8] }),
|
|
2818
2827
|
/* @__PURE__ */ jsx("meshStandardMaterial", { color })
|
|
2819
2828
|
] }),
|
|
2820
|
-
/* @__PURE__ */ jsxs("mesh", { position: [0,
|
|
2821
|
-
/* @__PURE__ */ jsx("capsuleGeometry", { args: [0.
|
|
2829
|
+
/* @__PURE__ */ jsxs("mesh", { position: [0, primitiveRadius * 2, 0], children: [
|
|
2830
|
+
/* @__PURE__ */ jsx("capsuleGeometry", { args: [primitiveRadius * 0.67, primitiveRadius * 1.33, 4, 8] }),
|
|
2822
2831
|
/* @__PURE__ */ jsx("meshStandardMaterial", { color })
|
|
2823
2832
|
] }),
|
|
2824
|
-
/* @__PURE__ */ jsxs("mesh", { position: [0,
|
|
2825
|
-
/* @__PURE__ */ jsx("sphereGeometry", { args: [0.
|
|
2833
|
+
/* @__PURE__ */ jsxs("mesh", { position: [0, primitiveRadius * 3, 0], children: [
|
|
2834
|
+
/* @__PURE__ */ jsx("sphereGeometry", { args: [primitiveRadius * 0.4, 8, 8] }),
|
|
2826
2835
|
/* @__PURE__ */ jsx("meshStandardMaterial", { color })
|
|
2827
2836
|
] })
|
|
2828
2837
|
] }),
|
|
@@ -2855,7 +2864,7 @@ var GameCanvas3D = forwardRef(
|
|
|
2855
2864
|
}
|
|
2856
2865
|
);
|
|
2857
2866
|
},
|
|
2858
|
-
[selectedUnitId, handleUnitClick, resolveUnitFrame]
|
|
2867
|
+
[selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale]
|
|
2859
2868
|
);
|
|
2860
2869
|
const DefaultFeatureRenderer = useCallback(
|
|
2861
2870
|
({
|
|
@@ -2998,33 +3007,35 @@ var GameCanvas3D = forwardRef(
|
|
|
2998
3007
|
fadeStrength: 1
|
|
2999
3008
|
}
|
|
3000
3009
|
),
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3010
|
+
/* @__PURE__ */ jsxs("group", { scale, children: [
|
|
3011
|
+
tiles.map((tile, index) => {
|
|
3012
|
+
const position = gridToWorld2(
|
|
3013
|
+
tile.x,
|
|
3014
|
+
tile.z ?? tile.y ?? 0,
|
|
3015
|
+
tile.elevation ?? 0
|
|
3016
|
+
);
|
|
3017
|
+
const Renderer = CustomTileRenderer || DefaultTileRenderer;
|
|
3018
|
+
return /* @__PURE__ */ jsx(Renderer, { tile, position }, tile.id ?? `tile-${index}`);
|
|
3019
|
+
}),
|
|
3020
|
+
features.map((feature, index) => {
|
|
3021
|
+
const position = gridToWorld2(
|
|
3022
|
+
feature.x,
|
|
3023
|
+
feature.z ?? feature.y ?? 0,
|
|
3024
|
+
(feature.elevation ?? 0) + 0.5
|
|
3025
|
+
);
|
|
3026
|
+
const Renderer = CustomFeatureRenderer || DefaultFeatureRenderer;
|
|
3027
|
+
return /* @__PURE__ */ jsx(Renderer, { feature, position }, feature.id ?? `feature-${index}`);
|
|
3028
|
+
}),
|
|
3029
|
+
units.map((unit) => {
|
|
3030
|
+
const position = gridToWorld2(
|
|
3031
|
+
unit.x ?? 0,
|
|
3032
|
+
unit.z ?? unit.y ?? 0,
|
|
3033
|
+
(unit.elevation ?? 0) + 0.5
|
|
3034
|
+
);
|
|
3035
|
+
const Renderer = CustomUnitRenderer || DefaultUnitRenderer;
|
|
3036
|
+
return /* @__PURE__ */ jsx(Renderer, { unit, position }, unit.id);
|
|
3037
|
+
})
|
|
3038
|
+
] }),
|
|
3028
3039
|
children,
|
|
3029
3040
|
/* @__PURE__ */ jsx(
|
|
3030
3041
|
OrbitControls,
|
|
@@ -4212,6 +4223,8 @@ function GameBoard3D({
|
|
|
4212
4223
|
features = [],
|
|
4213
4224
|
cameraMode = "perspective",
|
|
4214
4225
|
backgroundColor = "#2a1a1a",
|
|
4226
|
+
unitScale = 1,
|
|
4227
|
+
scale = 0.45,
|
|
4215
4228
|
tileClickEvent,
|
|
4216
4229
|
unitClickEvent,
|
|
4217
4230
|
attackEvent,
|
|
@@ -4312,6 +4325,8 @@ function GameBoard3D({
|
|
|
4312
4325
|
selectedUnitId,
|
|
4313
4326
|
validMoves,
|
|
4314
4327
|
attackTargets,
|
|
4328
|
+
unitScale,
|
|
4329
|
+
scale,
|
|
4315
4330
|
className: "game-board-3d__canvas w-full min-h-[85vh]"
|
|
4316
4331
|
}
|
|
4317
4332
|
),
|
|
@@ -4552,32 +4567,36 @@ var Box = React11.forwardRef(
|
|
|
4552
4567
|
}
|
|
4553
4568
|
);
|
|
4554
4569
|
Box.displayName = "Box";
|
|
4570
|
+
var CDN = "https://almadar-kflow-assets.web.app/shared/3d/dungeon/floor";
|
|
4571
|
+
var FLOOR_WALL = `${CDN}/template-floor-detail-a.glb`;
|
|
4572
|
+
var FLOOR_DIRT = `${CDN}/template-floor-detail.glb`;
|
|
4573
|
+
var FLOOR_OPEN = `${CDN}/template-floor.glb`;
|
|
4555
4574
|
var DEFAULT_3D_BATTLE_TILES = [
|
|
4556
|
-
{ id: "t00", x: 0, y: 0, z: 0, type: "stone", passable: false },
|
|
4557
|
-
{ id: "t10", x: 1, y: 0, z: 0, type: "stone", passable: false },
|
|
4558
|
-
{ id: "t20", x: 2, y: 0, z: 0, type: "stone", passable: false },
|
|
4559
|
-
{ id: "t30", x: 3, y: 0, z: 0, type: "stone", passable: false },
|
|
4560
|
-
{ id: "t40", x: 4, y: 0, z: 0, type: "stone", passable: false },
|
|
4561
|
-
{ id: "t01", x: 0, y: 1, z: 1, type: "stone", passable: false },
|
|
4562
|
-
{ id: "t11", x: 1, y: 1, z: 1, type: "dirt", passable: true },
|
|
4563
|
-
{ id: "t21", x: 2, y: 1, z: 1, type: "grass", passable: true },
|
|
4564
|
-
{ id: "t31", x: 3, y: 1, z: 1, type: "grass", passable: true },
|
|
4565
|
-
{ id: "t41", x: 4, y: 1, z: 1, type: "stone", passable: false },
|
|
4566
|
-
{ id: "t02", x: 0, y: 2, z: 2, type: "stone", passable: false },
|
|
4567
|
-
{ id: "t12", x: 1, y: 2, z: 2, type: "grass", passable: true },
|
|
4568
|
-
{ id: "t22", x: 2, y: 2, z: 2, type: "dirt", passable: true },
|
|
4569
|
-
{ id: "t32", x: 3, y: 2, z: 2, type: "grass", passable: true },
|
|
4570
|
-
{ id: "t42", x: 4, y: 2, z: 2, type: "stone", passable: false },
|
|
4571
|
-
{ id: "t03", x: 0, y: 3, z: 3, type: "stone", passable: false },
|
|
4572
|
-
{ id: "t13", x: 1, y: 3, z: 3, type: "grass", passable: true },
|
|
4573
|
-
{ id: "t23", x: 2, y: 3, z: 3, type: "grass", passable: true },
|
|
4574
|
-
{ id: "t33", x: 3, y: 3, z: 3, type: "dirt", passable: true },
|
|
4575
|
-
{ id: "t43", x: 4, y: 3, z: 3, type: "stone", passable: false },
|
|
4576
|
-
{ id: "t04", x: 0, y: 4, z: 4, type: "stone", passable: false },
|
|
4577
|
-
{ id: "t14", x: 1, y: 4, z: 4, type: "stone", passable: false },
|
|
4578
|
-
{ id: "t24", x: 2, y: 4, z: 4, type: "stone", passable: false },
|
|
4579
|
-
{ id: "t34", x: 3, y: 4, z: 4, type: "stone", passable: false },
|
|
4580
|
-
{ id: "t44", x: 4, y: 4, z: 4, type: "stone", passable: false }
|
|
4575
|
+
{ id: "t00", x: 0, y: 0, z: 0, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4576
|
+
{ id: "t10", x: 1, y: 0, z: 0, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4577
|
+
{ id: "t20", x: 2, y: 0, z: 0, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4578
|
+
{ id: "t30", x: 3, y: 0, z: 0, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4579
|
+
{ id: "t40", x: 4, y: 0, z: 0, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4580
|
+
{ id: "t01", x: 0, y: 1, z: 1, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4581
|
+
{ id: "t11", x: 1, y: 1, z: 1, type: "dirt", passable: true, modelUrl: FLOOR_DIRT },
|
|
4582
|
+
{ id: "t21", x: 2, y: 1, z: 1, type: "grass", passable: true, modelUrl: FLOOR_OPEN },
|
|
4583
|
+
{ id: "t31", x: 3, y: 1, z: 1, type: "grass", passable: true, modelUrl: FLOOR_OPEN },
|
|
4584
|
+
{ id: "t41", x: 4, y: 1, z: 1, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4585
|
+
{ id: "t02", x: 0, y: 2, z: 2, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4586
|
+
{ id: "t12", x: 1, y: 2, z: 2, type: "grass", passable: true, modelUrl: FLOOR_OPEN },
|
|
4587
|
+
{ id: "t22", x: 2, y: 2, z: 2, type: "dirt", passable: true, modelUrl: FLOOR_DIRT },
|
|
4588
|
+
{ id: "t32", x: 3, y: 2, z: 2, type: "grass", passable: true, modelUrl: FLOOR_OPEN },
|
|
4589
|
+
{ id: "t42", x: 4, y: 2, z: 2, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4590
|
+
{ id: "t03", x: 0, y: 3, z: 3, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4591
|
+
{ id: "t13", x: 1, y: 3, z: 3, type: "grass", passable: true, modelUrl: FLOOR_OPEN },
|
|
4592
|
+
{ id: "t23", x: 2, y: 3, z: 3, type: "grass", passable: true, modelUrl: FLOOR_OPEN },
|
|
4593
|
+
{ id: "t33", x: 3, y: 3, z: 3, type: "dirt", passable: true, modelUrl: FLOOR_DIRT },
|
|
4594
|
+
{ id: "t43", x: 4, y: 3, z: 3, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4595
|
+
{ id: "t04", x: 0, y: 4, z: 4, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4596
|
+
{ id: "t14", x: 1, y: 4, z: 4, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4597
|
+
{ id: "t24", x: 2, y: 4, z: 4, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4598
|
+
{ id: "t34", x: 3, y: 4, z: 4, type: "stone", passable: false, modelUrl: FLOOR_WALL },
|
|
4599
|
+
{ id: "t44", x: 4, y: 4, z: 4, type: "stone", passable: false, modelUrl: FLOOR_WALL }
|
|
4581
4600
|
];
|
|
4582
4601
|
var DEFAULT_3D_BATTLE_FEATURES = [
|
|
4583
4602
|
{ id: "f1", x: 2, y: 2, z: 2, type: "gold_mine", color: "#f4c542" },
|
|
@@ -4596,6 +4615,8 @@ function GameCanvas3DBattleTemplate({
|
|
|
4596
4615
|
attackEvent,
|
|
4597
4616
|
playAgainEvent,
|
|
4598
4617
|
gameEndEvent,
|
|
4618
|
+
unitScale,
|
|
4619
|
+
scale,
|
|
4599
4620
|
className
|
|
4600
4621
|
}) {
|
|
4601
4622
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -4616,6 +4637,8 @@ function GameCanvas3DBattleTemplate({
|
|
|
4616
4637
|
features,
|
|
4617
4638
|
cameraMode,
|
|
4618
4639
|
backgroundColor,
|
|
4640
|
+
unitScale,
|
|
4641
|
+
scale,
|
|
4619
4642
|
tileClickEvent,
|
|
4620
4643
|
unitClickEvent,
|
|
4621
4644
|
endTurnEvent,
|
|
@@ -4646,32 +4669,36 @@ function GameCanvas3DBattleTemplate({
|
|
|
4646
4669
|
);
|
|
4647
4670
|
}
|
|
4648
4671
|
GameCanvas3DBattleTemplate.displayName = "GameCanvas3DBattleTemplate";
|
|
4672
|
+
var CDN2 = "https://almadar-kflow-assets.web.app/shared/3d/dungeon/floor";
|
|
4673
|
+
var FLOOR_WALL2 = `${CDN2}/template-floor-detail-a.glb`;
|
|
4674
|
+
var FLOOR_DIRT2 = `${CDN2}/template-floor-detail.glb`;
|
|
4675
|
+
var FLOOR_OPEN2 = `${CDN2}/template-floor.glb`;
|
|
4649
4676
|
var DEFAULT_3D_CASTLE_TILES = [
|
|
4650
|
-
{ id: "t00", x: 0, y: 0, z: 0, type: "wall", passable: false },
|
|
4651
|
-
{ id: "t10", x: 1, y: 0, z: 0, type: "wall", passable: false },
|
|
4652
|
-
{ id: "t20", x: 2, y: 0, z: 0, type: "wall", passable: false },
|
|
4653
|
-
{ id: "t30", x: 3, y: 0, z: 0, type: "wall", passable: false },
|
|
4654
|
-
{ id: "t40", x: 4, y: 0, z: 0, type: "wall", passable: false },
|
|
4655
|
-
{ id: "t01", x: 0, y: 1, z: 1, type: "wall", passable: false },
|
|
4656
|
-
{ id: "t11", x: 1, y: 1, z: 1, type: "floor", passable: true },
|
|
4657
|
-
{ id: "t21", x: 2, y: 1, z: 1, type: "floor", passable: true },
|
|
4658
|
-
{ id: "t31", x: 3, y: 1, z: 1, type: "floor", passable: true },
|
|
4659
|
-
{ id: "t41", x: 4, y: 1, z: 1, type: "wall", passable: false },
|
|
4660
|
-
{ id: "t02", x: 0, y: 2, z: 2, type: "wall", passable: false },
|
|
4661
|
-
{ id: "t12", x: 1, y: 2, z: 2, type: "floor", passable: true },
|
|
4662
|
-
{ id: "t22", x: 2, y: 2, z: 2, type: "floor", passable: true },
|
|
4663
|
-
{ id: "t32", x: 3, y: 2, z: 2, type: "floor", passable: true },
|
|
4664
|
-
{ id: "t42", x: 4, y: 2, z: 2, type: "wall", passable: false },
|
|
4665
|
-
{ id: "t03", x: 0, y: 3, z: 3, type: "wall", passable: false },
|
|
4666
|
-
{ id: "t13", x: 1, y: 3, z: 3, type: "floor", passable: true },
|
|
4667
|
-
{ id: "t23", x: 2, y: 3, z: 3, type: "floor", passable: true },
|
|
4668
|
-
{ id: "t33", x: 3, y: 3, z: 3, type: "floor", passable: true },
|
|
4669
|
-
{ id: "t43", x: 4, y: 3, z: 3, type: "wall", passable: false },
|
|
4670
|
-
{ id: "t04", x: 0, y: 4, z: 4, type: "wall", passable: false },
|
|
4671
|
-
{ id: "t14", x: 1, y: 4, z: 4, type: "wall", passable: false },
|
|
4672
|
-
{ id: "t24", x: 2, y: 4, z: 4, type: "wall", passable: false },
|
|
4673
|
-
{ id: "t34", x: 3, y: 4, z: 4, type: "wall", passable: false },
|
|
4674
|
-
{ id: "t44", x: 4, y: 4, z: 4, type: "wall", passable: false }
|
|
4677
|
+
{ id: "t00", x: 0, y: 0, z: 0, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4678
|
+
{ id: "t10", x: 1, y: 0, z: 0, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4679
|
+
{ id: "t20", x: 2, y: 0, z: 0, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4680
|
+
{ id: "t30", x: 3, y: 0, z: 0, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4681
|
+
{ id: "t40", x: 4, y: 0, z: 0, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4682
|
+
{ id: "t01", x: 0, y: 1, z: 1, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4683
|
+
{ id: "t11", x: 1, y: 1, z: 1, type: "floor", passable: true, modelUrl: FLOOR_DIRT2 },
|
|
4684
|
+
{ id: "t21", x: 2, y: 1, z: 1, type: "floor", passable: true, modelUrl: FLOOR_OPEN2 },
|
|
4685
|
+
{ id: "t31", x: 3, y: 1, z: 1, type: "floor", passable: true, modelUrl: FLOOR_OPEN2 },
|
|
4686
|
+
{ id: "t41", x: 4, y: 1, z: 1, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4687
|
+
{ id: "t02", x: 0, y: 2, z: 2, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4688
|
+
{ id: "t12", x: 1, y: 2, z: 2, type: "floor", passable: true, modelUrl: FLOOR_OPEN2 },
|
|
4689
|
+
{ id: "t22", x: 2, y: 2, z: 2, type: "floor", passable: true, modelUrl: FLOOR_DIRT2 },
|
|
4690
|
+
{ id: "t32", x: 3, y: 2, z: 2, type: "floor", passable: true, modelUrl: FLOOR_OPEN2 },
|
|
4691
|
+
{ id: "t42", x: 4, y: 2, z: 2, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4692
|
+
{ id: "t03", x: 0, y: 3, z: 3, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4693
|
+
{ id: "t13", x: 1, y: 3, z: 3, type: "floor", passable: true, modelUrl: FLOOR_OPEN2 },
|
|
4694
|
+
{ id: "t23", x: 2, y: 3, z: 3, type: "floor", passable: true, modelUrl: FLOOR_OPEN2 },
|
|
4695
|
+
{ id: "t33", x: 3, y: 3, z: 3, type: "floor", passable: true, modelUrl: FLOOR_DIRT2 },
|
|
4696
|
+
{ id: "t43", x: 4, y: 3, z: 3, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4697
|
+
{ id: "t04", x: 0, y: 4, z: 4, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4698
|
+
{ id: "t14", x: 1, y: 4, z: 4, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4699
|
+
{ id: "t24", x: 2, y: 4, z: 4, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4700
|
+
{ id: "t34", x: 3, y: 4, z: 4, type: "wall", passable: false, modelUrl: FLOOR_WALL2 },
|
|
4701
|
+
{ id: "t44", x: 4, y: 4, z: 4, type: "wall", passable: false, modelUrl: FLOOR_WALL2 }
|
|
4675
4702
|
];
|
|
4676
4703
|
var DEFAULT_3D_CASTLE_FEATURES = [
|
|
4677
4704
|
{ id: "f1", x: 2, y: 2, z: 2, type: "chest", color: "#f4c542" },
|
|
@@ -4691,6 +4718,8 @@ function GameCanvas3DCastleTemplate({
|
|
|
4691
4718
|
playAgainEvent,
|
|
4692
4719
|
gameEndEvent,
|
|
4693
4720
|
showHeader = true,
|
|
4721
|
+
unitScale,
|
|
4722
|
+
scale,
|
|
4694
4723
|
className
|
|
4695
4724
|
}) {
|
|
4696
4725
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -4721,6 +4750,8 @@ function GameCanvas3DCastleTemplate({
|
|
|
4721
4750
|
features,
|
|
4722
4751
|
cameraMode,
|
|
4723
4752
|
backgroundColor,
|
|
4753
|
+
unitScale,
|
|
4754
|
+
scale,
|
|
4724
4755
|
tileClickEvent: buildingClickEvent,
|
|
4725
4756
|
unitClickEvent,
|
|
4726
4757
|
endTurnEvent,
|
|
@@ -4743,32 +4774,36 @@ function GameCanvas3DCastleTemplate({
|
|
|
4743
4774
|
);
|
|
4744
4775
|
}
|
|
4745
4776
|
GameCanvas3DCastleTemplate.displayName = "GameCanvas3DCastleTemplate";
|
|
4777
|
+
var CDN3 = "https://almadar-kflow-assets.web.app/shared/3d/dungeon/floor";
|
|
4778
|
+
var FLOOR_WALL3 = `${CDN3}/template-floor-detail-a.glb`;
|
|
4779
|
+
var FLOOR_DIRT3 = `${CDN3}/template-floor-detail.glb`;
|
|
4780
|
+
var FLOOR_OPEN3 = `${CDN3}/template-floor.glb`;
|
|
4746
4781
|
var DEFAULT_3D_WORLDMAP_TILES = [
|
|
4747
|
-
{ id: "t00", x: 0, y: 0, z: 0, type: "mountain", passable: false },
|
|
4748
|
-
{ id: "t10", x: 1, y: 0, z: 0, type: "mountain", passable: false },
|
|
4749
|
-
{ id: "t20", x: 2, y: 0, z: 0, type: "water", passable: false },
|
|
4750
|
-
{ id: "t30", x: 3, y: 0, z: 0, type: "mountain", passable: false },
|
|
4751
|
-
{ id: "t40", x: 4, y: 0, z: 0, type: "mountain", passable: false },
|
|
4752
|
-
{ id: "t01", x: 0, y: 1, z: 1, type: "mountain", passable: false },
|
|
4753
|
-
{ id: "t11", x: 1, y: 1, z: 1, type: "grass", passable: true },
|
|
4754
|
-
{ id: "t21", x: 2, y: 1, z: 1, type: "grass", passable: true },
|
|
4755
|
-
{ id: "t31", x: 3, y: 1, z: 1, type: "grass", passable: true },
|
|
4756
|
-
{ id: "t41", x: 4, y: 1, z: 1, type: "water", passable: false },
|
|
4757
|
-
{ id: "t02", x: 0, y: 2, z: 2, type: "water", passable: false },
|
|
4758
|
-
{ id: "t12", x: 1, y: 2, z: 2, type: "grass", passable: true },
|
|
4759
|
-
{ id: "t22", x: 2, y: 2, z: 2, type: "road", passable: true },
|
|
4760
|
-
{ id: "t32", x: 3, y: 2, z: 2, type: "grass", passable: true },
|
|
4761
|
-
{ id: "t42", x: 4, y: 2, z: 2, type: "mountain", passable: false },
|
|
4762
|
-
{ id: "t03", x: 0, y: 3, z: 3, type: "mountain", passable: false },
|
|
4763
|
-
{ id: "t13", x: 1, y: 3, z: 3, type: "grass", passable: true },
|
|
4764
|
-
{ id: "t23", x: 2, y: 3, z: 3, type: "grass", passable: true },
|
|
4765
|
-
{ id: "t33", x: 3, y: 3, z: 3, type: "road", passable: true },
|
|
4766
|
-
{ id: "t43", x: 4, y: 3, z: 3, type: "mountain", passable: false },
|
|
4767
|
-
{ id: "t04", x: 0, y: 4, z: 4, type: "mountain", passable: false },
|
|
4768
|
-
{ id: "t14", x: 1, y: 4, z: 4, type: "water", passable: false },
|
|
4769
|
-
{ id: "t24", x: 2, y: 4, z: 4, type: "grass", passable: true },
|
|
4770
|
-
{ id: "t34", x: 3, y: 4, z: 4, type: "mountain", passable: false },
|
|
4771
|
-
{ id: "t44", x: 4, y: 4, z: 4, type: "mountain", passable: false }
|
|
4782
|
+
{ id: "t00", x: 0, y: 0, z: 0, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4783
|
+
{ id: "t10", x: 1, y: 0, z: 0, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4784
|
+
{ id: "t20", x: 2, y: 0, z: 0, type: "water", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4785
|
+
{ id: "t30", x: 3, y: 0, z: 0, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4786
|
+
{ id: "t40", x: 4, y: 0, z: 0, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4787
|
+
{ id: "t01", x: 0, y: 1, z: 1, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4788
|
+
{ id: "t11", x: 1, y: 1, z: 1, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4789
|
+
{ id: "t21", x: 2, y: 1, z: 1, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4790
|
+
{ id: "t31", x: 3, y: 1, z: 1, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4791
|
+
{ id: "t41", x: 4, y: 1, z: 1, type: "water", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4792
|
+
{ id: "t02", x: 0, y: 2, z: 2, type: "water", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4793
|
+
{ id: "t12", x: 1, y: 2, z: 2, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4794
|
+
{ id: "t22", x: 2, y: 2, z: 2, type: "road", passable: true, modelUrl: FLOOR_DIRT3 },
|
|
4795
|
+
{ id: "t32", x: 3, y: 2, z: 2, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4796
|
+
{ id: "t42", x: 4, y: 2, z: 2, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4797
|
+
{ id: "t03", x: 0, y: 3, z: 3, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4798
|
+
{ id: "t13", x: 1, y: 3, z: 3, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4799
|
+
{ id: "t23", x: 2, y: 3, z: 3, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4800
|
+
{ id: "t33", x: 3, y: 3, z: 3, type: "road", passable: true, modelUrl: FLOOR_DIRT3 },
|
|
4801
|
+
{ id: "t43", x: 4, y: 3, z: 3, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4802
|
+
{ id: "t04", x: 0, y: 4, z: 4, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4803
|
+
{ id: "t14", x: 1, y: 4, z: 4, type: "water", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4804
|
+
{ id: "t24", x: 2, y: 4, z: 4, type: "grass", passable: true, modelUrl: FLOOR_OPEN3 },
|
|
4805
|
+
{ id: "t34", x: 3, y: 4, z: 4, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 },
|
|
4806
|
+
{ id: "t44", x: 4, y: 4, z: 4, type: "mountain", passable: false, modelUrl: FLOOR_WALL3 }
|
|
4772
4807
|
];
|
|
4773
4808
|
var DEFAULT_3D_WORLDMAP_FEATURES = [
|
|
4774
4809
|
{ id: "f1", x: 2, y: 2, z: 2, type: "capital", color: "#f4c542" },
|
|
@@ -4787,6 +4822,8 @@ function GameCanvas3DWorldMapTemplate({
|
|
|
4787
4822
|
attackEvent,
|
|
4788
4823
|
playAgainEvent,
|
|
4789
4824
|
gameEndEvent,
|
|
4825
|
+
unitScale,
|
|
4826
|
+
scale,
|
|
4790
4827
|
className
|
|
4791
4828
|
}) {
|
|
4792
4829
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -4802,6 +4839,8 @@ function GameCanvas3DWorldMapTemplate({
|
|
|
4802
4839
|
features,
|
|
4803
4840
|
cameraMode,
|
|
4804
4841
|
backgroundColor,
|
|
4842
|
+
unitScale,
|
|
4843
|
+
scale,
|
|
4805
4844
|
tileClickEvent,
|
|
4806
4845
|
unitClickEvent,
|
|
4807
4846
|
endTurnEvent,
|
|
@@ -69,6 +69,10 @@ export interface BattleBoardProps extends DisplayStateProps {
|
|
|
69
69
|
scale?: number;
|
|
70
70
|
/** Unit draw-size multiplier */
|
|
71
71
|
unitScale?: number;
|
|
72
|
+
/** Ratio of unit draw height to scaledFloorHeight. Default 1.5. */
|
|
73
|
+
spriteHeightRatio?: number;
|
|
74
|
+
/** Max unit draw width as a ratio of scaledTileWidth. Default 0.6. */
|
|
75
|
+
spriteMaxWidthRatio?: number;
|
|
72
76
|
/** Header area -- receives battle context */
|
|
73
77
|
header?: (ctx: BattleSlotContext) => React.ReactNode;
|
|
74
78
|
/** Sidebar content (combat log, unit roster, etc.) */
|
|
@@ -121,7 +125,7 @@ export interface BattleBoardProps extends DisplayStateProps {
|
|
|
121
125
|
}>;
|
|
122
126
|
className?: string;
|
|
123
127
|
}
|
|
124
|
-
export declare function BattleBoard({ entity, tiles: propTiles, units: propUnits, features: propFeatures, assetManifest: propAssetManifest, scale, unitScale, header, sidebar, actions, overlay, gameOverOverlay, onAttack, onGameEnd, onUnitMove, calculateDamage, onDrawEffects, hasActiveEffects, effectSpriteUrls, resolveUnitFrame, tileClickEvent, unitClickEvent, endTurnEvent, cancelEvent, gameEndEvent, playAgainEvent, attackEvent, className, }: BattleBoardProps): React.JSX.Element;
|
|
128
|
+
export declare function BattleBoard({ entity, tiles: propTiles, units: propUnits, features: propFeatures, assetManifest: propAssetManifest, scale, unitScale, spriteHeightRatio, spriteMaxWidthRatio, header, sidebar, actions, overlay, gameOverOverlay, onAttack, onGameEnd, onUnitMove, calculateDamage, onDrawEffects, hasActiveEffects, effectSpriteUrls, resolveUnitFrame, tileClickEvent, unitClickEvent, endTurnEvent, cancelEvent, gameEndEvent, playAgainEvent, attackEvent, className, }: BattleBoardProps): React.JSX.Element;
|
|
125
129
|
export declare namespace BattleBoard {
|
|
126
130
|
var displayName: string;
|
|
127
131
|
}
|
|
@@ -24,6 +24,10 @@ export interface GameBoard3DProps {
|
|
|
24
24
|
cameraMode?: CameraMode;
|
|
25
25
|
/** Background color forwarded to GameCanvas3D. */
|
|
26
26
|
backgroundColor?: string;
|
|
27
|
+
/** Unit draw-size multiplier forwarded to GameCanvas3D. Default 1. */
|
|
28
|
+
unitScale?: number;
|
|
29
|
+
/** Board zoom/group scale forwarded to GameCanvas3D. Default 0.45. */
|
|
30
|
+
scale?: number;
|
|
27
31
|
/** Declarative tile click event emitted to the model. */
|
|
28
32
|
tileClickEvent?: EventEmit<{
|
|
29
33
|
tileId: string;
|
|
@@ -55,7 +59,7 @@ export interface GameBoard3DProps {
|
|
|
55
59
|
/** Additional CSS class. */
|
|
56
60
|
className?: string;
|
|
57
61
|
}
|
|
58
|
-
export declare function GameBoard3D({ entity, tiles, features, cameraMode, backgroundColor, tileClickEvent, unitClickEvent, attackEvent, endTurnEvent, cancelEvent, playAgainEvent, gameEndEvent, className, }: GameBoard3DProps): React.JSX.Element | null;
|
|
62
|
+
export declare function GameBoard3D({ entity, tiles, features, cameraMode, backgroundColor, unitScale, scale, tileClickEvent, unitClickEvent, attackEvent, endTurnEvent, cancelEvent, playAgainEvent, gameEndEvent, className, }: GameBoard3DProps): React.JSX.Element | null;
|
|
59
63
|
export declare namespace GameBoard3D {
|
|
60
64
|
var displayName: string;
|
|
61
65
|
}
|
|
@@ -42,6 +42,8 @@ export interface RoguelikeBoardProps extends DisplayStateProps {
|
|
|
42
42
|
assetManifest?: RoguelikeAssetManifest;
|
|
43
43
|
scale?: number;
|
|
44
44
|
unitScale?: number;
|
|
45
|
+
spriteHeightRatio?: number;
|
|
46
|
+
spriteMaxWidthRatio?: number;
|
|
45
47
|
moveEvent?: EventEmit<{
|
|
46
48
|
dx: number;
|
|
47
49
|
dy: number;
|
|
@@ -52,7 +54,7 @@ export interface RoguelikeBoardProps extends DisplayStateProps {
|
|
|
52
54
|
}>;
|
|
53
55
|
className?: string;
|
|
54
56
|
}
|
|
55
|
-
export declare function RoguelikeBoard({ entity, tiles: propTiles, enemies: propEnemies, items: propItems, player: propPlayer, playerHp: propPlayerHp, playerMaxHp: propPlayerMaxHp, playerAttack: propPlayerAttack, depth: propDepth, result: propResult, phase: propPhase, stairsX: propStairsX, stairsY: propStairsY, assetManifest: propAssetManifest, scale, unitScale, moveEvent, playAgainEvent, gameEndEvent, className, }: RoguelikeBoardProps): React.JSX.Element;
|
|
57
|
+
export declare function RoguelikeBoard({ entity, tiles: propTiles, enemies: propEnemies, items: propItems, player: propPlayer, playerHp: propPlayerHp, playerMaxHp: propPlayerMaxHp, playerAttack: propPlayerAttack, depth: propDepth, result: propResult, phase: propPhase, stairsX: propStairsX, stairsY: propStairsY, assetManifest: propAssetManifest, scale, unitScale, spriteHeightRatio, spriteMaxWidthRatio, moveEvent, playAgainEvent, gameEndEvent, className, }: RoguelikeBoardProps): React.JSX.Element;
|
|
56
58
|
export declare namespace RoguelikeBoard {
|
|
57
59
|
var displayName: string;
|
|
58
60
|
}
|
|
@@ -44,6 +44,9 @@ export interface TowerDefenseBoardProps extends DisplayStateProps {
|
|
|
44
44
|
waveActive?: boolean;
|
|
45
45
|
towerCost?: number;
|
|
46
46
|
scale?: number;
|
|
47
|
+
unitScale?: number;
|
|
48
|
+
spriteHeightRatio?: number;
|
|
49
|
+
spriteMaxWidthRatio?: number;
|
|
47
50
|
placeTowerEvent?: EventEmit<{
|
|
48
51
|
x: number;
|
|
49
52
|
y: number;
|
|
@@ -57,7 +60,7 @@ export interface TowerDefenseBoardProps extends DisplayStateProps {
|
|
|
57
60
|
}>;
|
|
58
61
|
className?: string;
|
|
59
62
|
}
|
|
60
|
-
export declare function TowerDefenseBoard({ entity, tiles: propTiles, path: propPath, towers: propTowers, creeps: propCreeps, gold: propGold, lives: propLives, wave: propWave, maxWaves: propMaxWaves, result: propResult, waveActive: propWaveActive, towerCost, scale, placeTowerEvent, startWaveEvent, playAgainEvent, gameEndEvent, className, }: TowerDefenseBoardProps): React.JSX.Element;
|
|
63
|
+
export declare function TowerDefenseBoard({ entity, tiles: propTiles, path: propPath, towers: propTowers, creeps: propCreeps, gold: propGold, lives: propLives, wave: propWave, maxWaves: propMaxWaves, result: propResult, waveActive: propWaveActive, towerCost, scale, unitScale, spriteHeightRatio, spriteMaxWidthRatio, placeTowerEvent, startWaveEvent, playAgainEvent, gameEndEvent, className, }: TowerDefenseBoardProps): React.JSX.Element;
|
|
61
64
|
export declare namespace TowerDefenseBoard {
|
|
62
65
|
var displayName: string;
|
|
63
66
|
}
|
|
@@ -87,6 +87,10 @@ export interface WorldMapBoardProps {
|
|
|
87
87
|
scale?: number;
|
|
88
88
|
/** Unit draw-size multiplier */
|
|
89
89
|
unitScale?: number;
|
|
90
|
+
/** Ratio of unit draw height to scaledFloorHeight. Default 1.5. */
|
|
91
|
+
spriteHeightRatio?: number;
|
|
92
|
+
/** Max unit draw width as a ratio of scaledTileWidth. Default 0.6. */
|
|
93
|
+
spriteMaxWidthRatio?: number;
|
|
90
94
|
/** Allow selecting / moving ALL heroes (including enemy). For testing. */
|
|
91
95
|
allowMoveAllHeroes?: boolean;
|
|
92
96
|
/** Custom movement range validator */
|
|
@@ -144,7 +148,7 @@ export interface WorldMapBoardProps {
|
|
|
144
148
|
effectSpriteUrls?: AssetUrl[];
|
|
145
149
|
resolveUnitFrame?: (unitId: string) => ResolvedFrame | null;
|
|
146
150
|
}
|
|
147
|
-
export declare function WorldMapBoard({ entity, tiles: propTiles, units: propUnits, features: propFeatures, assetManifest: propAssetManifest, isLoading, scale, unitScale, allowMoveAllHeroes, isInRange, heroSelectEvent, heroMoveEvent, battleEncounterEvent, featureEnterEvent, tileClickEvent, header, sidePanel, overlay, footer, onHeroSelect, onHeroMove, onBattleEncounter, onFeatureEnter, diamondTopY, enableCamera, effectSpriteUrls, resolveUnitFrame, className, }: WorldMapBoardProps): React.JSX.Element;
|
|
151
|
+
export declare function WorldMapBoard({ entity, tiles: propTiles, units: propUnits, features: propFeatures, assetManifest: propAssetManifest, isLoading, scale, unitScale, spriteHeightRatio, spriteMaxWidthRatio, allowMoveAllHeroes, isInRange, heroSelectEvent, heroMoveEvent, battleEncounterEvent, featureEnterEvent, tileClickEvent, header, sidePanel, overlay, footer, onHeroSelect, onHeroMove, onBattleEncounter, onFeatureEnter, diamondTopY, enableCamera, effectSpriteUrls, resolveUnitFrame, className, }: WorldMapBoardProps): React.JSX.Element;
|
|
148
152
|
export declare namespace WorldMapBoard {
|
|
149
153
|
var displayName: string;
|
|
150
154
|
}
|
|
@@ -51,6 +51,10 @@ export interface GameCanvas3DBattleTemplateProps extends TemplateProps {
|
|
|
51
51
|
exitEvent?: string;
|
|
52
52
|
/** Show turn indicator overlay */
|
|
53
53
|
showTurnIndicator?: boolean;
|
|
54
|
+
/** Unit draw-size multiplier forwarded to GameBoard3D. Default 1. */
|
|
55
|
+
unitScale?: number;
|
|
56
|
+
/** Board zoom/group scale forwarded to GameBoard3D. Default 0.45. */
|
|
57
|
+
scale?: number;
|
|
54
58
|
}
|
|
55
59
|
/**
|
|
56
60
|
* GameCanvas3DBattleTemplate Component
|
|
@@ -68,7 +72,7 @@ export interface GameCanvas3DBattleTemplateProps extends TemplateProps {
|
|
|
68
72
|
* />
|
|
69
73
|
* ```
|
|
70
74
|
*/
|
|
71
|
-
export declare function GameCanvas3DBattleTemplate({ entity, tiles: propTiles, features: propFeatures, cameraMode, backgroundColor, tileClickEvent, unitClickEvent, endTurnEvent, cancelEvent, attackEvent, playAgainEvent, gameEndEvent, className, }: GameCanvas3DBattleTemplateProps): React.JSX.Element | null;
|
|
75
|
+
export declare function GameCanvas3DBattleTemplate({ entity, tiles: propTiles, features: propFeatures, cameraMode, backgroundColor, tileClickEvent, unitClickEvent, endTurnEvent, cancelEvent, attackEvent, playAgainEvent, gameEndEvent, unitScale, scale, className, }: GameCanvas3DBattleTemplateProps): React.JSX.Element | null;
|
|
72
76
|
export declare namespace GameCanvas3DBattleTemplate {
|
|
73
77
|
var displayName: string;
|
|
74
78
|
}
|
|
@@ -56,6 +56,10 @@ export interface GameCanvas3DCastleTemplateProps extends TemplateProps {
|
|
|
56
56
|
exitEvent?: string;
|
|
57
57
|
/** Show castle name header */
|
|
58
58
|
showHeader?: boolean;
|
|
59
|
+
/** Unit draw-size multiplier forwarded to GameBoard3D. Default 1. */
|
|
60
|
+
unitScale?: number;
|
|
61
|
+
/** Board zoom/group scale forwarded to GameBoard3D. Default 0.45. */
|
|
62
|
+
scale?: number;
|
|
59
63
|
}
|
|
60
64
|
/**
|
|
61
65
|
* GameCanvas3DCastleTemplate Component
|
|
@@ -73,7 +77,7 @@ export interface GameCanvas3DCastleTemplateProps extends TemplateProps {
|
|
|
73
77
|
* />
|
|
74
78
|
* ```
|
|
75
79
|
*/
|
|
76
|
-
export declare function GameCanvas3DCastleTemplate({ entity, tiles: propTiles, features: propFeatures, cameraMode, backgroundColor, buildingClickEvent, unitClickEvent, endTurnEvent, cancelEvent, attackEvent, playAgainEvent, gameEndEvent, showHeader, className, }: GameCanvas3DCastleTemplateProps): React.JSX.Element | null;
|
|
80
|
+
export declare function GameCanvas3DCastleTemplate({ entity, tiles: propTiles, features: propFeatures, cameraMode, backgroundColor, buildingClickEvent, unitClickEvent, endTurnEvent, cancelEvent, attackEvent, playAgainEvent, gameEndEvent, showHeader, unitScale, scale, className, }: GameCanvas3DCastleTemplateProps): React.JSX.Element | null;
|
|
77
81
|
export declare namespace GameCanvas3DCastleTemplate {
|
|
78
82
|
var displayName: string;
|
|
79
83
|
}
|
|
@@ -63,6 +63,10 @@ export interface GameCanvas3DWorldMapTemplateProps extends TemplateProps {
|
|
|
63
63
|
cameraChangeEvent?: string;
|
|
64
64
|
/** Exit/back event name */
|
|
65
65
|
exitEvent?: string;
|
|
66
|
+
/** Unit draw-size multiplier forwarded to GameBoard3D. Default 1. */
|
|
67
|
+
unitScale?: number;
|
|
68
|
+
/** Board zoom/group scale forwarded to GameBoard3D. Default 0.45. */
|
|
69
|
+
scale?: number;
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
72
|
* GameCanvas3DWorldMapTemplate Component
|
|
@@ -81,7 +85,7 @@ export interface GameCanvas3DWorldMapTemplateProps extends TemplateProps {
|
|
|
81
85
|
* />
|
|
82
86
|
* ```
|
|
83
87
|
*/
|
|
84
|
-
export declare function GameCanvas3DWorldMapTemplate({ entity, tiles: propTiles, features: propFeatures, cameraMode, backgroundColor, tileClickEvent, unitClickEvent, endTurnEvent, cancelEvent, attackEvent, playAgainEvent, gameEndEvent, className, }: GameCanvas3DWorldMapTemplateProps): React.JSX.Element | null;
|
|
88
|
+
export declare function GameCanvas3DWorldMapTemplate({ entity, tiles: propTiles, features: propFeatures, cameraMode, backgroundColor, tileClickEvent, unitClickEvent, endTurnEvent, cancelEvent, attackEvent, playAgainEvent, gameEndEvent, unitScale, scale, className, }: GameCanvas3DWorldMapTemplateProps): React.JSX.Element | null;
|
|
85
89
|
export declare namespace GameCanvas3DWorldMapTemplate {
|
|
86
90
|
var displayName: string;
|
|
87
91
|
}
|