@bitmagic/cli 0.1.52-dev.9 → 0.1.53-dev.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/README.md +45 -9
- package/dist/assets/add.js +2 -1
- package/dist/assets/add.js.map +1 -1
- package/dist/assets/voxelize-glb.d.ts +17 -1
- package/dist/assets/voxelize-glb.js +43 -19
- package/dist/assets/voxelize-glb.js.map +1 -1
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +6 -6
- package/dist/cli.js.map +1 -1
- package/dist/commands/generate.d.ts +27 -0
- package/dist/commands/generate.js +132 -46
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/judge.d.ts +5 -0
- package/dist/commands/judge.js +28 -7
- package/dist/commands/judge.js.map +1 -1
- package/dist/commands/levels.d.ts +10 -17
- package/dist/commands/levels.js +48 -48
- package/dist/commands/levels.js.map +1 -1
- package/dist/commands/publish.d.ts +6 -1
- package/dist/commands/publish.js +29 -15
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/verify.d.ts +4 -0
- package/dist/commands/verify.js +94 -51
- package/dist/commands/verify.js.map +1 -1
- package/dist/editor/journal.js +13 -7
- package/dist/editor/journal.js.map +1 -1
- package/dist/generate/model.d.ts +13 -2
- package/dist/generate/model.js +70 -21
- package/dist/generate/model.js.map +1 -1
- package/dist/generate/prop.d.ts +8 -0
- package/dist/generate/prop.js +8 -6
- package/dist/generate/prop.js.map +1 -1
- package/dist/judge/record.d.ts +3 -0
- package/dist/judge/record.js +3 -0
- package/dist/judge/record.js.map +1 -1
- package/dist/levels/registry.d.ts +5 -2
- package/dist/levels/registry.js +32 -27
- package/dist/levels/registry.js.map +1 -1
- package/dist/project/jobs.d.ts +1 -1
- package/dist/project/jobs.js +16 -20
- package/dist/project/jobs.js.map +1 -1
- package/dist/project/platform-declaration.d.ts +51 -0
- package/dist/project/platform-declaration.js +81 -0
- package/dist/project/platform-declaration.js.map +1 -0
- package/dist/publish/platform.d.ts +4 -8
- package/dist/publish/platform.js +19 -53
- package/dist/publish/platform.js.map +1 -1
- package/dist/scaffold/project-files.js +54 -21
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/verify/artifacts.d.ts +19 -0
- package/dist/verify/artifacts.js +34 -0
- package/dist/verify/artifacts.js.map +1 -0
- package/dist/verify/browser.d.ts +10 -0
- package/dist/verify/browser.js +79 -9
- package/dist/verify/browser.js.map +1 -1
- package/dist/verify/classify.d.ts +37 -1
- package/dist/verify/classify.js +66 -2
- package/dist/verify/classify.js.map +1 -1
- package/dist/verify/device.d.ts +43 -0
- package/dist/verify/device.js +59 -0
- package/dist/verify/device.js.map +1 -0
- package/dist/verify/iterate.d.ts +21 -2
- package/dist/verify/iterate.js +43 -36
- package/dist/verify/iterate.js.map +1 -1
- package/dist/verify/mobile-parity.d.ts +42 -0
- package/dist/verify/mobile-parity.js +84 -0
- package/dist/verify/mobile-parity.js.map +1 -0
- package/dist/verify/platform.d.ts +47 -0
- package/dist/verify/platform.js +89 -0
- package/dist/verify/platform.js.map +1 -0
- package/dist/verify/result.d.ts +90 -6
- package/dist/verify/result.js +89 -10
- package/dist/verify/result.js.map +1 -1
- package/dist/verify/url.d.ts +9 -1
- package/dist/verify/url.js +10 -2
- package/dist/verify/url.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -186,16 +186,16 @@ browser reloads itself on every change and the assets panel shows each generatio
|
|
|
186
186
|
| `bitmagic check` | Typecheck (`tsc --noEmit`) against the vendored engine. Fast; does not prove the game runs. |
|
|
187
187
|
| `bitmagic dev [--port <port>] [--editor-port <port>] [--no-open]` | Build, then serve everything and keep it running: `tsc --watch`, `vite` on 3010, and a **Game / Editor** view on 3011 that reloads itself when the project changes. Opens the view in your browser; `--no-open` (or `BITMAGIC_NO_OPEN=1`) skips that. The one command to leave open. See **The dev view** below. |
|
|
188
188
|
| `bitmagic reload [--port <port>]` | Tell a running `bitmagic dev` to reload the browser now. For agents: run it when you finish a round of edits. Exits 0 and does nothing when no dev server is running. |
|
|
189
|
-
| `bitmagic verify [--timeout <ms>] [--renderer webgpu\|webgl] [--fast] [--watch]` | Build, boot the game in a headless browser,
|
|
189
|
+
| `bitmagic verify [--timeout <ms>] [--renderer webgpu\|webgl] [--platform desktop\|mobile\|both] [--fast] [--watch]` | Build, boot the game in a headless browser, press the engine's Play button like a player would, and report what broke. A game without the button passes as long as gameplay starts by itself (auto-starting genres, custom start UIs); a run where gameplay never starts fails. The settle is adaptive: the run ends as soon as the live engine proves stable gameplay (state, rendered frames, no fresh errors, player standing), with `--timeout` as the cap. The verdict includes live engine state — actual GPU backend, fps, player position, physics body count, gameplay events (see **Gameplay events** below) — recorded in `result.json`. `--renderer` pins the pipeline (default `webgpu`, what players run; a silent WebGPU→WebGL2 fallback **fails** the run, and `--renderer webgl` is the deliberate escape hatch). A run failing on a lost WebGL context retries once on software rendering automatically. `--fast` skips the screenshot pipeline (then there is no thumbnail candidate from this run). `--watch` keeps everything warm — incremental `tsc --watch`, one vite, one browser — and re-verifies on file change in seconds; `--fast` is the watch default (`--no-fast` restores the screenshot). `--platform` picks what the run emulates — see **Verifying the mobile path** below. Every run also reports the engine's mobile-parity check: a desktop action with no touch button is a warning, and a **failure** when `game.json` declares `primaryPlatform: "mobile"`. Writes the artifacts the publish gate reads (see below). |
|
|
190
190
|
| `bitmagic build` | Bundle the game into one self-contained `.bitmagic/build/index.html`. Rarely needs to be run by hand — `publish` builds automatically when the project changed. |
|
|
191
191
|
| `bitmagic publish [--visibility public\|private] [--name <name>] [--description <desc>] [--force]` | Verify-gate, build if needed, and upload straight to GCS. **Private unless `--visibility public` is passed.** |
|
|
192
192
|
| `bitmagic upgrade [--engine <version>] [--force]` | Refresh vendored platform files and the CLI's own skills to the currently published engine. Refuses a dirty git tree unless `--force`. Also records the project's `environment` in `bitmagic.json` if it has none yet — the engine it just vendored came from that api-server — and says so when it does. |
|
|
193
|
-
| `bitmagic generate <skybox\|sound\|image\|character\|animation\|model\|prop\|vehicle> ...` | Generate one asset directly into `src/work/world.json`. Costs sparks. `model` mints a **new** 3D object from a prompt, `prop` upgrades an existing placeholder **in place**, `vehicle` adds a new drivable one, `animation` takes a parameter spec rather than a prompt — see below. |
|
|
193
|
+
| `bitmagic generate <skybox\|background\|block-type\|sound\|image\|character\|animation\|model\|prop\|vehicle> ...` | Generate one asset directly into `src/work/world.json`. Costs sparks. `model` mints a **new** 3D object from a prompt, `prop` upgrades an existing placeholder **in place**, `vehicle` adds a new drivable one, `animation` takes a parameter spec rather than a prompt, `block-type` registers a custom voxel block — see below. `skybox` and `background` write the **same** field: pick one. |
|
|
194
194
|
| `bitmagic assets add <file> [--name <n>] [--asset-id <id>] [--keep-glb] [--voxel-size <m>] [--max-voxel-size <m>] [--height <m>] [--hollow\|--solid] [--force]` | Upload **your own** file — `.glb`, `.vxl`, `.png/.jpg/.webp`, `.opus/.ogg/.m4a/.mp3`, `.json` — into the game's assets and write its entry into `src/work/world.json`. A `.glb` is voxelized in a headless browser (Chrome + a free port in 3000–3199, like `prop`) unless `--keep-glb`. Free — no sparks. See **Adding your own assets** below. |
|
|
195
195
|
| `bitmagic assets list` | The assets in `world.json`: id, name, type, size, placed instances, and total references. Local, no network. |
|
|
196
196
|
| `bitmagic assets remove <assetId> [--force]` | Remove an asset from `world.json` (the uploaded file stays in storage). Refuses while anything in `world.json` still references it; `--force` removes the asset and its placed instances together. |
|
|
197
197
|
| `bitmagic cover [--prompt "..."] [--force] [--no-start-screen]` | Generate the game's cover art from `GAME-DESIGN.md`: sets the start screen, saves `.bitmagic/cover.webp`, becomes the publish thumbnail. Costs sparks. |
|
|
198
|
-
| `bitmagic judge [--genre <name>] [--min-score <1-10>]` | Grade the screenshot `bitmagic verify` captured against a quality rubric built from `GAME-DESIGN.md` (plus an optional genre hint) with a vision model, and print a scorecard: four dimension scores and at most three actionable findings, also written to `.bitmagic/judge.json`. Informs rather than gates — exits 0 whatever the score, unless `--min-score` sets a bar (exit 4 below it). Warns when the project changed since the screenshot. Costs sparks (one small model call). |
|
|
198
|
+
| `bitmagic judge [--genre <name>] [--platform desktop\|mobile] [--min-score <1-10>]` | Grade the screenshot `bitmagic verify` captured against a quality rubric built from `GAME-DESIGN.md` (plus an optional genre hint) with a vision model, and print a scorecard: four dimension scores and at most three actionable findings, also written to `.bitmagic/judge.json`. Informs rather than gates — exits 0 whatever the score, unless `--min-score` sets a bar (exit 4 below it). `--platform` picks which frame to grade; with no flag it grades the mobile one when the game is mobile-primary and `screenshot.mobile.png` exists, and the mobile rubric folds touch-HUD legibility, thumb reach and phone framing into the existing `readability` and `polish` dimensions rather than adding a fifth score. Warns when the project changed since the screenshot. Costs sparks (one small model call). |
|
|
199
199
|
| `bitmagic forge --prompt "..." [--city\|--dungeon\|--platformer\|--freeform] [--name <name>] [--resume <jobId>]` | Design and bake a whole playable level into `world.json`. Costs sparks, and takes many minutes — the bake alone can take twenty. `--resume <jobId>` picks a failed run back up from the last step that finished, rather than redoing the whole thing. |
|
|
200
200
|
| `bitmagic levels <list\|add\|rename\|set-start\|remove> ...` | Manage the levels `forge` creates: which one boots, their names, registering a bake you already have, deleting one. Local, no network, no sparks. See **Managing levels** below. |
|
|
201
201
|
|
|
@@ -321,10 +321,12 @@ my-game/
|
|
|
321
321
|
publish/
|
|
322
322
|
source.zip # the source archive each publish uploads (see Publishing)
|
|
323
323
|
verify/
|
|
324
|
-
result.json # bitmagic verify's verdict — ok, failures, warnings, fingerprint, at, renderer, settle, snapshot
|
|
324
|
+
result.json # bitmagic verify's verdict — ok, failures, warnings, fingerprint, at, platform, renderer, settle, snapshot, mobileParity (and platforms[] after a --platform both run)
|
|
325
325
|
screenshot.png # the publish thumbnail when there is no cover art (not written by --fast runs)
|
|
326
|
+
screenshot.mobile.png # the same for a --platform mobile run
|
|
326
327
|
console.log # captured browser console output
|
|
327
|
-
console.
|
|
328
|
+
console.mobile.log # the mobile run's console, kept separate so a --platform both run keeps both
|
|
329
|
+
console.retry.log # the software-GL retry's console, when a lost context forced one
|
|
328
330
|
```
|
|
329
331
|
|
|
330
332
|
### Gameplay events
|
|
@@ -338,6 +340,38 @@ spontaneous events are judged): the player dying 3+ times in the first 10 second
|
|
|
338
340
|
and the match ending within 5 seconds of starting. A vendored engine too old to know
|
|
339
341
|
`?eventlog=1` yields `events: null` and no output — run `bitmagic upgrade` to get the session.
|
|
340
342
|
|
|
343
|
+
### Verifying the mobile path
|
|
344
|
+
|
|
345
|
+
Most of what the engine does differently on a phone is decided by one branch — the touch
|
|
346
|
+
controls, a pixel-ratio clamp, a lower level-detail tier, a lighter light warmup, postFX and SSR
|
|
347
|
+
off, a rescaled HUD, fullscreen on start. `--platform mobile` runs that branch for real:
|
|
348
|
+
Playwright emulates an iPhone 14 (a phone viewport, touch input, device pixel ratio 3), the game
|
|
349
|
+
boots with the engine's own `?platform=mobile` override, and Play is **tapped** rather than
|
|
350
|
+
clicked. That is more than the web Creator's Mobile tab can do — it letterboxes an iframe and
|
|
351
|
+
moves a mouse pointer around, which never reaches the branch at all.
|
|
352
|
+
|
|
353
|
+
With no flag, the platform comes from the project: `mobile` when `src/work/game.json` declares
|
|
354
|
+
`primaryPlatform: "mobile"`, `desktop` otherwise. `--platform both` runs one after the other and
|
|
355
|
+
passes only if both do. A game whose `world.json` sets `worldProfileData.mobileOrientation:
|
|
356
|
+
"landscape"` is verified on its side.
|
|
357
|
+
|
|
358
|
+
The mobile run writes `screenshot.mobile.png`, which `bitmagic judge` grades by default for a
|
|
359
|
+
mobile-primary game and `bitmagic publish` uses as the thumbnail when there is no cover art.
|
|
360
|
+
|
|
361
|
+
**The parity gate.** The engine already checks, at every game start, whether every desktop key
|
|
362
|
+
has a touch button to match — and logs the gaps. `bitmagic verify` now reads that, on desktop
|
|
363
|
+
runs too, and names both the key and the system that registered it:
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
warning: These actions have no touch button, so phone players cannot reach them: KeyF(CombatSystem).
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
It is a **failure** rather than a warning when `game.json` says `primaryPlatform: "mobile"`: on a
|
|
370
|
+
game built for phones, an action a phone cannot reach is not a portability nicety. The fix is to
|
|
371
|
+
bind both sides in one call — `playerController.registerCustomAction({ action, desktop: { keys:
|
|
372
|
+
['KeyF'] }, mobile: { label: 'ATTACK', behavior: 'tap' } })` — never a raw `registerKeyHandler`.
|
|
373
|
+
The gaps are also in `result.json` as `mobileParity`.
|
|
374
|
+
|
|
341
375
|
## Cover art
|
|
342
376
|
|
|
343
377
|
`bitmagic cover` generates the game's cover from `GAME-DESIGN.md` — the same artwork the web
|
|
@@ -702,8 +736,8 @@ publicly again.
|
|
|
702
736
|
|
|
703
737
|
`--force` overrides a **stale or failed** verify verdict. It does **not** override a missing
|
|
704
738
|
verify record — a project with no cover art has only the verify screenshot to publish a thumbnail
|
|
705
|
-
from, so `bitmagic verify` must have produced at least one
|
|
706
|
-
before `--force` has anything to work with.
|
|
739
|
+
from, so `bitmagic verify` must have produced at least one screenshot — `screenshot.png` or
|
|
740
|
+
`screenshot.mobile.png` — ever, before `--force` has anything to work with.
|
|
707
741
|
|
|
708
742
|
`--name` and `--description` apply to that one publish call only. They are never written back to
|
|
709
743
|
`src/work/game.json`, so pass them again on every future `bitmagic publish` if you want them to
|
|
@@ -725,8 +759,10 @@ elsewhere (an admin edit, say) is replaced by your next publish, and removing `m
|
|
|
725
759
|
from `world.json` clears the stored lock. A project whose `game.json` declares no
|
|
726
760
|
`primaryPlatform` at all leaves the stored value alone rather than forcing it to `desktop`.
|
|
727
761
|
|
|
728
|
-
|
|
729
|
-
|
|
762
|
+
`primaryPlatform` is not only a catalogue entry. It also decides what `bitmagic verify` boots and
|
|
763
|
+
`bitmagic judge` grades by default, and it turns the mobile-parity gap from a warning into a
|
|
764
|
+
failure — see **Verifying the mobile path**. The game itself is playable from a phone either way;
|
|
765
|
+
making it *good* on a phone is code, and the scaffolded `AGENTS.md` tells your agent how: bind every
|
|
730
766
|
action with `registerCustomAction`/`declareMobileActions` so each desktop key gets a touch button,
|
|
731
767
|
and never with a raw `keydown` listener.
|
|
732
768
|
|
package/dist/assets/add.js
CHANGED
|
@@ -188,7 +188,8 @@ export async function addAssetFile(options) {
|
|
|
188
188
|
+ `asset (the GLB from this run is already uploaded at ${url}).`;
|
|
189
189
|
const voxelize = options.voxelize ?? voxelizeGlbIntoAsset;
|
|
190
190
|
const engineAsset = await voxelize({
|
|
191
|
-
context, environment, token, name,
|
|
191
|
+
context, environment, token, name, source: { kind: 'glb', glbUrl: url }, assetId,
|
|
192
|
+
voxel: options.voxel, retryHint,
|
|
192
193
|
requestPrefix: 'upload', log,
|
|
193
194
|
});
|
|
194
195
|
assertEngineHonouredId(engineAsset, assetId, name, `the GLB is already uploaded at ${url}`);
|
package/dist/assets/add.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/assets/add.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAmB,MAAM,0BAA0B,CAAC;AACxF,OAAO,EACL,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,sBAAsB,EAAE,aAAa,GAEvG,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,kBAAkB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,GACxG,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD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AAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvF,GAAG,CAAC,OAAO,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,QAAQ;QACR,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -8,13 +8,29 @@ export interface VoxelizeFlags {
|
|
|
8
8
|
targetHeight?: number;
|
|
9
9
|
fillInterior: boolean;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* What the bake was handed.
|
|
13
|
+
*
|
|
14
|
+
* A union rather than two optional URLs because exactly one is always true, and because the two
|
|
15
|
+
* take different engine messages. Shared with `generate prop`, which makes the same choice for the
|
|
16
|
+
* same reason — see generate/prop.ts.
|
|
17
|
+
*/
|
|
18
|
+
export type BakeSource = {
|
|
19
|
+
kind: 'glb';
|
|
20
|
+
glbUrl: string;
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'master';
|
|
23
|
+
masterUrl: string;
|
|
24
|
+
};
|
|
25
|
+
/** The URL a source carries, for messages that just need to name what is kept. */
|
|
26
|
+
export declare function bakeSourceUrl(source: BakeSource): string;
|
|
11
27
|
export interface VoxelizeGlbRequest {
|
|
12
28
|
context: ProjectContext;
|
|
13
29
|
environment: Environment;
|
|
14
30
|
token: string;
|
|
15
31
|
/** Asset name; also what the engine builds its uploaded `.vxl` filename from. */
|
|
16
32
|
name: string;
|
|
17
|
-
|
|
33
|
+
source: BakeSource;
|
|
18
34
|
/** The id to register under. The engine echoes it back, and callers must check that it did. */
|
|
19
35
|
assetId: string;
|
|
20
36
|
voxel: VoxelizeFlags;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Bake one
|
|
2
|
+
* Bake one generated source into a NEW voxel asset, in the project's own headless engine.
|
|
3
3
|
*
|
|
4
|
-
* Two lanes need exactly this and differ only in where the
|
|
4
|
+
* Two lanes need exactly this and differ only in where the source came from:
|
|
5
5
|
*
|
|
6
6
|
* - `bitmagic assets add model.glb` uploads a file the creator already has;
|
|
7
7
|
* - `bitmagic generate model --prompt …` pays the Asset Forger for one.
|
|
@@ -11,38 +11,62 @@
|
|
|
11
11
|
* rather than in both. `generate prop` deliberately does NOT use this: it upgrades an EXISTING
|
|
12
12
|
* asset in place, constrained to that asset's recorded `fitBox`, which is a different operation
|
|
13
13
|
* with a different precondition (see generate/prop.ts).
|
|
14
|
+
*
|
|
15
|
+
* The source is a mesh or a voxel master — see `BakeSource`. Both are answered on the same engine
|
|
16
|
+
* reply channel, so only the request differs.
|
|
14
17
|
*/
|
|
15
18
|
import { CliError } from '../errors.js';
|
|
16
19
|
import { VOXELIZE_TIMEOUT_MS, withVoxelizeSession } from '../forge/voxelize-session.js';
|
|
17
20
|
import { isJsonObject } from '../project/world-json.js';
|
|
21
|
+
/** The URL a source carries, for messages that just need to name what is kept. */
|
|
22
|
+
export function bakeSourceUrl(source) {
|
|
23
|
+
return source.kind === 'glb' ? source.glbUrl : source.masterUrl;
|
|
24
|
+
}
|
|
18
25
|
export const voxelizeGlbIntoAsset = async (request) => {
|
|
19
|
-
const { context, environment, token, name,
|
|
26
|
+
const { context, environment, token, name, source, assetId, voxel, retryHint, requestPrefix, log } = request;
|
|
20
27
|
return withVoxelizeSession({
|
|
21
28
|
context, environment, token, log, subject: `"${name}"`, retryHint,
|
|
22
29
|
}, async ({ host, port }) => {
|
|
23
|
-
log(`
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
log(`Baking "${name}" at ${voxel.minVoxelSize}m…`);
|
|
31
|
+
// No `fitBox` on either branch: there is no placed instance to fit. `placeholder: false`
|
|
32
|
+
// because this is a finished asset, never a World-Forger stand-in awaiting regeneration.
|
|
33
|
+
const common = {
|
|
26
34
|
requestId: `${requestPrefix}-${assetId}-${port}`,
|
|
27
35
|
name,
|
|
28
|
-
glbUrl,
|
|
29
36
|
assetId,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
...
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
};
|
|
38
|
+
const request_ = source.kind === 'glb'
|
|
39
|
+
? {
|
|
40
|
+
...common,
|
|
41
|
+
type: 'CREATE_ASSET_FROM_GLB_URL',
|
|
42
|
+
glbUrl: source.glbUrl,
|
|
43
|
+
options: {
|
|
44
|
+
minVoxelSize: voxel.minVoxelSize,
|
|
45
|
+
maxVoxelSize: voxel.maxVoxelSize,
|
|
46
|
+
...(voxel.targetHeight !== undefined ? { targetHeight: voxel.targetHeight } : {}),
|
|
47
|
+
fillInterior: voxel.fillInterior,
|
|
48
|
+
placeholder: false,
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
: {
|
|
52
|
+
...common,
|
|
53
|
+
type: 'CREATE_ASSET_FROM_VXL_MASTER',
|
|
54
|
+
masterUrl: source.masterUrl,
|
|
55
|
+
// No `fillInterior`: a master already carries its own occupancy, which is the thing that
|
|
56
|
+
// flag exists to infer from a mesh's surface.
|
|
57
|
+
options: {
|
|
58
|
+
minVoxelSize: voxel.minVoxelSize,
|
|
59
|
+
maxVoxelSize: voxel.maxVoxelSize,
|
|
60
|
+
...(voxel.targetHeight !== undefined ? { targetHeight: voxel.targetHeight } : {}),
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
const result = await host.transport.sendAndWait(request_, 'ASSET_FROM_GLB_URL_RESULT', VOXELIZE_TIMEOUT_MS, { maxRetries: 1 });
|
|
40
64
|
if (!result) {
|
|
41
|
-
throw new CliError(`
|
|
65
|
+
throw new CliError(`Baking "${name}" timed out. ${retryHint}`);
|
|
42
66
|
}
|
|
43
67
|
if (result.success === false || !isJsonObject(result.asset)) {
|
|
44
68
|
const reason = typeof result.error === 'string' ? result.error : 'unknown error';
|
|
45
|
-
throw new CliError(`
|
|
69
|
+
throw new CliError(`Baking "${name}" failed: ${reason}. ${retryHint}`);
|
|
46
70
|
}
|
|
47
71
|
return result.asset;
|
|
48
72
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voxelize-glb.js","sourceRoot":"","sources":["../../src/assets/voxelize-glb.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"voxelize-glb.js","sourceRoot":"","sources":["../../src/assets/voxelize-glb.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAsBxD,kFAAkF;AAClF,MAAM,UAAU,aAAa,CAAC,MAAkB;IAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;AAClE,CAAC;AAsBD,MAAM,CAAC,MAAM,oBAAoB,GAAgB,KAAK,EAAE,OAAO,EAAE,EAAE;IACjE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IAC7G,OAAO,mBAAmB,CAAC;QACzB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,IAAI,GAAG,EAAE,SAAS;KAClE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;QAC1B,GAAG,CAAC,WAAW,IAAI,QAAQ,KAAK,CAAC,YAAY,IAAI,CAAC,CAAC;QACnD,yFAAyF;QACzF,yFAAyF;QACzF,MAAM,MAAM,GAAG;YACb,SAAS,EAAE,GAAG,aAAa,IAAI,OA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AY,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5D,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC;YACjF,MAAM,IAAI,QAAQ,CAAC,WAAW,IAAI,aAAa,MAAM,KAAK,SAAS,EAAE,CAAC,CAAC;QACzE,CAAC;QACD,OAAO,MAAM,CAAC,KAAK,CAAC;IACtB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAoC,EACpC,OAAe,EACf,IAAY,EACZ,QAAgB;IAEhB,MAAM,QAAQ,GAAG,OAAO,WAAW,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1E,IAAI,QAAQ,KAAK,OAAO;QAAE,OAAO;IACjC,MAAM,IAAI,QAAQ,CAChB,0BAA0B,IAAI,eAAe,QAAQ,IAAI,QAAQ,iBAAiB,OAAO,QAAQ;UAC/F,qFAAqF;UACrF,8DAA8D,QAAQ,IAAI,CAC7E,CAAC;AACJ,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -211,6 +211,10 @@ declare const rawCommands: {
|
|
|
211
211
|
readonly type: "string";
|
|
212
212
|
readonly description: "Renderer to boot the game with: webgpu (default, what players run) or webgl.";
|
|
213
213
|
};
|
|
214
|
+
readonly platform: {
|
|
215
|
+
readonly type: "string";
|
|
216
|
+
readonly description: string;
|
|
217
|
+
};
|
|
214
218
|
readonly fast: {
|
|
215
219
|
readonly type: "boolean";
|
|
216
220
|
readonly description: string;
|
|
@@ -260,6 +264,10 @@ declare const rawCommands: {
|
|
|
260
264
|
readonly type: "string";
|
|
261
265
|
readonly description: "Genre hint for the rubric: platformer, racing, shooter, combat, driving, tower-defense.";
|
|
262
266
|
};
|
|
267
|
+
readonly platform: {
|
|
268
|
+
readonly type: "string";
|
|
269
|
+
readonly description: string;
|
|
270
|
+
};
|
|
263
271
|
readonly 'min-score': {
|
|
264
272
|
readonly type: "string";
|
|
265
273
|
readonly description: "Fail (exit 4) when the overall score is below this 1-10 bar. Without it the judge informs and exits 0.";
|
package/dist/cli.js
CHANGED
|
@@ -53,12 +53,6 @@ const realRunDeps = {
|
|
|
53
53
|
refreshMessages: refreshUnreadMessages,
|
|
54
54
|
now: Date.now,
|
|
55
55
|
};
|
|
56
|
-
/**
|
|
57
|
-
* The name the wrapper reports for `command`, when the caller did not give one: its own
|
|
58
|
-
* `meta.name`, or `unknown` for a command that has none. Every entry in `rawCommands` is named
|
|
59
|
-
* from the map key instead (and its subcommands as `parent sub`), so this only decides for a
|
|
60
|
-
* command wrapped on its own — which, in practice, means a test's.
|
|
61
|
-
*/
|
|
62
56
|
/**
|
|
63
57
|
* The `--env` this command will actually honour, or undefined.
|
|
64
58
|
*
|
|
@@ -77,6 +71,12 @@ function declaredExplicitEnv(command, args) {
|
|
|
77
71
|
const value = args?.env;
|
|
78
72
|
return typeof value === 'string' ? value : undefined;
|
|
79
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* The name the wrapper reports for `command`, when the caller did not give one: its own
|
|
76
|
+
* `meta.name`, or `unknown` for a command that has none. Every entry in `rawCommands` is named
|
|
77
|
+
* from the map key instead (and its subcommands as `parent sub`), so this only decides for a
|
|
78
|
+
* command wrapped on its own — which, in practice, means a test's.
|
|
79
|
+
*/
|
|
80
80
|
function commandNameOf(command) {
|
|
81
81
|
// citty's `meta` is a Resolvable (a value, a promise, or a function returning either); every
|
|
82
82
|
// meta in this CLI is a plain object, and a test double that is not simply reports `unknown`.
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE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IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAC5D,CAC0C,CAAC;AAE9C,iGAAiG;AACjG,8FAA8F;AAC9F,uFAAuF;AACvF,4FAA4F;AAC5F,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC;IAChC,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,gDAAgD;KAC9D;IACD,WAAW;CACZ,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CommandRunDeps } from './run-deps.js';
|
|
2
|
+
import type { Environment } from '../config/environments.js';
|
|
2
3
|
import { type GenerationOutcome } from '../generate/stream.js';
|
|
3
4
|
import { type PropVoxelizeResult } from '../generate/prop.js';
|
|
4
5
|
import { type VehicleInstallResult } from '../generate/vehicle.js';
|
|
@@ -9,6 +10,19 @@ export interface SkyboxArgs {
|
|
|
9
10
|
referenceImageUrl?: string;
|
|
10
11
|
}
|
|
11
12
|
export declare function buildSkyboxBody(args: SkyboxArgs): Record<string, unknown>;
|
|
13
|
+
export interface BackgroundArgs {
|
|
14
|
+
description: string;
|
|
15
|
+
referenceImageUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function buildBackgroundBody(args: BackgroundArgs): Record<string, unknown>;
|
|
18
|
+
export interface BlockTypeArgs {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
displayName?: string;
|
|
22
|
+
sideDescription?: string;
|
|
23
|
+
referenceImageUrl?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function buildBlockTypeBody(args: BlockTypeArgs): Record<string, unknown>;
|
|
12
26
|
export interface SoundArgs {
|
|
13
27
|
prompt: string;
|
|
14
28
|
duration?: string;
|
|
@@ -90,11 +104,22 @@ export declare function runAssetGeneration(type: string, label: string, body: Re
|
|
|
90
104
|
* that longer flow — and validates the target asset BEFORE the paid generation, so a mistyped id
|
|
91
105
|
* or an asset with no `fitBox` costs nothing.
|
|
92
106
|
*/
|
|
107
|
+
/**
|
|
108
|
+
* Refuses `--direct-voxels` outside `dev`, rather than ignoring it.
|
|
109
|
+
*
|
|
110
|
+
* The flag asks for a materially different asset — voxels tapped straight from the generator
|
|
111
|
+
* instead of a voxelized mesh — so quietly producing the other thing would be the wrong answer to
|
|
112
|
+
* a question the creator asked explicitly. Everywhere but dev, api-server does not expose the
|
|
113
|
+
* generator at all.
|
|
114
|
+
*/
|
|
115
|
+
export declare function assertDirectVoxelsAllowed(environment: Environment, directVoxels: boolean): void;
|
|
93
116
|
export declare function runPropGeneration(options: {
|
|
94
117
|
assetId: string;
|
|
95
118
|
prompt: string;
|
|
96
119
|
/** Skip the paid generation and voxelize this mesh instead — how a failed run is retried. */
|
|
97
120
|
glbUrl?: string;
|
|
121
|
+
/** `--direct-voxels`: ask for voxels rather than a mesh. Dev only. */
|
|
122
|
+
directVoxels?: boolean;
|
|
98
123
|
json: boolean;
|
|
99
124
|
deps?: GenerateRunDeps;
|
|
100
125
|
}): Promise<PropVoxelizeResult>;
|
|
@@ -136,6 +161,8 @@ export declare function runModelGeneration(options: {
|
|
|
136
161
|
fillInterior: boolean;
|
|
137
162
|
/** Skip the paid generation and voxelize this mesh instead — how a failed run is retried. */
|
|
138
163
|
glbUrl?: string;
|
|
164
|
+
/** `--direct-voxels`: ask for voxels rather than a mesh. Dev only. */
|
|
165
|
+
directVoxels?: boolean;
|
|
139
166
|
json: boolean;
|
|
140
167
|
deps?: GenerateRunDeps;
|
|
141
168
|
}): Promise<GenerateModelResult>;
|