@wildshard/engine 0.1.15 → 0.1.17
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/CHANGELOG.md +15 -0
- package/index.html +157 -11
- package/lint/engine-sides.json +16 -0
- package/lint/host-register.json +496 -0
- package/lint/ratchet.json +2 -2
- package/lint/shard-imports.d.mts +1 -0
- package/lint/shard-imports.mjs +56 -8
- package/lint/wildshard-plugin.js +22 -4
- package/package.json +16 -5
- package/scripts/app-build/buildIdentity.d.mts +3 -1
- package/scripts/app-build/buildIdentity.mjs +25 -5
- package/scripts/app-build/builtAt.d.mts +4 -0
- package/scripts/app-build/builtAt.mjs +21 -0
- package/scripts/app-build/serviceWorker.ts +16 -2
- package/scripts/app-build/versionFiles.ts +2 -1
- package/scripts/app-build-pipeline.mjs +4 -1
- package/scripts/audio-download-proof.mjs +843 -0
- package/scripts/build-app.mjs +4 -0
- package/scripts/build-mirror.d.mts +2 -0
- package/scripts/build-mirror.mjs +5 -4
- package/scripts/built-product.mjs +3 -3
- package/scripts/cell-mem/metrics-preload.mjs +65 -0
- package/scripts/cell-mem-bench.mjs +130 -0
- package/scripts/check-chunks.mjs +2 -1
- package/scripts/devserver-client.d.mts +5 -0
- package/scripts/devserver-client.mjs +68 -0
- package/scripts/engine-ci-budget.ts +7 -1
- package/scripts/format-lock.mjs +20 -11
- package/scripts/generate-title-launch.mjs +3 -2
- package/scripts/grid-crossing-walk-proof.mjs +16 -8
- package/scripts/heavy-lane.py +25 -1
- package/scripts/host-ruler/register-migrate.mjs +242 -0
- package/scripts/host-ruler/register.d.mts +36 -0
- package/scripts/host-ruler/register.mjs +116 -0
- package/scripts/host-ruler/roots.d.mts +29 -0
- package/scripts/host-ruler/roots.mjs +333 -0
- package/scripts/host-ruler/server-roots.d.mts +23 -0
- package/scripts/host-ruler/server-roots.mjs +272 -0
- package/scripts/main-watch.d.mts +1 -1
- package/scripts/main-watch.mjs +10 -6
- package/scripts/map-hash.mjs +3 -6
- package/scripts/mmo-bots.mjs +2 -2
- package/scripts/offline-proof-rules.d.mts +1 -0
- package/scripts/offline-proof-rules.mjs +22 -1
- package/scripts/online-rig.mjs +4 -4
- package/scripts/page-release/flow.d.mts +1 -0
- package/scripts/page-release/flow.mjs +6 -2
- package/scripts/page-release.mjs +5 -1
- package/scripts/physics-route.json +0 -71
- package/scripts/pins-catalogue.ts +103 -0
- package/scripts/pins-reuse.mjs +3 -1
- package/scripts/pins.ts +22 -14
- package/scripts/preview-grid.ts +203 -0
- package/scripts/road-preload-proof.mjs +167 -0
- package/scripts/server-release/publish.mjs +2 -2
- package/scripts/server-release/served-slug.d.mts +2 -0
- package/scripts/server-release/served-slug.mjs +10 -0
- package/scripts/server-release/sign.d.mts +1 -0
- package/scripts/server-release/sign.mjs +3 -7
- package/scripts/shard-components.mjs +0 -2
- package/scripts/shard-outputs.d.mts +8 -0
- package/scripts/shard-outputs.mjs +45 -11
- package/scripts/side-parity.d.mts +2 -1
- package/scripts/side-parity.mjs +25 -4
- package/scripts/test-amber.d.mts +1 -0
- package/scripts/test-amber.mjs +10 -0
- package/scripts/test-products.json +3 -3
- package/scripts/tracked-public.d.mts +1 -0
- package/scripts/tracked-public.mjs +17 -0
- package/src/cli/engine.mjs +8 -0
- package/src/client/app/bootRoute.ts +4 -1
- package/src/client/app/dropModal.ts +15 -2
- package/src/client/app/entry.ts +67 -11
- package/src/client/app/slugPath.ts +5 -0
- package/src/client/engine/audio/Audio.ts +20 -2
- package/src/client/engine/boot/bakedTextures.ts +3 -2
- package/src/client/engine/boot/bootTrace.ts +6 -1
- package/src/client/engine/boot/bytes.ts +4 -3
- package/src/client/engine/boot/clearDownloads.ts +1 -1
- package/src/client/engine/boot/contentRead.ts +4 -0
- package/src/client/engine/boot/dropNotice.ts +20 -6
- package/src/client/engine/boot/gpuFiles.ts +25 -2
- package/src/client/engine/boot/lastEnd.ts +8 -2
- package/src/client/engine/boot/shardPrefetch.ts +7 -1
- package/src/client/engine/boot/sw.ts +19 -0
- package/src/client/engine/core/Game.ts +11 -3
- package/src/client/engine/core/GpuRecovery.ts +7 -0
- package/src/client/engine/core/Volumetrics.ts +5 -0
- package/src/client/engine/core/assets.ts +27 -20
- package/src/client/engine/core/bootstrap.ts +1 -2
- package/src/client/engine/core/ktx2.ts +84 -11
- package/src/client/engine/explore/Compare.ts +2 -2
- package/src/client/engine/explore/TouchFly.ts +3 -5
- package/src/client/engine/input/dom.ts +12 -0
- package/src/client/engine/net/predictor.ts +6 -2
- package/src/client/engine/player/Player.ts +10 -2
- package/src/client/engine/player/TouchControls.ts +12 -4
- package/src/client/engine/pwa/sw.js +47 -8
- package/src/client/engine/render/drawCheck.ts +96 -0
- package/src/client/engine/saves/staleBuildNote.ts +46 -0
- package/src/client/engine/telemetry/browserErrors.ts +157 -20
- package/src/client/engine/telemetry/screenOutbox.ts +61 -0
- package/src/client/engine/telemetry/staleBuildReport.ts +12 -0
- package/src/client/engine/ui/DeathFade.ts +99 -11
- package/src/client/engine/ui/ErrorModal.ts +13 -6
- package/src/client/engine/ui/Feedback.ts +2 -1
- package/src/client/engine/ui/Loading.ts +10 -6
- package/src/client/engine/ui/Map.ts +2 -1
- package/src/client/engine/ui/WeaponStrip.ts +2 -1
- package/src/client/engine/ui/backGuard.ts +104 -0
- package/src/client/engine/ui/hudAdapters.ts +30 -4
- package/src/client/engine/ui/loading.css +17 -0
- package/src/client/engine/ui/namePrompt.ts +6 -5
- package/src/client/engine/ui/styles/combat.css +12 -0
- package/src/client/engine/ui/styles/namePrompt.css +4 -2
- package/src/client/game/boot/audio.generated.ts +0 -294
- package/src/client/game/boot/bytes.generated.ts +0 -11
- package/src/client/game/boot/versions.generated.ts +0 -11
- package/src/client/game/compendium/keepsakes.ts +16 -6
- package/src/client/game/grapple/tool.ts +10 -7
- package/src/client/game/grid/cellLoading.ts +23 -12
- package/src/client/game/grid/cellScreens.ts +39 -74
- package/src/client/game/grid/liveSession.ts +40 -7
- package/src/client/game/grid/nearPlaceholderPlan.ts +8 -0
- package/src/client/game/grid/nearPlaceholderView.ts +9 -3
- package/src/client/game/grid/oneWayIn.ts +92 -27
- package/src/client/game/grid/pageEntry.ts +19 -0
- package/src/client/game/grid/pageShell.ts +1 -1
- package/src/client/game/grid/plotAudio.ts +114 -0
- package/src/client/game/grid/products.ts +55 -5
- package/src/client/game/grid/roadLookPlatform.ts +2 -2
- package/src/client/game/grid/session.ts +38 -22
- package/src/client/game/grid/spawnGround.ts +68 -0
- package/src/client/game/grid/voidLook.ts +29 -23
- package/src/client/game/loot/runtime.ts +3 -1
- package/src/client/game/mainMenu.ts +14 -6
- package/src/client/game/riding/hud.ts +6 -4
- package/src/client/game/session/finish.ts +17 -3
- package/src/client/game/session/play.ts +8 -2
- package/src/client/game/session/session.ts +4 -1
- package/src/client/game/shardfile/clientWorker.ts +41 -12
- package/src/client/game/shardfile/serverRoute.ts +10 -22
- package/src/client/game/slugPage.css +11 -0
- package/src/client/game/slugPage.ts +84 -0
- package/src/client/game/systems/viewmodel/heldView.ts +6 -3
- package/src/client/game/titleDeck.ts +55 -32
- package/src/client/host/online/doctor.ts +7 -6
- package/src/client/host/online/linkScreens.ts +16 -0
- package/src/client/host/online/release.ts +51 -5
- package/src/client/host/online/shell.ts +48 -27
- package/src/client/host/standalone/shell.ts +7 -3
- package/src/cook/game/audioReport.ts +57 -0
- package/src/cook/game/entryTotals.ts +26 -6
- package/src/cook/game/installedRuntimeReads.ts +3 -0
- package/src/server/engine/sim/respawn.ts +6 -1
- package/src/server/engine/sim.ts +3 -0
- package/src/server/game/grid/simulation.ts +35 -0
- package/src/server/game/loot/harvest.ts +2 -0
- package/src/server/game/loot/keepsakeProgression.ts +40 -0
- package/src/server/game/loot/playerOwned.ts +5 -1
- package/src/server/game/plugin/simulation.ts +4 -0
- package/src/server/game/population/nativeBake.ts +2 -1
- package/src/server/game/quest/chapterRecords.ts +2 -0
- package/src/server/game/quest/serverChapters.ts +4 -0
- package/src/server/game/quest/serverDoors.ts +11 -5
- package/src/server/game/roomRespawn.ts +4 -0
- package/src/server/game/shardfile/installedSides.ts +18 -0
- package/src/server/game/shardfile/nativeAssemblyHosts.ts +19 -10
- package/src/server/game/shardfile/nativeAssemblyInput.ts +1 -4
- package/src/server/host/bake/headlessWorker.ts +5 -1
- package/src/server/host/dedicated/cellHost.ts +98 -29
- package/src/server/host/dedicated/cellProtocol.ts +11 -1
- package/src/server/host/dedicated/cellWorker.ts +9 -3
- package/src/server/host/dedicated/crossing.ts +6 -2
- package/src/server/host/dedicated/dedicatedRoom.ts +21 -8
- package/src/server/host/dedicated/gridCells.ts +52 -9
- package/src/server/host/dedicated/main.ts +31 -12
- package/src/server/host/dedicated/placementFile.ts +72 -0
- package/src/server/host/dedicated/releaseFile.ts +17 -10
- package/src/server/host/dedicated/roadRoom.ts +21 -5
- package/src/server/host/dedicated/workerTable.ts +13 -1
- package/src/server/host/dedicated/world.ts +81 -9
- package/src/server/host/headlessRuntime.ts +10 -5
- package/src/server/host/installers.ts +62 -0
- package/src/server/host/openWorld.ts +59 -0
- package/src/server/host/ropeDecks.ts +2 -0
- package/src/server/host/standalone/cellWorld.ts +25 -19
- package/src/server/host/standalone/fallFloor.ts +2 -2
- package/src/server/host/standalone/gridServer.ts +7 -4
- package/src/server/host/standalone/roadWorld.ts +41 -4
- package/src/shared/engine/audio/bootAudio.ts +33 -0
- package/src/shared/engine/level/spec.ts +3 -3
- package/src/shared/engine/net/acts.ts +3 -0
- package/src/shared/engine/physics/query.ts +27 -0
- package/src/shared/engine/physics/terrain.ts +19 -28
- package/src/shared/engine/saves/saves.lock.json +15 -0
- package/src/shared/engine/sim/actRoutes.ts +2 -0
- package/src/shared/game/compendium/keepsakeProgression.ts +24 -0
- package/src/shared/game/grid/catalogue.ts +12 -5
- package/src/shared/game/grid/catalogueSlot.ts +11 -0
- package/src/shared/game/grid/farProxy.ts +6 -5
- package/src/shared/game/grid/pageMode.ts +1 -1
- package/src/shared/game/grid/roadLayout.ts +26 -3
- package/src/shared/game/grid/singleplayer.json +0 -13
- package/src/shared/game/grid/voidFloor.ts +122 -0
- package/src/shared/game/strings.ts +15 -0
- package/src/shared/host/standalone/netInput.ts +2 -1
|
@@ -3221,233 +3221,6 @@ export const MUSIC_MANIFESTS: Readonly<Record<string, unknown>> = {
|
|
|
3221
3221
|
}
|
|
3222
3222
|
]
|
|
3223
3223
|
},
|
|
3224
|
-
"showcase-template": {
|
|
3225
|
-
"genre": "showcase-template",
|
|
3226
|
-
"model": "MiniMax Music 3",
|
|
3227
|
-
"credit": "Music: MiniMax-Music3",
|
|
3228
|
-
"licence": "MiniMax-Music3 Community License",
|
|
3229
|
-
"slots": {
|
|
3230
|
-
"score": {
|
|
3231
|
-
"file": "take-a-f0c28e903f89.m4a",
|
|
3232
|
-
"loopStart": 24,
|
|
3233
|
-
"loopEnd": 49.08,
|
|
3234
|
-
"duration": 50.08,
|
|
3235
|
-
"gain": 1,
|
|
3236
|
-
"seamScore": 0.405,
|
|
3237
|
-
"calm": "take-a-f0c28e903f89.m4a",
|
|
3238
|
-
"bpm": 172.3,
|
|
3239
|
-
"beatsPerBar": 4
|
|
3240
|
-
}
|
|
3241
|
-
},
|
|
3242
|
-
"stings": {},
|
|
3243
|
-
"recommendation": "minimax3-701",
|
|
3244
|
-
"takes": [
|
|
3245
|
-
{
|
|
3246
|
-
"id": "minimax3-701",
|
|
3247
|
-
"recommendationScore": 0.2924615,
|
|
3248
|
-
"metrics": {
|
|
3249
|
-
"duration_s": 70.8,
|
|
3250
|
-
"sample_rate": 44100,
|
|
3251
|
-
"channels": 2,
|
|
3252
|
-
"loudness": {
|
|
3253
|
-
"lufs": -12.5,
|
|
3254
|
-
"lra": 3.5,
|
|
3255
|
-
"true_peak_dbfs": 0.2
|
|
3256
|
-
},
|
|
3257
|
-
"clipping": {
|
|
3258
|
-
"clipped_samples": 342,
|
|
3259
|
-
"clipped_frac": 0.00005476949409642506,
|
|
3260
|
-
"peak": 1
|
|
3261
|
-
},
|
|
3262
|
-
"silence": {
|
|
3263
|
-
"longest_internal_gap_s": 0,
|
|
3264
|
-
"internal_gaps": 0,
|
|
3265
|
-
"head_silence_s": 0,
|
|
3266
|
-
"tail_silence_s": 0,
|
|
3267
|
-
"total_silence_s": 0
|
|
3268
|
-
},
|
|
3269
|
-
"spectrum": {
|
|
3270
|
-
"centroid_hz": 2926.2,
|
|
3271
|
-
"rolloff95_hz": 11111.9,
|
|
3272
|
-
"flatness": 0.0044,
|
|
3273
|
-
"hf_above_12k": 0.00109,
|
|
3274
|
-
"sub_below_60": 0.0115,
|
|
3275
|
-
"stereo_corr": 0.317
|
|
3276
|
-
},
|
|
3277
|
-
"tempo": {
|
|
3278
|
-
"estimated_bpm": 172.3,
|
|
3279
|
-
"brief_bpm": 108,
|
|
3280
|
-
"rel_err": 0.202
|
|
3281
|
-
},
|
|
3282
|
-
"key": {
|
|
3283
|
-
"best_key": "G major",
|
|
3284
|
-
"best_r": 0.732,
|
|
3285
|
-
"d_major_r": 0.695,
|
|
3286
|
-
"d_major_rank": 2,
|
|
3287
|
-
"key_ok": true
|
|
3288
|
-
},
|
|
3289
|
-
"loop": {
|
|
3290
|
-
"min_bars": 16,
|
|
3291
|
-
"score": 0.405,
|
|
3292
|
-
"similarity": 0.405,
|
|
3293
|
-
"level_match": 0.994,
|
|
3294
|
-
"start_s": 24,
|
|
3295
|
-
"end_s": 49.08,
|
|
3296
|
-
"bars": 18,
|
|
3297
|
-
"loop_s": 25.08,
|
|
3298
|
-
"beats_per_bar": 4,
|
|
3299
|
-
"grid_bpm": 172.3
|
|
3300
|
-
},
|
|
3301
|
-
"vocals": {
|
|
3302
|
-
"vocal_energy_share": 0,
|
|
3303
|
-
"vocal_active_frac": 0,
|
|
3304
|
-
"stem_share": {
|
|
3305
|
-
"drums": 0.0121,
|
|
3306
|
-
"bass": 0.0612,
|
|
3307
|
-
"other": 0.9267,
|
|
3308
|
-
"vocals": 0
|
|
3309
|
-
},
|
|
3310
|
-
"groove_active_frac": 0.557,
|
|
3311
|
-
"drums_active_frac": 0.614
|
|
3312
|
-
}
|
|
3313
|
-
},
|
|
3314
|
-
"qualified": true,
|
|
3315
|
-
"failedChecks": [],
|
|
3316
|
-
"clap": {
|
|
3317
|
-
"rank": 9,
|
|
3318
|
-
"p": 0.001423,
|
|
3319
|
-
"best": "music with melody and instruments"
|
|
3320
|
-
},
|
|
3321
|
-
"encoded": {
|
|
3322
|
-
"file": "take-a-f0c28e903f89.m4a",
|
|
3323
|
-
"loopStart": 24,
|
|
3324
|
-
"loopEnd": 49.08,
|
|
3325
|
-
"duration": 50.08,
|
|
3326
|
-
"gain": 1,
|
|
3327
|
-
"seamScore": 0.405
|
|
3328
|
-
},
|
|
3329
|
-
"provenance": {
|
|
3330
|
-
"model": "MiniMax Music 3",
|
|
3331
|
-
"variant": "MiniMaxAI/MiniMax-Music3 (8B global LM + 0.6B local LM + 2.4B flow-matching DiT)",
|
|
3332
|
-
"code_commit": "diffusers 0.40.0, torch 2.14.0",
|
|
3333
|
-
"backend": "PyTorch mps bf16",
|
|
3334
|
-
"style": "ob7",
|
|
3335
|
-
"slot": "showcase-template",
|
|
3336
|
-
"seed": 701,
|
|
3337
|
-
"prompt": "Instrumental video game score, 108 BPM, 4/4. Bright clear day in a polished orange-and-grey workshop town of canals, gardens and stalls. Cheerful toy-box workshop music with marimba, pizzicato strings, light brass stabs and woodblock clock ticks. Playful and inviting, not silly. Clear short memorable instrumental theme, consistent dynamics from the second bar, no fade-out or sudden ending, final full bar suitable for a seamless loop. Detailed instrumental production, no environmental sound effects, no voices, no vocals, no choir, no dialogue.",
|
|
3338
|
-
"lyrics": "[Instrumental]\n[Instrumental]\n[Solo]\n[Instrumental]",
|
|
3339
|
-
"duration_s": 75,
|
|
3340
|
-
"steps": 30,
|
|
3341
|
-
"gen_time_s": 219.8,
|
|
3342
|
-
"model_load_s": 9.7,
|
|
3343
|
-
"mps_driver_gb": 27.17
|
|
3344
|
-
}
|
|
3345
|
-
},
|
|
3346
|
-
{
|
|
3347
|
-
"id": "minimax3-702",
|
|
3348
|
-
"recommendationScore": 0.1653985,
|
|
3349
|
-
"metrics": {
|
|
3350
|
-
"duration_s": 23.34,
|
|
3351
|
-
"sample_rate": 44100,
|
|
3352
|
-
"channels": 2,
|
|
3353
|
-
"loudness": {
|
|
3354
|
-
"lufs": -16.6,
|
|
3355
|
-
"lra": 13.6,
|
|
3356
|
-
"true_peak_dbfs": -0.1
|
|
3357
|
-
},
|
|
3358
|
-
"clipping": {
|
|
3359
|
-
"clipped_samples": 0,
|
|
3360
|
-
"clipped_frac": 0,
|
|
3361
|
-
"peak": 0.9922
|
|
3362
|
-
},
|
|
3363
|
-
"silence": {
|
|
3364
|
-
"longest_internal_gap_s": 0,
|
|
3365
|
-
"internal_gaps": 0,
|
|
3366
|
-
"head_silence_s": 0,
|
|
3367
|
-
"tail_silence_s": 1.57,
|
|
3368
|
-
"total_silence_s": 1.57
|
|
3369
|
-
},
|
|
3370
|
-
"spectrum": {
|
|
3371
|
-
"centroid_hz": 2424.8,
|
|
3372
|
-
"rolloff95_hz": 10311.6,
|
|
3373
|
-
"flatness": 0.001,
|
|
3374
|
-
"hf_above_12k": 0.00002,
|
|
3375
|
-
"sub_below_60": 0.0022,
|
|
3376
|
-
"stereo_corr": 0.497
|
|
3377
|
-
},
|
|
3378
|
-
"tempo": {
|
|
3379
|
-
"estimated_bpm": 161.5,
|
|
3380
|
-
"brief_bpm": 108,
|
|
3381
|
-
"rel_err": 0.252
|
|
3382
|
-
},
|
|
3383
|
-
"key": {
|
|
3384
|
-
"best_key": "D# minor",
|
|
3385
|
-
"best_r": 0.747,
|
|
3386
|
-
"d_major_r": -0.376,
|
|
3387
|
-
"d_major_rank": 19,
|
|
3388
|
-
"key_ok": false
|
|
3389
|
-
},
|
|
3390
|
-
"loop": {
|
|
3391
|
-
"min_bars": 2,
|
|
3392
|
-
"score": 0.302,
|
|
3393
|
-
"similarity": 0.316,
|
|
3394
|
-
"level_match": 0.843,
|
|
3395
|
-
"start_s": 9,
|
|
3396
|
-
"end_s": 16.43,
|
|
3397
|
-
"bars": 5,
|
|
3398
|
-
"loop_s": 7.43,
|
|
3399
|
-
"beats_per_bar": 4,
|
|
3400
|
-
"grid_bpm": 161.5
|
|
3401
|
-
},
|
|
3402
|
-
"vocals": {
|
|
3403
|
-
"vocal_energy_share": 0,
|
|
3404
|
-
"vocal_active_frac": 0,
|
|
3405
|
-
"stem_share": {
|
|
3406
|
-
"drums": 0.0096,
|
|
3407
|
-
"bass": 0,
|
|
3408
|
-
"other": 0.9904,
|
|
3409
|
-
"vocals": 0
|
|
3410
|
-
},
|
|
3411
|
-
"groove_active_frac": 0.261,
|
|
3412
|
-
"drums_active_frac": 0.261
|
|
3413
|
-
}
|
|
3414
|
-
},
|
|
3415
|
-
"qualified": false,
|
|
3416
|
-
"failedChecks": [
|
|
3417
|
-
"duration below 25 seconds"
|
|
3418
|
-
],
|
|
3419
|
-
"clap": {
|
|
3420
|
-
"rank": 16,
|
|
3421
|
-
"p": 0.002697,
|
|
3422
|
-
"best": "Instrumental video game score, 72 BPM, 4/4. Lavender blue hour at a quiet palaeontology dig in banded clay badlands, lanterns lit in the dry wind. Low marimba and kalimba answer a distant wooden flute over soft bowed strings. Slow, dusty, wondering and warmly curious, never spooky or threatening. Sparse acoustic motifs and gentle open harmonies for unhurried discovery. Clear short memorable instrumental theme, consistent dynamics from the second bar, no fade-out or sudden ending, final full bar suitable for a seamless loop. Detailed acoustic production, no environmental sound effects, no voices, no vocals, no choir, no dialogue."
|
|
3423
|
-
},
|
|
3424
|
-
"encoded": {
|
|
3425
|
-
"file": "take-b-edaaf23f157f.m4a",
|
|
3426
|
-
"loopStart": 9,
|
|
3427
|
-
"loopEnd": 16.43,
|
|
3428
|
-
"duration": 17.43,
|
|
3429
|
-
"gain": 1,
|
|
3430
|
-
"seamScore": 0.302
|
|
3431
|
-
},
|
|
3432
|
-
"provenance": {
|
|
3433
|
-
"model": "MiniMax Music 3",
|
|
3434
|
-
"variant": "MiniMaxAI/MiniMax-Music3 (8B global LM + 0.6B local LM + 2.4B flow-matching DiT)",
|
|
3435
|
-
"code_commit": "diffusers 0.40.0, torch 2.14.0",
|
|
3436
|
-
"backend": "PyTorch mps bf16",
|
|
3437
|
-
"style": "ob7",
|
|
3438
|
-
"slot": "showcase-template",
|
|
3439
|
-
"seed": 702,
|
|
3440
|
-
"prompt": "Instrumental video game score, 108 BPM, 4/4. Bright clear day in a polished orange-and-grey workshop town of canals, gardens and stalls. Cheerful toy-box workshop music with marimba, pizzicato strings, light brass stabs and woodblock clock ticks. Playful and inviting, not silly. Clear short memorable instrumental theme, consistent dynamics from the second bar, no fade-out or sudden ending, final full bar suitable for a seamless loop. Detailed instrumental production, no environmental sound effects, no voices, no vocals, no choir, no dialogue.",
|
|
3441
|
-
"lyrics": "[Instrumental]\n[Instrumental]\n[Solo]\n[Instrumental]",
|
|
3442
|
-
"duration_s": 75,
|
|
3443
|
-
"steps": 30,
|
|
3444
|
-
"gen_time_s": 70.3,
|
|
3445
|
-
"model_load_s": 9.7,
|
|
3446
|
-
"mps_driver_gb": 27.19
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
]
|
|
3450
|
-
},
|
|
3451
3224
|
"sky-harbor": {
|
|
3452
3225
|
"genre": "sky-harbor",
|
|
3453
3226
|
"model": "MiniMax Music 3",
|
|
@@ -8292,73 +8065,6 @@ export const SFX_MANIFESTS: Readonly<Record<string, unknown>> = {
|
|
|
8292
8065
|
}
|
|
8293
8066
|
]
|
|
8294
8067
|
},
|
|
8295
|
-
"showcase-template": {
|
|
8296
|
-
"model": "MOSS-SoundEffect v2 · Stable Audio 3 Medium",
|
|
8297
|
-
"credit": "Sound effects: MOSS-SoundEffect v2 · Stable Audio 3 Medium — Powered by Stability AI",
|
|
8298
|
-
"licence": "MOSS: Apache-2.0; Stable Audio 3 Medium: Stability AI Community License and Gemma terms",
|
|
8299
|
-
"beds": {
|
|
8300
|
-
"showcase-template.ambience": {
|
|
8301
|
-
"file": "ambience-f45d3258415f.m4a",
|
|
8302
|
-
"loopStart": 2.25,
|
|
8303
|
-
"loopEnd": 27.25,
|
|
8304
|
-
"duration": 28.25,
|
|
8305
|
-
"gain": 1,
|
|
8306
|
-
"seamScore": 0.615
|
|
8307
|
-
}
|
|
8308
|
-
},
|
|
8309
|
-
"hums": {
|
|
8310
|
-
"showcase-template.obelisk": {
|
|
8311
|
-
"file": "obelisk-5c25113eba12.m4a",
|
|
8312
|
-
"loopStart": 4,
|
|
8313
|
-
"loopEnd": 6,
|
|
8314
|
-
"duration": 7,
|
|
8315
|
-
"gain": 1,
|
|
8316
|
-
"seamScore": 0.444
|
|
8317
|
-
},
|
|
8318
|
-
"showcase-template.canal-ring": {
|
|
8319
|
-
"file": "canal-ring-5e28a62c686f.m4a",
|
|
8320
|
-
"loopStart": 2,
|
|
8321
|
-
"loopEnd": 9,
|
|
8322
|
-
"duration": 10,
|
|
8323
|
-
"gain": 1,
|
|
8324
|
-
"seamScore": 0.572
|
|
8325
|
-
},
|
|
8326
|
-
"showcase-template.stalls": {
|
|
8327
|
-
"file": "stalls-b1a466b81973.m4a",
|
|
8328
|
-
"loopStart": 4,
|
|
8329
|
-
"loopEnd": 6,
|
|
8330
|
-
"duration": 7,
|
|
8331
|
-
"gain": 1,
|
|
8332
|
-
"seamScore": 0.521
|
|
8333
|
-
},
|
|
8334
|
-
"showcase-template.gardens": {
|
|
8335
|
-
"file": "gardens-77fb4ba39523.m4a",
|
|
8336
|
-
"loopStart": 3.75,
|
|
8337
|
-
"loopEnd": 9.75,
|
|
8338
|
-
"duration": 10.75,
|
|
8339
|
-
"gain": 1,
|
|
8340
|
-
"seamScore": 0.582
|
|
8341
|
-
},
|
|
8342
|
-
"showcase-template.houses": {
|
|
8343
|
-
"file": "houses-9ca4abaa256f.m4a",
|
|
8344
|
-
"loopStart": 3.25,
|
|
8345
|
-
"loopEnd": 5.25,
|
|
8346
|
-
"duration": 6.25,
|
|
8347
|
-
"gain": 1,
|
|
8348
|
-
"seamScore": 0.303
|
|
8349
|
-
},
|
|
8350
|
-
"showcase-template.road-entry": {
|
|
8351
|
-
"file": "road-entry-204f957bd718.m4a",
|
|
8352
|
-
"loopStart": 4.25,
|
|
8353
|
-
"loopEnd": 6.25,
|
|
8354
|
-
"duration": 7.25,
|
|
8355
|
-
"gain": 1,
|
|
8356
|
-
"seamScore": 0.541
|
|
8357
|
-
}
|
|
8358
|
-
},
|
|
8359
|
-
"oneshots": {},
|
|
8360
|
-
"rejected": []
|
|
8361
|
-
},
|
|
8362
8068
|
"sky-harbor": {
|
|
8363
8069
|
"model": "MOSS-SoundEffect v2 · Stable Audio 3 Medium",
|
|
8364
8070
|
"credit": "Sound effects: MOSS-SoundEffect v2 · Stable Audio 3 Medium — Powered by Stability AI; shared coastal bed from coral-drift",
|
|
@@ -708,9 +708,6 @@ export const PUBLIC_BYTES = {
|
|
|
708
708
|
"/assets/music/saltwind-lighthouse/music.json": 7271,
|
|
709
709
|
"/assets/music/saltwind-lighthouse/take-a-d962afb1ace0.m4a": 74123,
|
|
710
710
|
"/assets/music/saltwind-lighthouse/take-b-6533451204d4.m4a": 292105,
|
|
711
|
-
"/assets/music/showcase-template/music.json": 7719,
|
|
712
|
-
"/assets/music/showcase-template/take-a-f0c28e903f89.m4a": 415976,
|
|
713
|
-
"/assets/music/showcase-template/take-b-edaaf23f157f.m4a": 144025,
|
|
714
711
|
"/assets/music/sky-harbor/music.json": 8477,
|
|
715
712
|
"/assets/music/sky-harbor/take-a-0f10cfca8bab.m4a": 102858,
|
|
716
713
|
"/assets/music/sky-harbor/take-b-d1028fbfc8ef.m4a": 129038,
|
|
@@ -1441,14 +1438,6 @@ export const PUBLIC_BYTES = {
|
|
|
1441
1438
|
"/assets/sfx/saltwind-lighthouse/se-boat-rigging-a9b8ad0d1613.m4a": 68849,
|
|
1442
1439
|
"/assets/sfx/saltwind-lighthouse/sfx.json": 40510,
|
|
1443
1440
|
"/assets/sfx/saltwind-lighthouse/slate-roof-rain-e992201c4301.m4a": 77083,
|
|
1444
|
-
"/assets/sfx/showcase-template/ambience-f45d3258415f.m4a": 233397,
|
|
1445
|
-
"/assets/sfx/showcase-template/canal-ring-5e28a62c686f.m4a": 83195,
|
|
1446
|
-
"/assets/sfx/showcase-template/gardens-77fb4ba39523.m4a": 89545,
|
|
1447
|
-
"/assets/sfx/showcase-template/houses-9ca4abaa256f.m4a": 52161,
|
|
1448
|
-
"/assets/sfx/showcase-template/obelisk-5c25113eba12.m4a": 58593,
|
|
1449
|
-
"/assets/sfx/showcase-template/road-entry-204f957bd718.m4a": 60423,
|
|
1450
|
-
"/assets/sfx/showcase-template/sfx.json": 14647,
|
|
1451
|
-
"/assets/sfx/showcase-template/stalls-b1a466b81973.m4a": 58564,
|
|
1452
1441
|
"/assets/sfx/sky-harbor/basin-water-f02c555ed561.m4a": 50192,
|
|
1453
1442
|
"/assets/sfx/sky-harbor/corner-cottages-604677496f75.m4a": 64766,
|
|
1454
1443
|
"/assets/sfx/sky-harbor/dock-crane-6afae223008b.m4a": 51020,
|
|
@@ -340,9 +340,6 @@ export const ASSET_VERSIONS: Readonly<Record<string, string>> = {
|
|
|
340
340
|
"/assets/music/saltwind-lighthouse/music.json": '044784de',
|
|
341
341
|
"/assets/music/saltwind-lighthouse/take-a-d962afb1ace0.m4a": 'd962afb1',
|
|
342
342
|
"/assets/music/saltwind-lighthouse/take-b-6533451204d4.m4a": '65334512',
|
|
343
|
-
"/assets/music/showcase-template/music.json": 'cf02ddf9',
|
|
344
|
-
"/assets/music/showcase-template/take-a-f0c28e903f89.m4a": 'f0c28e90',
|
|
345
|
-
"/assets/music/showcase-template/take-b-edaaf23f157f.m4a": 'edaaf23f',
|
|
346
343
|
"/assets/music/sky-harbor/music.json": '2a528a0c',
|
|
347
344
|
"/assets/music/sky-harbor/take-a-0f10cfca8bab.m4a": '0f10cfca',
|
|
348
345
|
"/assets/music/sky-harbor/take-b-d1028fbfc8ef.m4a": 'd1028fbf',
|
|
@@ -666,14 +663,6 @@ export const ASSET_VERSIONS: Readonly<Record<string, string>> = {
|
|
|
666
663
|
"/assets/sfx/saltwind-lighthouse/se-boat-rigging-a9b8ad0d1613.m4a": 'a9b8ad0d',
|
|
667
664
|
"/assets/sfx/saltwind-lighthouse/sfx.json": 'a6dbc543',
|
|
668
665
|
"/assets/sfx/saltwind-lighthouse/slate-roof-rain-e992201c4301.m4a": 'e992201c',
|
|
669
|
-
"/assets/sfx/showcase-template/ambience-f45d3258415f.m4a": 'f45d3258',
|
|
670
|
-
"/assets/sfx/showcase-template/canal-ring-5e28a62c686f.m4a": '5e28a62c',
|
|
671
|
-
"/assets/sfx/showcase-template/gardens-77fb4ba39523.m4a": '77fb4ba3',
|
|
672
|
-
"/assets/sfx/showcase-template/houses-9ca4abaa256f.m4a": '9ca4abaa',
|
|
673
|
-
"/assets/sfx/showcase-template/obelisk-5c25113eba12.m4a": '5c25113e',
|
|
674
|
-
"/assets/sfx/showcase-template/road-entry-204f957bd718.m4a": '204f957b',
|
|
675
|
-
"/assets/sfx/showcase-template/sfx.json": '8bcc8e19',
|
|
676
|
-
"/assets/sfx/showcase-template/stalls-b1a466b81973.m4a": 'b1a466b8',
|
|
677
666
|
"/assets/sfx/sky-harbor/basin-water-f02c555ed561.m4a": 'f02c555e',
|
|
678
667
|
"/assets/sfx/sky-harbor/corner-cottages-604677496f75.m4a": '60467749',
|
|
679
668
|
"/assets/sfx/sky-harbor/dock-crane-6afae223008b.m4a": '6afae223',
|
|
@@ -17,6 +17,8 @@ import { isOwnedId, isCosmetic, type Owned } from '../../../shared/game/loot/Own
|
|
|
17
17
|
import { wirePage } from '../shardfile/wirePage';
|
|
18
18
|
import { rollLoot } from '../loot/tables';
|
|
19
19
|
import { onCreatureDeath } from '../../../shared/game/loot/deaths';
|
|
20
|
+
import { progressionState, takeKeepsake, type KeepsakeRoom } from '../../../shared/game/compendium/keepsakeProgression';
|
|
21
|
+
import { OWNED_ROW, WORN_LINE } from '../../../shared/game/loot/ownedRows';
|
|
20
22
|
import type { DeclaredLootEconomy } from '../../../shared/game/shard/declaredRows';
|
|
21
23
|
import type { ShardContext } from '../plugin/context';
|
|
22
24
|
import type { CollectionCatalogue, CollectionDisplay, CollectionParams } from '../models/collectionDisplay';
|
|
@@ -54,13 +56,19 @@ export function installCollectionKeepsakes<A extends { kind: string; variant?: s
|
|
|
54
56
|
} {
|
|
55
57
|
const { owned, progression, flags, rows } = h, scope = h.owner?.scope, view = keepsakeView(h);
|
|
56
58
|
const pending: { text: string; at: number }[] = [];
|
|
59
|
+
// SERVER-PARITY HS4: in a room the server's book holds the keepsakes (SS3b pays the charms off the same flags, personal loot
|
|
60
|
+
// files the trophies), and this page only mirrors it: it grants nothing, and tells each reward once, past the world's first frame.
|
|
61
|
+
const room = (): KeepsakeRoom | null => wirePage.client === null ? null
|
|
62
|
+
: { worn: id => wirePage.line(`${OWNED_ROW.owned}${id}`) === WORN_LINE, wear: id => { wirePage.wear(id); } };
|
|
63
|
+
const told = new Set<string>();
|
|
57
64
|
let clock = 0;
|
|
58
65
|
const sync = (announce: boolean): void => {
|
|
59
|
-
const state = progression
|
|
60
|
-
if (state === undefined) throw new Error('Missing admitted reward state');
|
|
66
|
+
const state = progressionState(progression, flag => flags.has(flag)), online = room() !== null;
|
|
61
67
|
view.chime?.setCount(state.displayCount);
|
|
62
68
|
for (const reward of state.earned) {
|
|
63
|
-
|
|
69
|
+
const fresh = online ? !told.has(reward.id) : owned.grant(reward.id);
|
|
70
|
+
told.add(reward.id);
|
|
71
|
+
if (!fresh || !announce || online && !wirePage.settled) continue;
|
|
64
72
|
const last = pending[pending.length - 1]?.at ?? -Infinity;
|
|
65
73
|
pending.push({ text: reward.text, at: Math.max(clock + rows.delay, last + rows.spacing) });
|
|
66
74
|
}
|
|
@@ -78,7 +86,7 @@ export function installCollectionKeepsakes<A extends { kind: string; variant?: s
|
|
|
78
86
|
}));
|
|
79
87
|
};
|
|
80
88
|
apply(); const offOwned = owned.onChange(apply); scope?.onDispose(offOwned);
|
|
81
|
-
const awarded = new Set<string>();
|
|
89
|
+
const awarded = new Set<string>(), restored = new Set<string>();
|
|
82
90
|
const roster = new ClaimedPickupRoster<string>(h.pickups, {
|
|
83
91
|
scene: h.game.scene, has: id => !awarded.has(id) && isOwnedId(id) && owned.has(id),
|
|
84
92
|
model: id => { const row = rows.drops[id]; if (row === undefined) throw new Error(`Missing collection drop: ${id}`); return view.loose(row.model, row.trophy); },
|
|
@@ -86,7 +94,9 @@ export function installCollectionKeepsakes<A extends { kind: string; variant?: s
|
|
|
86
94
|
take: id => {
|
|
87
95
|
const text = h.pickups[id]?.toast, row = rows.drops[id];
|
|
88
96
|
if (!isOwnedId(id) || text === undefined || row === undefined) throw new Error(`Unknown collection pickup: ${id}`);
|
|
89
|
-
|
|
97
|
+
// a restore is the page's own save's: in a room (now, whenever the wire bound) the server's book keeps the reward
|
|
98
|
+
awarded.delete(id); if (restored.delete(id) && room() !== null) return;
|
|
99
|
+
takeKeepsake(owned, id, row.wear, room());
|
|
90
100
|
view.announce(text, 0.8);
|
|
91
101
|
},
|
|
92
102
|
});
|
|
@@ -107,7 +117,7 @@ export function installCollectionKeepsakes<A extends { kind: string; variant?: s
|
|
|
107
117
|
});
|
|
108
118
|
for (const row of rows.restore) {
|
|
109
119
|
const at = h.rewardAt();
|
|
110
|
-
if (flags.has(row.flag) && isOwnedId(row.item) && !owned.has(row.item) && at !== undefined) roster.spawn(row.item, at, false);
|
|
120
|
+
if (flags.has(row.flag) && isOwnedId(row.item) && !owned.has(row.item) && at !== undefined) { restored.add(row.item); roster.spawn(row.item, at, false); }
|
|
111
121
|
}
|
|
112
122
|
h.game.onUpdate((dt, t) => {
|
|
113
123
|
clock += dt;
|
|
@@ -16,6 +16,7 @@ import type { EquipmentHost } from '@wildshard/engine/combat/view/EquipmentHost'
|
|
|
16
16
|
import type { InputContextDef } from '@wildshard/engine/level/context';
|
|
17
17
|
import { playerModes } from '@wildshard/engine/player/modes';
|
|
18
18
|
import type { DiscSpot, TouchRelabel } from '@wildshard/engine/ui/hudSlots';
|
|
19
|
+
import { frameEye, framedPoint } from '@wildshard/engine/ui/hudAdapters';
|
|
19
20
|
import type { ShardContext } from '@wildshard/engine/game/plugin/context';
|
|
20
21
|
import { Filament, Rope } from './ribbon';
|
|
21
22
|
import { effectField } from '@wildshard/engine/fx/effectField';
|
|
@@ -125,11 +126,13 @@ function installGrappleAim(ctx: EquipmentHost, shard: ShardContext, scope: Scope
|
|
|
125
126
|
const MARKS = row.marks, H = v.parse(hints, row.hints);
|
|
126
127
|
prepareGrappleFonts(row);
|
|
127
128
|
let hooks = fragment.hooks;
|
|
128
|
-
// the camera as the aim (read live, as the Tool always did)
|
|
129
|
+
// the camera as the aim (read live, as the Tool always did). Hooks, colliders and the feet are frame-local; in a grid frame
|
|
130
|
+
// the camera stands at the frame's render offset, so the eye takes it off and a projection adds it (QA 2026-11-13 row 28)
|
|
131
|
+
const viewEye = new Vector3();
|
|
129
132
|
const view: GrappleView = {
|
|
130
|
-
get eye() { return ctx.game.camera
|
|
133
|
+
get eye() { return frameEye(ctx.game.camera, viewEye); },
|
|
131
134
|
update: () => { ctx.game.camera.updateMatrixWorld(true); },
|
|
132
|
-
project: (point, out) =>
|
|
135
|
+
project: (point, out) => framedPoint(point, out).project(ctx.game.camera),
|
|
133
136
|
forward: (out) => ctx.game.camera.getWorldDirection(out),
|
|
134
137
|
};
|
|
135
138
|
const tracer = makeTracer(ctx, row, profile, scope);
|
|
@@ -248,7 +251,7 @@ function installGrappleAim(ctx: EquipmentHost, shard: ShardContext, scope: Scope
|
|
|
248
251
|
const pickCandidate = (): GrappleTarget | null => {
|
|
249
252
|
if (candidate < 0) return null;
|
|
250
253
|
const hook = hooks[candidate];
|
|
251
|
-
if (hook === undefined || !rules.visible(sim.course,
|
|
254
|
+
if (hook === undefined || !rules.visible(sim.course, view.eye, hook)) return null;
|
|
252
255
|
const landing = new Vector3();
|
|
253
256
|
const side = rules.landing(ctx.player.position, hook, landing);
|
|
254
257
|
return side === rules.none ? null : rules.target(sim.course, hook, landing, side);
|
|
@@ -313,7 +316,7 @@ function installGrappleAim(ctx: EquipmentHost, shard: ShardContext, scope: Scope
|
|
|
313
316
|
const scan = (): number => {
|
|
314
317
|
const camera = ctx.game.camera;
|
|
315
318
|
camera.updateMatrixWorld(true);
|
|
316
|
-
const eye =
|
|
319
|
+
const eye = view.eye;
|
|
317
320
|
for (let i = 0; i < n; i++) {
|
|
318
321
|
const hook = hooks[i];
|
|
319
322
|
if (hook === undefined) continue;
|
|
@@ -321,7 +324,7 @@ function installGrappleAim(ctx: EquipmentHost, shard: ShardContext, scope: Scope
|
|
|
321
324
|
dist[i] = d;
|
|
322
325
|
let on = 0;
|
|
323
326
|
if (d >= MIN_RANGE && d <= MAX_RANGE) {
|
|
324
|
-
|
|
327
|
+
framedPoint(hook, ndc).project(camera);
|
|
325
328
|
if (ndc.z >= -1 && ndc.z <= 1 && Math.abs(ndc.x) <= 1.05 && Math.abs(ndc.y) <= 1.05) { on = 1; ndcX[i] = ndc.x; ndcY[i] = ndc.y; }
|
|
326
329
|
}
|
|
327
330
|
inView[i] = on;
|
|
@@ -388,7 +391,7 @@ function installGrappleAim(ctx: EquipmentHost, shard: ShardContext, scope: Scope
|
|
|
388
391
|
for (const m of marks) m.show(false);
|
|
389
392
|
if (target === null) chip.show(false);
|
|
390
393
|
else {
|
|
391
|
-
|
|
394
|
+
framedPoint(target.hook, ndc).project(ctx.game.camera);
|
|
392
395
|
chip.show(ndc.z >= -1 && ndc.z <= 1);
|
|
393
396
|
chip.label(touchUi ? row.chip.lockedTouch : row.chip.lockedDesk, 'locked', row.chip.lockedColor);
|
|
394
397
|
chip.at(target.hook);
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* `cellLoadingStep` is the pure part: a cell's live state to its current step and detail, a refusal's reason, or done.
|
|
8
8
|
* `CellLoading` owns the one scoped screen: it opens on the cell the traveller waits at (or has entered before it is
|
|
9
9
|
* gameplay-ready), steps it at most a few times a second, and fades it out when the cell is ready or left.
|
|
10
|
+
*
|
|
11
|
+
* QA 2026-11-13 (Jake: "make it look the same as the one for Shard Select"): G578's in-world canvas panel is gone; the
|
|
12
|
+
* screen is SHARD SELECT's own card again, drawn as a screen-space inset over the live world (`cellScreens.ts`).
|
|
10
13
|
*/
|
|
11
|
-
import type { CellScreen, CellScreenView } from './cellScreens';
|
|
12
|
-
import type { SoftWallEdge } from './softWallLook';
|
|
13
14
|
import { loadingPath } from '../boot/loadingPaths';
|
|
14
15
|
|
|
15
16
|
/** One waiting cell's live admission, read through the grid session's read-only port. */
|
|
@@ -57,33 +58,43 @@ export function cellLoadingStep(input: CellLoadingInput): CellLoadingStep {
|
|
|
57
58
|
return { kind: 'step', key: input.hook === 'activate' ? 'enter' : 'warm', detail: `preparing its first frame${running}` };
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
/**
|
|
61
|
-
export interface
|
|
62
|
-
/**
|
|
61
|
+
/** One row of the screen: its label and whether it is done, running now (with the detail) or still to come. */
|
|
62
|
+
export interface CellLoadingRow { readonly label: string; readonly state: 'done' | 'now' | 'next' }
|
|
63
|
+
/** What the screen shows: whose cell, the step running now (a key of the `cell` path), its rows and detail, or the refusal. */
|
|
64
|
+
export interface CellLoadingView { readonly instance: string; readonly name: string; readonly step: string; readonly rows: readonly CellLoadingRow[];
|
|
65
|
+
readonly detail: string; readonly failed: string | null }
|
|
66
|
+
/** The screen a waiting cell's steps draw on: shown (or stepped) per poll, hidden when the cell is entered or left. */
|
|
67
|
+
export interface CellLoadingScreen { readonly show: (view: CellLoadingView) => void; readonly hide: (entered: boolean) => void }
|
|
68
|
+
/** The waiting cell's steps on the loading card (`CellLoadingScreen`); the 3D world, the road and the other cells stay live. */
|
|
63
69
|
export class CellLoading {
|
|
64
70
|
private instance: string | null = null;
|
|
65
71
|
/** the step shown: a running hook's own step, else the furthest reached (a region learns it has hooks only when they
|
|
66
72
|
* start, so between hooks a row never goes back) */
|
|
67
73
|
private reached = -1;
|
|
68
|
-
|
|
74
|
+
/** `known`: whether the waiting cell is one of this session's neighbours (no screen for one that is not) */
|
|
75
|
+
constructor(private readonly screen: CellLoadingScreen, private readonly known: (instance: string) => boolean) {}
|
|
69
76
|
/** Show, step or hide the screen from this cell's live state (null: no cell is waiting). */
|
|
70
77
|
step(input: CellLoadingInput | null): void {
|
|
71
78
|
if (input === null || input.instance !== this.instance) this.close();
|
|
72
79
|
if (input === null) return;
|
|
73
|
-
const step = cellLoadingStep(input)
|
|
74
|
-
if (step.kind === 'done' ||
|
|
80
|
+
const step = cellLoadingStep(input);
|
|
81
|
+
if (step.kind === 'done' || !this.known(input.instance)) { this.close(step.kind === 'done'); return; }
|
|
75
82
|
this.instance = input.instance;
|
|
76
83
|
const path = loadingPath('cell').steps;
|
|
77
84
|
if (step.kind === 'step') {
|
|
78
85
|
const index = path.findIndex(row => row.key === step.key);
|
|
79
86
|
this.reached = input.hook === null ? Math.max(this.reached, index) : index;
|
|
80
87
|
}
|
|
81
|
-
const rows = path.map((row, i):
|
|
88
|
+
const rows = path.map((row, i): CellLoadingRow => ({ label: row.label, state: i < this.reached ? 'done' : i === this.reached ? 'now' : 'next' }));
|
|
82
89
|
const detail = step.kind === 'step' ? step.detail : '';
|
|
83
|
-
this.screen.show(
|
|
90
|
+
this.screen.show({ instance: input.instance, name: input.name, step: path[Math.max(0, this.reached)]?.key ?? '', rows, detail,
|
|
91
|
+
failed: step.kind === 'failed' ? step.reason : null });
|
|
84
92
|
}
|
|
85
93
|
/** The screen's cell (null: none shown). */
|
|
86
94
|
get open(): string | null { return this.instance; }
|
|
87
|
-
/** Hide the screen. */
|
|
88
|
-
close(): void {
|
|
95
|
+
/** Hide the screen: `entered`, the cell is ready (the card completes and fades); else it was left or cancelled. */
|
|
96
|
+
close(entered = false): void {
|
|
97
|
+
const was = this.instance; this.instance = null; this.reached = -1;
|
|
98
|
+
if (was !== null) this.screen.hide(entered);
|
|
99
|
+
}
|
|
89
100
|
}
|