vibedgames 0.9.0 → 0.10.1
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/README.md +3 -2
- package/assets/align-framing.py +242 -0
- package/assets/render-model.py +406 -0
- package/assets/tilemap-editor.html +630 -0
- package/dist/THIRD_PARTY_NOTICES.txt +2 -2
- package/dist/{chunk-56OY4TEP.js → chunk-2SBBKY5C.js} +1361 -4493
- package/dist/{chunk-FC233UKH.js → chunk-2ZKS7V72.js} +16 -16
- package/dist/chunk-37LLKM73.js +124 -0
- package/dist/{chunk-BMTHAVMS.js → chunk-3HGBIUM5.js} +22 -19
- package/dist/chunk-3UGGMFJJ.js +22 -0
- package/dist/{chunk-3HUWAJQH.js → chunk-42K3BJJH.js} +93 -76
- package/dist/{chunk-ST5FC2W3.js → chunk-43P4U7CB.js} +20 -11
- package/dist/chunk-4RYTTD4D.js +53 -0
- package/dist/{chunk-WSRIF6K4.js → chunk-4UU622RK.js} +5 -4
- package/dist/chunk-52E6EKZV.js +72 -0
- package/dist/chunk-6IUFHPMV.js +62 -0
- package/dist/chunk-6KXXZXSO.js +475 -0
- package/dist/chunk-72KHWZMN.js +87 -0
- package/dist/{chunk-ZCYWDKYP.js → chunk-A556KALN.js} +14 -13
- package/dist/{chunk-UFR6G6BL.js → chunk-ABTUEIRC.js} +554 -254
- package/dist/chunk-ALPTHSUT.js +132 -0
- package/dist/{chunk-PEUP4MZR.js → chunk-AWJNAGPE.js} +6 -3
- package/dist/chunk-BJAN3RMY.js +48 -0
- package/dist/{chunk-HNRVSBRK.js → chunk-BN3Q7UEC.js} +20 -17
- package/dist/chunk-BZOMEG3X.js +412 -0
- package/dist/{chunk-ZYCSYJWX.js → chunk-COSLGSVO.js} +14 -24
- package/dist/{chunk-KZBZNTM4.js → chunk-CTY2WZQK.js} +9 -13
- package/dist/chunk-DH6WPL3X.js +47 -0
- package/dist/chunk-DPLFCKXP.js +80 -0
- package/dist/{chunk-K2U7L4RU.js → chunk-E3FJUPLT.js} +15 -21
- package/dist/chunk-E7NDOZ27.js +428 -0
- package/dist/{chunk-TBQ5BU3Q.js → chunk-F42QKWBB.js} +18 -18
- package/dist/chunk-F4J6XCHT.js +73 -0
- package/dist/chunk-FB3UDZAV.js +168 -0
- package/dist/chunk-FJXPMA63.js +48 -0
- package/dist/chunk-FNJL6Z5C.js +71 -0
- package/dist/chunk-G63MXDX2.js +45 -0
- package/dist/{chunk-VFFOT7KD.js → chunk-G66HRVDW.js} +1 -1
- package/dist/{chunk-AXTLPJ2F.js → chunk-H2C4QUTG.js} +8 -7
- package/dist/{chunk-H3IPLBXQ.js → chunk-HRKVAXNN.js} +17 -14
- package/dist/chunk-HSCTPDEU.js +126 -0
- package/dist/{chunk-UXCWSWWX.js → chunk-HSMG6U7J.js} +8 -7
- package/dist/chunk-I5LELJSK.js +22 -0
- package/dist/{chunk-7CXMMC5S.js → chunk-JN4WZCR7.js} +5 -4
- package/dist/{chunk-7QZSDU52.js → chunk-K36EOII3.js} +5 -4
- package/dist/chunk-KLFBAFXD.js +25 -0
- package/dist/{chunk-355VG7EO.js → chunk-LONQWRTR.js} +107 -77
- package/dist/{chunk-Z5TFZQ5U.js → chunk-LORGE2NB.js} +68 -62
- package/dist/{chunk-LY2GQ32S.js → chunk-MEAO33XW.js} +22 -20
- package/dist/{chunk-OD2MNYXD.js → chunk-MR5KIFI7.js} +23 -22
- package/dist/{chunk-2VUUMXAQ.js → chunk-N2UHAQXC.js} +18 -11
- package/dist/chunk-NG2X3SMF.js +91 -0
- package/dist/chunk-OFJIG4K3.js +6482 -0
- package/dist/chunk-P74GTK23.js +91 -0
- package/dist/chunk-PKM3JOKQ.js +62 -0
- package/dist/{chunk-NDHXM4PL.js → chunk-Q3XQPNF6.js} +12 -12
- package/dist/{chunk-RXHTGX7C.js → chunk-Q5NZNXJE.js} +6 -10
- package/dist/chunk-QEKVZ7BX.js +57 -0
- package/dist/chunk-QNWCBPVO.js +215 -0
- package/dist/{chunk-US6QZICZ.js → chunk-RPJR3S5S.js} +32 -18
- package/dist/chunk-RPSUFZAG.js +3307 -0
- package/dist/chunk-RRI23NK2.js +40 -0
- package/dist/{chunk-6EWHKL7Z.js → chunk-SXYQL4GK.js} +7 -6
- package/dist/{chunk-ZI6PKVXG.js → chunk-TMPBGXT4.js} +6 -5
- package/dist/{chunk-UZM6OSW5.js → chunk-UPHB5HWO.js} +15 -13
- package/dist/chunk-UTSSDFQL.js +64 -0
- package/dist/chunk-V5ADM3WC.js +741 -0
- package/dist/{chunk-25BAMW5X.js → chunk-VIEKOGKG.js} +18 -2
- package/dist/chunk-VUV5U4J5.js +117 -0
- package/dist/{chunk-LXS3NJYD.js → chunk-VZEJ2ZHE.js} +14 -15
- package/dist/chunk-W2QPNAZ3.js +58 -0
- package/dist/chunk-YLUB6252.js +45 -0
- package/dist/{chunk-Z4Z24FWO.js → chunk-YNCYMWER.js} +8 -5
- package/dist/chunk-YXOGRERG.js +91 -0
- package/dist/index.js +39 -36
- package/package.json +31 -16
- package/templates/none/src/main.ts +4 -0
- package/templates/none/vite.config.ts +0 -2
- package/templates/phaser/src/main.ts +0 -1
- package/templates/phaser/src/scenes/game-scene.ts +10 -8
- package/templates/phaser/vite.config.ts +0 -2
- package/templates/react-r3f/src/app.tsx +3 -1
- package/templates/react-r3f/src/main.tsx +1 -0
- package/templates/react-r3f/vite.config.ts +0 -2
- package/templates/threejs/src/main.ts +10 -1
- package/templates/threejs/vite.config.ts +0 -2
- package/LICENSE +0 -21
- package/dist/chunk-J6PKNPI2.js +0 -26
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module";
|
|
2
|
+
import { dirname as __pathDirname } from "node:path";
|
|
3
|
+
import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __pathDirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
require_cross_spawn
|
|
9
|
+
} from "./chunk-5535KDYI.js";
|
|
10
|
+
import {
|
|
11
|
+
consola
|
|
12
|
+
} from "./chunk-D2RF35HJ.js";
|
|
13
|
+
import {
|
|
14
|
+
ASSETS_DIR
|
|
15
|
+
} from "./chunk-YNCYMWER.js";
|
|
16
|
+
import {
|
|
17
|
+
__toESM
|
|
18
|
+
} from "./chunk-GKDUYJ7R.js";
|
|
19
|
+
|
|
20
|
+
// src/commands/asset/python.ts
|
|
21
|
+
import path from "node:path";
|
|
22
|
+
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
23
|
+
var pythonScript = (file) => (argv) => {
|
|
24
|
+
const result = import_cross_spawn.default.sync(
|
|
25
|
+
"uv",
|
|
26
|
+
["run", "--python", "3.12", "--no-project", path.join(ASSETS_DIR, file), ...argv],
|
|
27
|
+
{ stdio: "inherit" }
|
|
28
|
+
);
|
|
29
|
+
if (result.error !== void 0 && result.error !== null) {
|
|
30
|
+
consola.error(
|
|
31
|
+
`Couldn't start uv (${result.error.message}). Install it: https://docs.astral.sh/uv/getting-started/installation/`
|
|
32
|
+
);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
process.exit(result.status ?? 1);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
pythonScript
|
|
40
|
+
};
|
|
@@ -6,18 +6,19 @@ var __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
revokeLogin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-E3FJUPLT.js";
|
|
10
10
|
import {
|
|
11
11
|
clearConfig,
|
|
12
12
|
getConfig
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
consola
|
|
16
|
-
} from "./chunk-D2RF35HJ.js";
|
|
17
|
-
import "./chunk-J6PKNPI2.js";
|
|
13
|
+
} from "./chunk-Q5NZNXJE.js";
|
|
18
14
|
import {
|
|
19
15
|
defineCommand
|
|
20
16
|
} from "./chunk-MBXCVCC4.js";
|
|
17
|
+
import {
|
|
18
|
+
consola
|
|
19
|
+
} from "./chunk-D2RF35HJ.js";
|
|
20
|
+
import "./chunk-RPSUFZAG.js";
|
|
21
|
+
import "./chunk-2SBBKY5C.js";
|
|
21
22
|
import "./chunk-GKDUYJ7R.js";
|
|
22
23
|
|
|
23
24
|
// src/commands/logout.ts
|
|
@@ -6,8 +6,9 @@ var __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
isJsonObject,
|
|
9
|
-
isJsonString
|
|
10
|
-
|
|
9
|
+
isJsonString,
|
|
10
|
+
parseJson
|
|
11
|
+
} from "./chunk-RPSUFZAG.js";
|
|
11
12
|
|
|
12
13
|
// src/lib/config-file.ts
|
|
13
14
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -30,15 +31,15 @@ var findConfigPath = (dir) => {
|
|
|
30
31
|
};
|
|
31
32
|
var findProjectRoot = (dir) => {
|
|
32
33
|
const found = findConfigPath(dir);
|
|
33
|
-
return found ? path.dirname(found) : null;
|
|
34
|
+
return found !== null && found !== "" ? path.dirname(found) : null;
|
|
34
35
|
};
|
|
35
36
|
var readProjectConfig = (dir) => {
|
|
36
37
|
const file = findConfigPath(dir);
|
|
37
|
-
if (
|
|
38
|
+
if (file === null || file === "") {
|
|
38
39
|
return null;
|
|
39
40
|
}
|
|
40
41
|
const raw = readFileSync(file, "utf-8");
|
|
41
|
-
const parsed =
|
|
42
|
+
const parsed = parseJson(raw);
|
|
42
43
|
if (!isJsonObject(parsed) || !isJsonString(parsed.slug)) {
|
|
43
44
|
throw new Error(`${FILENAME} is malformed \u2014 missing "slug".`);
|
|
44
45
|
}
|
|
@@ -4,27 +4,29 @@ import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
var __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
assertKnownFlags
|
|
9
|
+
} from "./chunk-RZ4DIJQW.js";
|
|
7
10
|
import {
|
|
8
11
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Q5NZNXJE.js";
|
|
10
13
|
import {
|
|
11
14
|
isJsonOutput,
|
|
12
15
|
outputArgs,
|
|
13
16
|
writeStructured
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-COSLGSVO.js";
|
|
15
18
|
import {
|
|
16
|
-
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
defineCommand
|
|
20
|
+
} from "./chunk-MBXCVCC4.js";
|
|
18
21
|
import {
|
|
19
22
|
consola
|
|
20
23
|
} from "./chunk-D2RF35HJ.js";
|
|
21
24
|
import {
|
|
22
25
|
isJsonObject,
|
|
23
|
-
isJsonString
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} from "./chunk-MBXCVCC4.js";
|
|
26
|
+
isJsonString,
|
|
27
|
+
parseJson
|
|
28
|
+
} from "./chunk-RPSUFZAG.js";
|
|
29
|
+
import "./chunk-2SBBKY5C.js";
|
|
28
30
|
import "./chunk-GKDUYJ7R.js";
|
|
29
31
|
|
|
30
32
|
// src/commands/skills.ts
|
|
@@ -42,7 +44,7 @@ var fetchOrExit = async (url, doing) => {
|
|
|
42
44
|
return await fetch(url);
|
|
43
45
|
} catch (error) {
|
|
44
46
|
consola.error(`${doing}: ${error instanceof Error ? error.message : String(error)}`);
|
|
45
|
-
process.exit(1);
|
|
47
|
+
return process.exit(1);
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
var summaries = (index) => {
|
|
@@ -63,7 +65,7 @@ var listSkills = async () => {
|
|
|
63
65
|
consola.error(`Could not list the skills: ${res.status} ${res.statusText}`);
|
|
64
66
|
process.exit(1);
|
|
65
67
|
}
|
|
66
|
-
const index =
|
|
68
|
+
const index = parseJson(await res.text());
|
|
67
69
|
return summaries(index);
|
|
68
70
|
};
|
|
69
71
|
var skillsCommand = defineCommand({
|
|
@@ -74,7 +76,7 @@ var skillsCommand = defineCommand({
|
|
|
74
76
|
},
|
|
75
77
|
run: async ({ args, rawArgs }) => {
|
|
76
78
|
assertKnownFlags(rawArgs, skillsArgs);
|
|
77
|
-
if (
|
|
79
|
+
if (args.name === void 0 || args.name === "") {
|
|
78
80
|
const skills = await listSkills();
|
|
79
81
|
if (writeStructured({ skills }, args)) {
|
|
80
82
|
return;
|
|
@@ -98,7 +100,7 @@ var skillsCommand = defineCommand({
|
|
|
98
100
|
process.exit(1);
|
|
99
101
|
}
|
|
100
102
|
const content = await res.text();
|
|
101
|
-
if (isJsonOutput(args) || args.field) {
|
|
103
|
+
if (isJsonOutput(args) || args.field !== void 0 && args.field !== "") {
|
|
102
104
|
const listed = await listSkills();
|
|
103
105
|
const summary = listed.find((skill) => skill.name === name);
|
|
104
106
|
writeStructured({ content, description: summary?.description ?? "", name }, args);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module";
|
|
2
|
+
import { dirname as __pathDirname } from "node:path";
|
|
3
|
+
import { fileURLToPath as __fileURLToPath } from "node:url";
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
var __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = __pathDirname(__filename);
|
|
7
|
+
import {
|
|
8
|
+
failUsage,
|
|
9
|
+
getInt,
|
|
10
|
+
getString,
|
|
11
|
+
main,
|
|
12
|
+
parseArgs,
|
|
13
|
+
recoverFrames,
|
|
14
|
+
writeJsonFile
|
|
15
|
+
} from "./chunk-OFJIG4K3.js";
|
|
16
|
+
import "./chunk-2SBBKY5C.js";
|
|
17
|
+
import "./chunk-GKDUYJ7R.js";
|
|
18
|
+
|
|
19
|
+
// src/commands/asset/recover-component-frames.ts
|
|
20
|
+
import path from "node:path";
|
|
21
|
+
var run = (argv) => {
|
|
22
|
+
main(() => {
|
|
23
|
+
const args = parseArgs([...argv], {
|
|
24
|
+
values: ["cols", "frames", "out-dir", "prefix", "rows", "threshold"]
|
|
25
|
+
});
|
|
26
|
+
const [sheet = ""] = args.positionals;
|
|
27
|
+
if (sheet === "") {
|
|
28
|
+
failUsage("A pose-board PNG path is required.");
|
|
29
|
+
}
|
|
30
|
+
const outDir = getString(args, "out-dir") ?? "";
|
|
31
|
+
if (outDir === "") {
|
|
32
|
+
failUsage("--out-dir is required");
|
|
33
|
+
}
|
|
34
|
+
const rows = getInt(args, "rows", 0);
|
|
35
|
+
const cols = getInt(args, "cols", 0);
|
|
36
|
+
if (!rows || !cols) {
|
|
37
|
+
failUsage("--rows and --cols are required");
|
|
38
|
+
}
|
|
39
|
+
const prefix = getString(args, "prefix") ?? "frame";
|
|
40
|
+
const frames = getString(args, "frames") === void 0 ? null : getInt(args, "frames", 0);
|
|
41
|
+
const { result, crops } = recoverFrames(sheet, {
|
|
42
|
+
cols,
|
|
43
|
+
frames,
|
|
44
|
+
rows,
|
|
45
|
+
threshold: getInt(args, "threshold", 15)
|
|
46
|
+
});
|
|
47
|
+
for (const crop of crops) {
|
|
48
|
+
const outPath = path.join(outDir, `${prefix}-${crop.label}.png`);
|
|
49
|
+
crop.image.toFile(outPath);
|
|
50
|
+
result.frames.push({
|
|
51
|
+
area: crop.area,
|
|
52
|
+
bbox: crop.bbox,
|
|
53
|
+
center: crop.center,
|
|
54
|
+
frame: crop.label,
|
|
55
|
+
path: outPath
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
writeJsonFile(path.join(outDir, `${prefix}-metadata.json`), result);
|
|
59
|
+
console.log(outDir);
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
run
|
|
64
|
+
};
|