@almadar/ui 5.68.0 → 5.70.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 +111 -56
- package/dist/avl/index.js +111 -56
- package/dist/components/game/organisms/HolidayRunnerBoard.d.ts +19 -17
- package/dist/components/game/organisms/RacingBoard.d.ts +25 -17
- package/dist/components/game/organisms/SpaceShmupBoard.d.ts +28 -11
- package/dist/components/index.cjs +103 -56
- package/dist/components/index.js +103 -56
- package/dist/providers/index.cjs +111 -56
- package/dist/providers/index.js +111 -56
- package/dist/runtime/index.cjs +111 -56
- package/dist/runtime/index.js +111 -56
- package/package.json +1 -1
- package/themes/almadar-website.css +2 -2
- package/themes/almadar.css +2 -2
- package/themes/arctic.css +2 -2
- package/themes/kiosk.css +2 -2
- package/themes/lavender.css +3 -3
- package/themes/midnight.css +2 -2
- package/themes/neon.css +2 -2
- package/themes/notion-editorial.css +2 -2
- package/themes/sunset.css +2 -2
- package/themes/trait-wars.css +2 -2
package/dist/avl/index.cjs
CHANGED
|
@@ -10916,6 +10916,14 @@ var init_ControlButton = __esm({
|
|
|
10916
10916
|
}
|
|
10917
10917
|
});
|
|
10918
10918
|
|
|
10919
|
+
// components/game/organisms/utils/spriteSheetConstants.ts
|
|
10920
|
+
var SHEET_COLUMNS;
|
|
10921
|
+
var init_spriteSheetConstants = __esm({
|
|
10922
|
+
"components/game/organisms/utils/spriteSheetConstants.ts"() {
|
|
10923
|
+
SHEET_COLUMNS = 8;
|
|
10924
|
+
}
|
|
10925
|
+
});
|
|
10926
|
+
|
|
10919
10927
|
// components/game/organisms/utils/spriteAnimation.ts
|
|
10920
10928
|
function inferDirection(dx, dy) {
|
|
10921
10929
|
if (dx === 0 && dy === 0) return "se";
|
|
@@ -15239,7 +15247,13 @@ function IsometricCanvas({
|
|
|
15239
15247
|
const img = unitSpriteUrl ? getImage(unitSpriteUrl) : null;
|
|
15240
15248
|
const unitDrawH = scaledFloorHeight * spriteHeightRatio * unitScale;
|
|
15241
15249
|
const maxUnitW = scaledTileWidth * spriteMaxWidthRatio * unitScale;
|
|
15242
|
-
const
|
|
15250
|
+
const SHEET_ROWS = 5;
|
|
15251
|
+
const sheetFrameW = img ? img.naturalWidth / SHEET_COLUMNS : 0;
|
|
15252
|
+
const sheetFrameH = img ? img.naturalHeight / SHEET_ROWS : 0;
|
|
15253
|
+
const imgIsSheet = img ? img.naturalWidth % SHEET_COLUMNS === 0 && img.naturalHeight % SHEET_ROWS === 0 && Math.abs(sheetFrameW - sheetFrameH) < 2 : false;
|
|
15254
|
+
const frameW = imgIsSheet ? sheetFrameW : img?.naturalWidth ?? 1;
|
|
15255
|
+
const frameH = imgIsSheet ? sheetFrameH : img?.naturalHeight ?? 1;
|
|
15256
|
+
const ar = frameW / (frameH || 1);
|
|
15243
15257
|
let drawH = unitDrawH;
|
|
15244
15258
|
let drawW = unitDrawH * ar;
|
|
15245
15259
|
if (drawW > maxUnitW) {
|
|
@@ -15253,7 +15267,11 @@ function IsometricCanvas({
|
|
|
15253
15267
|
ctx.save();
|
|
15254
15268
|
ctx.globalAlpha = 0.25;
|
|
15255
15269
|
if (img) {
|
|
15256
|
-
|
|
15270
|
+
if (imgIsSheet) {
|
|
15271
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
15272
|
+
} else {
|
|
15273
|
+
ctx.drawImage(img, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
15274
|
+
}
|
|
15257
15275
|
} else {
|
|
15258
15276
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
15259
15277
|
ctx.beginPath();
|
|
@@ -15297,14 +15315,21 @@ function IsometricCanvas({
|
|
|
15297
15315
|
ctx.restore();
|
|
15298
15316
|
} else if (img) {
|
|
15299
15317
|
const spriteY = groundY - drawH - breatheOffset;
|
|
15318
|
+
const drawUnit = (x) => {
|
|
15319
|
+
if (imgIsSheet) {
|
|
15320
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, x, spriteY, drawW, drawH);
|
|
15321
|
+
} else {
|
|
15322
|
+
ctx.drawImage(img, x, spriteY, drawW, drawH);
|
|
15323
|
+
}
|
|
15324
|
+
};
|
|
15300
15325
|
if (unit.team) {
|
|
15301
15326
|
ctx.save();
|
|
15302
15327
|
ctx.shadowColor = unit.team === "player" ? "rgba(0, 150, 255, 0.6)" : "rgba(255, 50, 50, 0.6)";
|
|
15303
15328
|
ctx.shadowBlur = 12 * scale;
|
|
15304
|
-
|
|
15329
|
+
drawUnit(centerX - drawW / 2);
|
|
15305
15330
|
ctx.restore();
|
|
15306
15331
|
} else {
|
|
15307
|
-
|
|
15332
|
+
drawUnit(centerX - drawW / 2);
|
|
15308
15333
|
}
|
|
15309
15334
|
} else {
|
|
15310
15335
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
@@ -15597,6 +15622,7 @@ var init_IsometricCanvas = __esm({
|
|
|
15597
15622
|
init_useUnitSpriteAtlas();
|
|
15598
15623
|
init_verificationRegistry();
|
|
15599
15624
|
init_isometric();
|
|
15625
|
+
init_spriteSheetConstants();
|
|
15600
15626
|
IsometricCanvas.displayName = "IsometricCanvas";
|
|
15601
15627
|
IsometricCanvas_default = IsometricCanvas;
|
|
15602
15628
|
}
|
|
@@ -47218,35 +47244,44 @@ var init_HexStrategyBoard = __esm({
|
|
|
47218
47244
|
}
|
|
47219
47245
|
});
|
|
47220
47246
|
function HolidayRunnerBoard({
|
|
47221
|
-
|
|
47247
|
+
tiles,
|
|
47248
|
+
units,
|
|
47249
|
+
features,
|
|
47250
|
+
assetManifest,
|
|
47222
47251
|
assetBaseUrl,
|
|
47223
|
-
|
|
47224
|
-
|
|
47225
|
-
|
|
47252
|
+
scale = 0.45,
|
|
47253
|
+
showMinimap = false,
|
|
47254
|
+
enableCamera = true,
|
|
47255
|
+
tileClickEvent,
|
|
47256
|
+
unitClickEvent,
|
|
47226
47257
|
isLoading,
|
|
47227
47258
|
error,
|
|
47228
47259
|
className
|
|
47229
47260
|
}) {
|
|
47230
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
47231
|
-
|
|
47232
|
-
|
|
47233
|
-
|
|
47234
|
-
|
|
47235
|
-
|
|
47236
|
-
|
|
47237
|
-
|
|
47238
|
-
|
|
47239
|
-
|
|
47240
|
-
|
|
47241
|
-
|
|
47242
|
-
|
|
47243
|
-
|
|
47261
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
47262
|
+
IsometricCanvas_default,
|
|
47263
|
+
{
|
|
47264
|
+
tileLayout: "flat",
|
|
47265
|
+
tiles,
|
|
47266
|
+
units,
|
|
47267
|
+
features,
|
|
47268
|
+
assetManifest,
|
|
47269
|
+
assetBaseUrl,
|
|
47270
|
+
scale,
|
|
47271
|
+
showMinimap,
|
|
47272
|
+
enableCamera,
|
|
47273
|
+
tileClickEvent,
|
|
47274
|
+
unitClickEvent,
|
|
47275
|
+
isLoading,
|
|
47276
|
+
error
|
|
47277
|
+
}
|
|
47278
|
+
) });
|
|
47244
47279
|
}
|
|
47245
47280
|
var init_HolidayRunnerBoard = __esm({
|
|
47246
47281
|
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
47247
47282
|
"use client";
|
|
47248
47283
|
init_cn();
|
|
47249
|
-
|
|
47284
|
+
init_IsometricCanvas();
|
|
47250
47285
|
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
47251
47286
|
}
|
|
47252
47287
|
});
|
|
@@ -48964,25 +48999,36 @@ var init_PricingPageTemplate = __esm({
|
|
|
48964
48999
|
}
|
|
48965
49000
|
});
|
|
48966
49001
|
function RacingBoard({
|
|
48967
|
-
|
|
49002
|
+
tiles,
|
|
49003
|
+
units,
|
|
49004
|
+
features,
|
|
49005
|
+
assetManifest,
|
|
48968
49006
|
assetBaseUrl,
|
|
48969
|
-
|
|
48970
|
-
|
|
48971
|
-
|
|
48972
|
-
|
|
48973
|
-
|
|
49007
|
+
scale = 0.45,
|
|
49008
|
+
showMinimap = true,
|
|
49009
|
+
enableCamera = true,
|
|
49010
|
+
tileClickEvent,
|
|
49011
|
+
unitClickEvent,
|
|
49012
|
+
isLoading,
|
|
49013
|
+
error,
|
|
48974
49014
|
className
|
|
48975
49015
|
}) {
|
|
48976
49016
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
48977
|
-
|
|
49017
|
+
IsometricCanvas_default,
|
|
48978
49018
|
{
|
|
48979
|
-
|
|
49019
|
+
tileLayout: "flat",
|
|
49020
|
+
tiles,
|
|
49021
|
+
units,
|
|
49022
|
+
features,
|
|
49023
|
+
assetManifest,
|
|
48980
49024
|
assetBaseUrl,
|
|
48981
|
-
|
|
48982
|
-
|
|
48983
|
-
|
|
48984
|
-
|
|
48985
|
-
|
|
49025
|
+
scale,
|
|
49026
|
+
showMinimap,
|
|
49027
|
+
enableCamera,
|
|
49028
|
+
tileClickEvent,
|
|
49029
|
+
unitClickEvent,
|
|
49030
|
+
isLoading,
|
|
49031
|
+
error
|
|
48986
49032
|
}
|
|
48987
49033
|
) });
|
|
48988
49034
|
}
|
|
@@ -48990,7 +49036,7 @@ var init_RacingBoard = __esm({
|
|
|
48990
49036
|
"components/game/organisms/RacingBoard.tsx"() {
|
|
48991
49037
|
"use client";
|
|
48992
49038
|
init_cn();
|
|
48993
|
-
|
|
49039
|
+
init_IsometricCanvas();
|
|
48994
49040
|
RacingBoard.displayName = "RacingBoard";
|
|
48995
49041
|
}
|
|
48996
49042
|
});
|
|
@@ -52242,35 +52288,44 @@ var init_SokobanBoard = __esm({
|
|
|
52242
52288
|
}
|
|
52243
52289
|
});
|
|
52244
52290
|
function SpaceShmupBoard({
|
|
52245
|
-
|
|
52291
|
+
tiles,
|
|
52292
|
+
units,
|
|
52293
|
+
features,
|
|
52294
|
+
assetManifest,
|
|
52246
52295
|
assetBaseUrl,
|
|
52247
|
-
|
|
52248
|
-
|
|
52249
|
-
|
|
52296
|
+
scale = 0.45,
|
|
52297
|
+
showMinimap = false,
|
|
52298
|
+
enableCamera = true,
|
|
52299
|
+
tileClickEvent,
|
|
52300
|
+
unitClickEvent,
|
|
52250
52301
|
isLoading,
|
|
52251
52302
|
error,
|
|
52252
52303
|
className
|
|
52253
52304
|
}) {
|
|
52254
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
52255
|
-
|
|
52256
|
-
|
|
52257
|
-
|
|
52258
|
-
|
|
52259
|
-
|
|
52260
|
-
|
|
52261
|
-
|
|
52262
|
-
|
|
52263
|
-
|
|
52264
|
-
|
|
52265
|
-
|
|
52266
|
-
|
|
52267
|
-
|
|
52305
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-shmup-board relative w-full h-full", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
52306
|
+
IsometricCanvas_default,
|
|
52307
|
+
{
|
|
52308
|
+
tileLayout: "flat",
|
|
52309
|
+
tiles,
|
|
52310
|
+
units,
|
|
52311
|
+
features,
|
|
52312
|
+
assetManifest,
|
|
52313
|
+
assetBaseUrl,
|
|
52314
|
+
scale,
|
|
52315
|
+
showMinimap,
|
|
52316
|
+
enableCamera,
|
|
52317
|
+
tileClickEvent,
|
|
52318
|
+
unitClickEvent,
|
|
52319
|
+
isLoading,
|
|
52320
|
+
error
|
|
52321
|
+
}
|
|
52322
|
+
) });
|
|
52268
52323
|
}
|
|
52269
52324
|
var init_SpaceShmupBoard = __esm({
|
|
52270
52325
|
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
52271
52326
|
"use client";
|
|
52272
52327
|
init_cn();
|
|
52273
|
-
|
|
52328
|
+
init_IsometricCanvas();
|
|
52274
52329
|
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
52275
52330
|
}
|
|
52276
52331
|
});
|
package/dist/avl/index.js
CHANGED
|
@@ -10869,6 +10869,14 @@ var init_ControlButton = __esm({
|
|
|
10869
10869
|
}
|
|
10870
10870
|
});
|
|
10871
10871
|
|
|
10872
|
+
// components/game/organisms/utils/spriteSheetConstants.ts
|
|
10873
|
+
var SHEET_COLUMNS;
|
|
10874
|
+
var init_spriteSheetConstants = __esm({
|
|
10875
|
+
"components/game/organisms/utils/spriteSheetConstants.ts"() {
|
|
10876
|
+
SHEET_COLUMNS = 8;
|
|
10877
|
+
}
|
|
10878
|
+
});
|
|
10879
|
+
|
|
10872
10880
|
// components/game/organisms/utils/spriteAnimation.ts
|
|
10873
10881
|
function inferDirection(dx, dy) {
|
|
10874
10882
|
if (dx === 0 && dy === 0) return "se";
|
|
@@ -15192,7 +15200,13 @@ function IsometricCanvas({
|
|
|
15192
15200
|
const img = unitSpriteUrl ? getImage(unitSpriteUrl) : null;
|
|
15193
15201
|
const unitDrawH = scaledFloorHeight * spriteHeightRatio * unitScale;
|
|
15194
15202
|
const maxUnitW = scaledTileWidth * spriteMaxWidthRatio * unitScale;
|
|
15195
|
-
const
|
|
15203
|
+
const SHEET_ROWS = 5;
|
|
15204
|
+
const sheetFrameW = img ? img.naturalWidth / SHEET_COLUMNS : 0;
|
|
15205
|
+
const sheetFrameH = img ? img.naturalHeight / SHEET_ROWS : 0;
|
|
15206
|
+
const imgIsSheet = img ? img.naturalWidth % SHEET_COLUMNS === 0 && img.naturalHeight % SHEET_ROWS === 0 && Math.abs(sheetFrameW - sheetFrameH) < 2 : false;
|
|
15207
|
+
const frameW = imgIsSheet ? sheetFrameW : img?.naturalWidth ?? 1;
|
|
15208
|
+
const frameH = imgIsSheet ? sheetFrameH : img?.naturalHeight ?? 1;
|
|
15209
|
+
const ar = frameW / (frameH || 1);
|
|
15196
15210
|
let drawH = unitDrawH;
|
|
15197
15211
|
let drawW = unitDrawH * ar;
|
|
15198
15212
|
if (drawW > maxUnitW) {
|
|
@@ -15206,7 +15220,11 @@ function IsometricCanvas({
|
|
|
15206
15220
|
ctx.save();
|
|
15207
15221
|
ctx.globalAlpha = 0.25;
|
|
15208
15222
|
if (img) {
|
|
15209
|
-
|
|
15223
|
+
if (imgIsSheet) {
|
|
15224
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
15225
|
+
} else {
|
|
15226
|
+
ctx.drawImage(img, ghostCenterX - drawW / 2, ghostGroundY - drawH, drawW, drawH);
|
|
15227
|
+
}
|
|
15210
15228
|
} else {
|
|
15211
15229
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
15212
15230
|
ctx.beginPath();
|
|
@@ -15250,14 +15268,21 @@ function IsometricCanvas({
|
|
|
15250
15268
|
ctx.restore();
|
|
15251
15269
|
} else if (img) {
|
|
15252
15270
|
const spriteY = groundY - drawH - breatheOffset;
|
|
15271
|
+
const drawUnit = (x) => {
|
|
15272
|
+
if (imgIsSheet) {
|
|
15273
|
+
ctx.drawImage(img, 0, 0, sheetFrameW, sheetFrameH, x, spriteY, drawW, drawH);
|
|
15274
|
+
} else {
|
|
15275
|
+
ctx.drawImage(img, x, spriteY, drawW, drawH);
|
|
15276
|
+
}
|
|
15277
|
+
};
|
|
15253
15278
|
if (unit.team) {
|
|
15254
15279
|
ctx.save();
|
|
15255
15280
|
ctx.shadowColor = unit.team === "player" ? "rgba(0, 150, 255, 0.6)" : "rgba(255, 50, 50, 0.6)";
|
|
15256
15281
|
ctx.shadowBlur = 12 * scale;
|
|
15257
|
-
|
|
15282
|
+
drawUnit(centerX - drawW / 2);
|
|
15258
15283
|
ctx.restore();
|
|
15259
15284
|
} else {
|
|
15260
|
-
|
|
15285
|
+
drawUnit(centerX - drawW / 2);
|
|
15261
15286
|
}
|
|
15262
15287
|
} else {
|
|
15263
15288
|
const color = unit.team === "player" ? "#3b82f6" : unit.team === "enemy" ? "#ef4444" : "#6b7280";
|
|
@@ -15550,6 +15575,7 @@ var init_IsometricCanvas = __esm({
|
|
|
15550
15575
|
init_useUnitSpriteAtlas();
|
|
15551
15576
|
init_verificationRegistry();
|
|
15552
15577
|
init_isometric();
|
|
15578
|
+
init_spriteSheetConstants();
|
|
15553
15579
|
IsometricCanvas.displayName = "IsometricCanvas";
|
|
15554
15580
|
IsometricCanvas_default = IsometricCanvas;
|
|
15555
15581
|
}
|
|
@@ -47171,35 +47197,44 @@ var init_HexStrategyBoard = __esm({
|
|
|
47171
47197
|
}
|
|
47172
47198
|
});
|
|
47173
47199
|
function HolidayRunnerBoard({
|
|
47174
|
-
|
|
47200
|
+
tiles,
|
|
47201
|
+
units,
|
|
47202
|
+
features,
|
|
47203
|
+
assetManifest,
|
|
47175
47204
|
assetBaseUrl,
|
|
47176
|
-
|
|
47177
|
-
|
|
47178
|
-
|
|
47205
|
+
scale = 0.45,
|
|
47206
|
+
showMinimap = false,
|
|
47207
|
+
enableCamera = true,
|
|
47208
|
+
tileClickEvent,
|
|
47209
|
+
unitClickEvent,
|
|
47179
47210
|
isLoading,
|
|
47180
47211
|
error,
|
|
47181
47212
|
className
|
|
47182
47213
|
}) {
|
|
47183
|
-
return /* @__PURE__ */
|
|
47184
|
-
|
|
47185
|
-
|
|
47186
|
-
|
|
47187
|
-
|
|
47188
|
-
|
|
47189
|
-
|
|
47190
|
-
|
|
47191
|
-
|
|
47192
|
-
|
|
47193
|
-
|
|
47194
|
-
|
|
47195
|
-
|
|
47196
|
-
|
|
47214
|
+
return /* @__PURE__ */ jsx("div", { className: cn("holiday-runner-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
47215
|
+
IsometricCanvas_default,
|
|
47216
|
+
{
|
|
47217
|
+
tileLayout: "flat",
|
|
47218
|
+
tiles,
|
|
47219
|
+
units,
|
|
47220
|
+
features,
|
|
47221
|
+
assetManifest,
|
|
47222
|
+
assetBaseUrl,
|
|
47223
|
+
scale,
|
|
47224
|
+
showMinimap,
|
|
47225
|
+
enableCamera,
|
|
47226
|
+
tileClickEvent,
|
|
47227
|
+
unitClickEvent,
|
|
47228
|
+
isLoading,
|
|
47229
|
+
error
|
|
47230
|
+
}
|
|
47231
|
+
) });
|
|
47197
47232
|
}
|
|
47198
47233
|
var init_HolidayRunnerBoard = __esm({
|
|
47199
47234
|
"components/game/organisms/HolidayRunnerBoard.tsx"() {
|
|
47200
47235
|
"use client";
|
|
47201
47236
|
init_cn();
|
|
47202
|
-
|
|
47237
|
+
init_IsometricCanvas();
|
|
47203
47238
|
HolidayRunnerBoard.displayName = "HolidayRunnerBoard";
|
|
47204
47239
|
}
|
|
47205
47240
|
});
|
|
@@ -48917,25 +48952,36 @@ var init_PricingPageTemplate = __esm({
|
|
|
48917
48952
|
}
|
|
48918
48953
|
});
|
|
48919
48954
|
function RacingBoard({
|
|
48920
|
-
|
|
48955
|
+
tiles,
|
|
48956
|
+
units,
|
|
48957
|
+
features,
|
|
48958
|
+
assetManifest,
|
|
48921
48959
|
assetBaseUrl,
|
|
48922
|
-
|
|
48923
|
-
|
|
48924
|
-
|
|
48925
|
-
|
|
48926
|
-
|
|
48960
|
+
scale = 0.45,
|
|
48961
|
+
showMinimap = true,
|
|
48962
|
+
enableCamera = true,
|
|
48963
|
+
tileClickEvent,
|
|
48964
|
+
unitClickEvent,
|
|
48965
|
+
isLoading,
|
|
48966
|
+
error,
|
|
48927
48967
|
className
|
|
48928
48968
|
}) {
|
|
48929
48969
|
return /* @__PURE__ */ jsx("div", { className: cn("racing-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
48930
|
-
|
|
48970
|
+
IsometricCanvas_default,
|
|
48931
48971
|
{
|
|
48932
|
-
|
|
48972
|
+
tileLayout: "flat",
|
|
48973
|
+
tiles,
|
|
48974
|
+
units,
|
|
48975
|
+
features,
|
|
48976
|
+
assetManifest,
|
|
48933
48977
|
assetBaseUrl,
|
|
48934
|
-
|
|
48935
|
-
|
|
48936
|
-
|
|
48937
|
-
|
|
48938
|
-
|
|
48978
|
+
scale,
|
|
48979
|
+
showMinimap,
|
|
48980
|
+
enableCamera,
|
|
48981
|
+
tileClickEvent,
|
|
48982
|
+
unitClickEvent,
|
|
48983
|
+
isLoading,
|
|
48984
|
+
error
|
|
48939
48985
|
}
|
|
48940
48986
|
) });
|
|
48941
48987
|
}
|
|
@@ -48943,7 +48989,7 @@ var init_RacingBoard = __esm({
|
|
|
48943
48989
|
"components/game/organisms/RacingBoard.tsx"() {
|
|
48944
48990
|
"use client";
|
|
48945
48991
|
init_cn();
|
|
48946
|
-
|
|
48992
|
+
init_IsometricCanvas();
|
|
48947
48993
|
RacingBoard.displayName = "RacingBoard";
|
|
48948
48994
|
}
|
|
48949
48995
|
});
|
|
@@ -52195,35 +52241,44 @@ var init_SokobanBoard = __esm({
|
|
|
52195
52241
|
}
|
|
52196
52242
|
});
|
|
52197
52243
|
function SpaceShmupBoard({
|
|
52198
|
-
|
|
52244
|
+
tiles,
|
|
52245
|
+
units,
|
|
52246
|
+
features,
|
|
52247
|
+
assetManifest,
|
|
52199
52248
|
assetBaseUrl,
|
|
52200
|
-
|
|
52201
|
-
|
|
52202
|
-
|
|
52249
|
+
scale = 0.45,
|
|
52250
|
+
showMinimap = false,
|
|
52251
|
+
enableCamera = true,
|
|
52252
|
+
tileClickEvent,
|
|
52253
|
+
unitClickEvent,
|
|
52203
52254
|
isLoading,
|
|
52204
52255
|
error,
|
|
52205
52256
|
className
|
|
52206
52257
|
}) {
|
|
52207
|
-
return /* @__PURE__ */
|
|
52208
|
-
|
|
52209
|
-
|
|
52210
|
-
|
|
52211
|
-
|
|
52212
|
-
|
|
52213
|
-
|
|
52214
|
-
|
|
52215
|
-
|
|
52216
|
-
|
|
52217
|
-
|
|
52218
|
-
|
|
52219
|
-
|
|
52220
|
-
|
|
52258
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-shmup-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
52259
|
+
IsometricCanvas_default,
|
|
52260
|
+
{
|
|
52261
|
+
tileLayout: "flat",
|
|
52262
|
+
tiles,
|
|
52263
|
+
units,
|
|
52264
|
+
features,
|
|
52265
|
+
assetManifest,
|
|
52266
|
+
assetBaseUrl,
|
|
52267
|
+
scale,
|
|
52268
|
+
showMinimap,
|
|
52269
|
+
enableCamera,
|
|
52270
|
+
tileClickEvent,
|
|
52271
|
+
unitClickEvent,
|
|
52272
|
+
isLoading,
|
|
52273
|
+
error
|
|
52274
|
+
}
|
|
52275
|
+
) });
|
|
52221
52276
|
}
|
|
52222
52277
|
var init_SpaceShmupBoard = __esm({
|
|
52223
52278
|
"components/game/organisms/SpaceShmupBoard.tsx"() {
|
|
52224
52279
|
"use client";
|
|
52225
52280
|
init_cn();
|
|
52226
|
-
|
|
52281
|
+
init_IsometricCanvas();
|
|
52227
52282
|
SpaceShmupBoard.displayName = "SpaceShmupBoard";
|
|
52228
52283
|
}
|
|
52229
52284
|
});
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
3
4
|
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
4
6
|
export interface HolidayRunnerBoardProps extends DisplayStateProps {
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
/**
|
|
7
|
+
/** Ground/sky terrain tiles for the side-scroll strip */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Runner and obstacle units on the board */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Features (gifts, obstacles, etc.) on the board */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
8
16
|
assetBaseUrl?: AssetUrl;
|
|
9
|
-
/** Canvas width in pixels */
|
|
10
|
-
width?: number;
|
|
11
|
-
/** Canvas height in pixels */
|
|
12
|
-
height?: number;
|
|
13
|
-
/** Target frames per second */
|
|
14
|
-
fps?: number;
|
|
15
17
|
/** Render scale */
|
|
16
18
|
scale?: number;
|
|
17
19
|
/** Show minimap overlay */
|
|
18
20
|
showMinimap?: boolean;
|
|
19
21
|
/** Enable camera pan/zoom controls */
|
|
20
22
|
enableCamera?: boolean;
|
|
21
|
-
/** Declarative event: emits UI:{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
25
27
|
}>;
|
|
26
|
-
/** Declarative event: emits UI:{
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
29
31
|
}>;
|
|
30
32
|
}
|
|
31
|
-
export declare function HolidayRunnerBoard({
|
|
33
|
+
export declare function HolidayRunnerBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: HolidayRunnerBoardProps): React.ReactElement;
|
|
32
34
|
export declare namespace HolidayRunnerBoard {
|
|
33
35
|
var displayName: string;
|
|
34
36
|
}
|
|
@@ -1,28 +1,36 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
3
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
3
4
|
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
5
|
+
import type { IsometricCanvasProps } from '../molecules/IsometricCanvas';
|
|
4
6
|
export interface RacingBoardProps extends DisplayStateProps {
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
/**
|
|
7
|
+
/** Road + grass terrain tiles forming the race circuit */
|
|
8
|
+
tiles?: IsometricTile[];
|
|
9
|
+
/** Car units on the track */
|
|
10
|
+
units?: IsometricUnit[];
|
|
11
|
+
/** Track features (pit lane markers, start/finish line, etc.) */
|
|
12
|
+
features?: IsometricFeature[];
|
|
13
|
+
/** Asset sprite manifest (same shape as IsometricCanvas.assetManifest) */
|
|
14
|
+
assetManifest?: IsometricCanvasProps['assetManifest'];
|
|
15
|
+
/** Base URL prepended to manifest sprite paths */
|
|
8
16
|
assetBaseUrl?: AssetUrl;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/** Declarative event: emits UI:{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
/** Render scale */
|
|
18
|
+
scale?: number;
|
|
19
|
+
/** Show minimap overlay */
|
|
20
|
+
showMinimap?: boolean;
|
|
21
|
+
/** Enable camera pan/zoom controls */
|
|
22
|
+
enableCamera?: boolean;
|
|
23
|
+
/** Declarative event: emits UI:{tileClickEvent} with { x, y } on tile click */
|
|
24
|
+
tileClickEvent?: EventEmit<{
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
19
27
|
}>;
|
|
20
|
-
/** Declarative event: emits UI:{
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
/** Declarative event: emits UI:{unitClickEvent} with { unitId } on unit click */
|
|
29
|
+
unitClickEvent?: EventEmit<{
|
|
30
|
+
unitId: string;
|
|
23
31
|
}>;
|
|
24
32
|
}
|
|
25
|
-
export declare function RacingBoard({
|
|
33
|
+
export declare function RacingBoard({ tiles, units, features, assetManifest, assetBaseUrl, scale, showMinimap, enableCamera, tileClickEvent, unitClickEvent, isLoading, error, className, }: RacingBoardProps): React.ReactElement;
|
|
26
34
|
export declare namespace RacingBoard {
|
|
27
35
|
var displayName: string;
|
|
28
36
|
}
|