@moku-labs/game 0.15.56 → 0.15.58

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.
Files changed (32) hide show
  1. package/README.md +2 -0
  2. package/dist/app/page.d.mts +3 -2
  3. package/dist/app/page.mjs +56 -2
  4. package/dist/app/system.d.mts +3 -3
  5. package/dist/app.d.mts +3 -3
  6. package/dist/app.mjs +1 -1
  7. package/dist/assets.d.mts +1 -1
  8. package/dist/cli.mjs +104 -26
  9. package/dist/{commands-D8ocnkh8.d.mts → commands-B208rrQE.d.mts} +5 -5
  10. package/dist/{config-B87aFTW-.mjs → config-HpC-p8Ow.mjs} +35 -6
  11. package/dist/control.d.mts +4 -4
  12. package/dist/{define-DRkVydOj.d.mts → define-U9QpSza7.d.mts} +2 -2
  13. package/dist/{headless-BtrOeDfI.d.mts → headless-7IBMNGda.d.mts} +1 -1
  14. package/dist/{index-PGmy-0aO.d.mts → index-m2g9-8_E.d.mts} +15 -6
  15. package/dist/index.d.mts +5 -5
  16. package/dist/index.mjs +1 -1
  17. package/dist/inspect.d.mts +6 -6
  18. package/dist/jsx-dev-runtime.d.mts +1 -1
  19. package/dist/jsx-runtime.d.mts +1 -1
  20. package/dist/{runtime-UNbbvD7o.d.mts → runtime-DLCg0viS.d.mts} +1 -1
  21. package/dist/{src-oLOaiwM6.mjs → src-CJtaTza4.mjs} +1100 -258
  22. package/dist/testing.d.mts +4 -4
  23. package/dist/testing.mjs +1 -1
  24. package/dist/{types-BcANFUZP.d.mts → types-BEW2Y3au.d.mts} +2 -2
  25. package/dist/{types-ADGyB4g0.d.mts → types-C0As3dEe.d.mts} +2 -2
  26. package/dist/{types-CdMow4TX.d.mts → types-C6PML3Il.d.mts} +283 -31
  27. package/dist/{types-VzfTa-kj.d.mts → types-CuFoPhWD.d.mts} +44 -7
  28. package/dist/{types-BO8ChejZ.d.mts → types-FtzEwwWY.d.mts} +1 -1
  29. package/dist/{visual-CF3nFcQ3.d.mts → visual-CpTnNnas.d.mts} +6 -6
  30. package/dist/visual.d.mts +1 -1
  31. package/llms.txt +3 -2
  32. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { $ as PixiModule, An as TypeTag, Cr as FakeClock, Dr as Config, Fr as ProviderCall, Ir as SaveDoc, Pr as PlayerStateProvider, X as Config$2, a as Config$3, d as Manifest, in as Config$1, kr as Json, lt as Orientation, n as AssetsIo, xn as AnyFlow, xr as ClockSource, yn as FeaturePlugin, zr as SnapshotOf } from "./types-CdMow4TX.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-ADGyB4g0.mjs";
3
- import { R as I18nApi, U as StringTable, W as TextKey } from "./types-BO8ChejZ.mjs";
4
- import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-PGmy-0aO.mjs";
1
+ import { $ as PixiModule, An as TypeTag, Ar as Json, Br as SnapshotOf, Fr as PlayerStateProvider, Ir as ProviderCall, Lr as SaveDoc, Or as Config, Sr as ClockSource, X as Config$2, a as Config$3, d as Manifest, in as Config$1, lt as Orientation, n as AssetsIo, wr as FakeClock, xn as AnyFlow, yn as FeaturePlugin } from "./types-C6PML3Il.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-C0As3dEe.mjs";
3
+ import { R as I18nApi, U as StringTable, W as TextKey } from "./types-FtzEwwWY.mjs";
4
+ import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-m2g9-8_E.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/model/store/providers/memory.d.ts
@@ -81,7 +81,7 @@ type SaveKind = "memory" | "local" | "store";
81
81
  * // config.ts of a game
82
82
  * import type { GameConfig } from "@moku-labs/game/app";
83
83
  * export default {
84
- * page: { title: "Лесной городок", lang: "ru", background: "#10161d", orientation: "portrait", icons: { favicon: "assets/icon.png" } },
84
+ * page: { title: "Лесной городок", lang: "ru", background: "#10161d", orientation: "portrait", icons: { favicon: "assets/icon.png" }, boot: { image: "assets/boot.png" } },
85
85
  * native: { name: "Лесной городок", identifier: "com.mokulabs.timber", icon: "assets/icon.png" },
86
86
  * system: ["lifecycle", "back", "haptics", "keepAwake"],
87
87
  * save: "memory",
@@ -100,6 +100,26 @@ type GameConfig = {
100
100
  appleTouch?: string;
101
101
  }; /** Raw tags written into `<head>`, verbatim, in order. None by default. */
102
102
  head?: readonly string[];
103
+ /**
104
+ * The boot picture: an `<img>` centred over the canvas from the first paint, faded out after
105
+ * the first scene drew, then removed. Absent by default: the page shows only `background`
106
+ * until the first scene. `image` is a file relative to the game folder, never absolute, never
107
+ * `..`; `width` is its CSS width, default `"40vmin"`; `fadeMs` the fade, default `300`, `0`
108
+ * removes the picture in that frame.
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * // config.ts of A Memory Missing: the logo from the icon tap to the splash scene's first frame.
113
+ * export default {
114
+ * page: { title: "A Memory Missing", background: "#F4E6CA", boot: { image: "assets/boot.png", width: "52vmin" } }
115
+ * } satisfies GameConfig; // the logo fades over 300 ms, the default
116
+ * ```
117
+ */
118
+ boot?: {
119
+ image: string;
120
+ width?: string;
121
+ fadeMs?: number;
122
+ };
103
123
  }; /** The native app. Left out, the game has no native build. */
104
124
  native?: {
105
125
  /** The app name under the icon. */name: string; /** The bundle identifier, reverse DNS. */
@@ -120,6 +140,19 @@ type GameConfig = {
120
140
  overlay?: OverlayStart;
121
141
  };
122
142
  };
143
+ /**
144
+ * `page.boot` of `config.ts` with every default filled, as `resolveConfig` returns it.
145
+ *
146
+ * @example
147
+ * ```ts
148
+ * resolveConfig({ page: { title: "T", boot: { image: "assets/boot.png" } } }).page.boot; // { image: "assets/boot.png", width: "40vmin", fadeMs: 300 }
149
+ * ```
150
+ */
151
+ type ResolvedPageBoot = {
152
+ /** The picture file, relative to the game folder. */image: string; /** The CSS width of the picture. */
153
+ width: string; /** The fade-out after the first scene drew, ms. */
154
+ fadeMs: number;
155
+ };
123
156
  /**
124
157
  * How the editor's overlay shows when a debug page starts, `config.ts` `debug.overlay`.
125
158
  *
@@ -132,7 +165,8 @@ type GameConfig = {
132
165
  type OverlayStart = "closed" | "pill" | "open";
133
166
  /**
134
167
  * `GameConfig` with every default filled, as `resolveConfig` returns it. The page, the CLI and the
135
- * shell read this one, never the raw config.
168
+ * shell read this one, never the raw config. `page.boot` is the one key left out when the game
169
+ * names no boot picture.
136
170
  *
137
171
  * @example
138
172
  * ```ts
@@ -140,10 +174,13 @@ type OverlayStart = "closed" | "pill" | "open";
140
174
  * page: { title: "mini-game", lang: "en", background: "#000000", orientation: "portrait", icons: {}, head: [] },
141
175
  * native: undefined, system: [], save: "memory", assets: { layers: {} }, debug: { overlay: "closed" }
142
176
  * };
177
+ * settings.page.boot; // undefined: no boot picture, the page as before
143
178
  * ```
144
179
  */
145
180
  type ResolvedGameConfig = {
146
- /** The page, every field set. */page: Required<GameConfig["page"]>; /** The native app, or `undefined` for a game with no native build. */
181
+ /** The page, every field set; `boot` only when the game names a boot picture. */page: Required<Omit<GameConfig["page"], "boot">> & {
182
+ boot?: ResolvedPageBoot;
183
+ }; /** The native app, or `undefined` for a game with no native build. */
147
184
  native: GameConfig["native"]; /** The system plugins the shell wires. */
148
185
  system: readonly SystemName[]; /** Where the save lives. */
149
186
  save: SaveKind; /** The asset build. */
@@ -1,4 +1,4 @@
1
- import { $n as AnyComponentType, Fn as Hint, Gn as NumericFields, Hn as Motion, Jn as ReducedMotion, K as TransformValue, Kn as ProjectionMotion, Ln as Answer, Qn as AnyComponent, Rn as AnchorTarget, Un as MotionCause, Vn as Ease, Wn as MotionHandle, Y as Api$3, Yr as Api, Zn as ViewHandle, ai as Require, ar as Entity, br as Api$5, dt as ViewportSize, er as AnyComponentValue, hr as Api$2, jn as Descriptor, kr as Json, mr as TagType, nn as Api$1, rr as ComponentType, s as Events$1, t as Api$4, zn as ChangeHook } from "./types-CdMow4TX.mjs";
1
+ import { $n as AnyComponent, Ar as Json, Fn as Hint, Gn as NumericFields, Hn as Motion, Jn as ReducedMotion, K as TransformValue, Kn as ProjectionMotion, Ln as Answer, Qn as ViewHandle, Rn as AnchorTarget, Un as MotionCause, Vn as Ease, Wn as MotionHandle, Xr as Api, Y as Api$3, dt as ViewportSize, er as AnyComponentType, gr as Api$2, hr as TagType, ir as ComponentType, jn as Descriptor, nn as Api$1, oi as Require, or as Entity, s as Events$1, t as Api$4, tr as AnyComponentValue, xr as Api$5, zn as ChangeHook } from "./types-C6PML3Il.mjs";
2
2
  import { Log } from "@moku-labs/common/browser";
3
3
  import { PluginCtx } from "@moku-labs/core";
4
4
  import { Node, Yoga } from "yoga-layout/load";
@@ -1,9 +1,9 @@
1
- import { Er as Api$2, Ur as Api$3, Y as Api, br as Api$4, hr as Api$1 } from "./types-CdMow4TX.mjs";
2
- import { P as AnimApi, r as UiApi } from "./types-ADGyB4g0.mjs";
3
- import { N as InputApi } from "./types-BO8ChejZ.mjs";
4
- import { r as Repro } from "./headless-BtrOeDfI.mjs";
5
- import { a as InputOf, r as ControlApp } from "./types-BcANFUZP.mjs";
6
- import { t as commands } from "./commands-D8ocnkh8.mjs";
1
+ import { Dr as Api$2, Wr as Api$3, Y as Api, gr as Api$1, xr as Api$4 } from "./types-C6PML3Il.mjs";
2
+ import { P as AnimApi, r as UiApi } from "./types-C0As3dEe.mjs";
3
+ import { N as InputApi } from "./types-FtzEwwWY.mjs";
4
+ import { r as Repro } from "./headless-7IBMNGda.mjs";
5
+ import { a as InputOf, r as ControlApp } from "./types-BEW2Y3au.mjs";
6
+ import { t as commands } from "./commands-B208rrQE.mjs";
7
7
 
8
8
  //#region src/visual/types.d.ts
9
9
  /** The base commands of the `/control` door, keyed by their short names. */
package/dist/visual.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-CF3nFcQ3.mjs";
1
+ import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-CpTnNnas.mjs";
2
2
  export { type CheckpointResult, type VisualApp, type VisualOptions, type VisualPage, type VisualRenderer, type VisualReport, type VisualSetup, type VisualStart, type VisualStep, type VisualTest, type VisualTestResult, type VisualTolerance, defineVisualTest, parseVisualArgv, runVisualTests };
package/llms.txt CHANGED
@@ -302,7 +302,7 @@ app.model.store.snapshot().session; // { rolls: 2 }
302
302
  await run.stop();
303
303
  ```
304
304
 
305
- `config.ts` keys and defaults: `page.title` (required, never empty), `page.lang` (`"en"`), `page.background` (`"#000000"`: the page behind the canvas, the `theme-color` meta and the native window; the canvas clear colour stays `pluginConfigs.renderer.background`), `page.orientation` (`"portrait"`, or `"landscape"`, `"any"`: the native build locks it), `page.icons: { favicon?, appleTouch? }` (files relative to the game, `<link>` tags), `page.head` (raw tags, verbatim), `native: { name, identifier, icon?, targets? }` (absent: no native build), `system` (`[]`; names `lifecycle`, `back`, `haptics`, `keepAwake`, `store`), `save` (`"memory"`, or `"local"`, `"store"`), `assets.layers` (`{}`; `{ shared: "ui" }` becomes `--layer shared=ui`), `debug.overlay` (`"closed"`, or `"pill"`, `"open"`: how the editor's overlay shows when a debug page starts; the page calls `app.debug.overlay.open({ mode })` right after the agents started; only a page with the agent reads it). A refused value throws, for example `[game] config.save is "disk".` or `[game] config.system names "tray", which the game shell does not wire.`
305
+ `config.ts` keys and defaults: `page.title` (required, never empty), `page.lang` (`"en"`), `page.background` (`"#000000"`: the page behind the canvas, the `theme-color` meta and the native window; the canvas clear colour stays `pluginConfigs.renderer.background`), `page.orientation` (`"portrait"`, or `"landscape"`, `"any"`: the native build locks it), `page.icons: { favicon?, appleTouch? }` (files relative to the game, `<link>` tags), `page.head` (raw tags, verbatim), `page.boot: { image, width?, fadeMs? }` (absent by default; an `<img id="moku-boot">` centred over the canvas from the first paint until the first scene drew, then faded over `fadeMs`, `300`, and removed; `image` a file relative to the game, `width` `"40vmin"`), `native: { name, identifier, icon?, targets? }` (absent: no native build), `system` (`[]`; names `lifecycle`, `back`, `haptics`, `keepAwake`, `store`), `save` (`"memory"`, or `"local"`, `"store"`), `assets.layers` (`{}`; `{ shared: "ui" }` becomes `--layer shared=ui`), `debug.overlay` (`"closed"`, or `"pill"`, `"open"`: how the editor's overlay shows when a debug page starts; the page calls `app.debug.overlay.open({ mode })` right after the agents started; only a page with the agent reads it). A refused value throws, for example `[game] config.save is "disk".` or `[game] config.system names "tray", which the game shell does not wire.`
306
306
 
307
307
  ```ts
308
308
  // config.ts of a game in a native shell
@@ -561,7 +561,7 @@ The graph. Modules `runner`, `gate`, `inbox`, `fx`, `features`. Runner methods s
561
561
  - Overlays: `Overlay({ dim, dimColor, cover, hud, fade, hold })` on the root of an overlay (in `components`) keeps everything drawn before it as one picture, retaken in the frame anything in it changes, and with `cover: "opaque"` draws none of it once landed at alpha 1; `hold: true` (default `false`) holds the endless loops under it while it stands, as under a cover or a blurred picture (their phase follows time), so a dimmed sheet over a sharp scene draws no frame at rest; the engine draws the dim (`dim × level`, right under the root); the level follows the root's own enter and exit motion, `fade` (250 ms) only when it has none; level and landing are read through `app.renderer.sync.debug.overlays()`. A `backdrop: true` filter inside the kept range runs no pass while the picture stands (its look is in the picture) and is drawn again in the frame the overlay is gone. Types: `OverlayValue` (the component's value) and `HudPartValue` (a part of the HUD an overlay keeps shown or lets fade).
562
562
  - HUD: a scene layer `{ above: "overlays" }` is the HUD layer, drawn above every overlay and never in a picture; a scene with a HUD layer and no `ui` gets `ui` right under it. Its roots never take the keyboard: Escape and the Back press reach the top sheet under it. `HudPart({ key })` tags a HUD view; an overlay's `hud` (`"all"`, `"none"` or keys) names the parts that stay shown, the others fade with its level and take no tap. Keys are typed by `defineGame<{ …, hud: "energy" | "gems" }>()`.
563
563
  - Endless loops of views under an opaque or blurred overlay write nothing (`renderer.sync.loopsHeld(entity)`, the seam anim asks before an endless loop writes); their phase follows time.
564
- - Scene switch look: from the start of a live switch (before its bundles and textures are awaited) the renderer draws a veil over the scene being left, above every layer, and, when the switch is not done `afterMs` after its start, a loader above it until the swap; then the veil fades out over the new scene. Config `scenes.leave` (default `{ cover: { color: 0x000000, alpha: 0.45, inMs: 50, outMs: 150 }, loader: { afterMs: 400 } }`) and a scene's `leave` (`defineScene("ward", { ..., leave: false })`) are merged field by field (the scene being left decides; `false` turns a part or the whole off); the loader is the engine's white ring, `loader: { texture: "ui.loader.ring" }` a game texture turning, or `loader: { projection: "loading" }` a projection mounted only once the loader is due, in a layer of its own the scene declares (no other projection of the scene may draw there); an abort or a throw drops both at once; fast walks, a world that is not live, headless apps and the first scene show nothing; types `SceneLeave`, `SceneCover`, `SceneLoader` (`Scenes`).
564
+ - Scene switch look: from the start of a live switch (before its bundles and textures are awaited) the renderer draws a veil over the scene being left, above every layer, and, when the switch is not done `afterMs` after its start, a loader above it until the swap; then the veil fades out over the new scene. Config `scenes.leave` (default `{ cover: { color: 0x000000, alpha: 0.45, inMs: 50, outMs: 150 }, loader: { afterMs: 400 } }`) and a scene's `leave` (`defineScene("ward", { ..., leave: false })`) are merged field by field (the scene being left decides; `false` turns a part or the whole off); the loader is the engine's white ring, `loader: { texture: "ui.loader.ring" }` a game texture turning, or `loader: { projection: "loading" }` a projection in a layer of its own the scene declares (no other projection of the scene may draw there), kept built and hidden while the scene stands and shown once the loader is due; `scenes` feeds that loader the switch (`projection.feed`), so its `from(player, session, sw)` reads a `SceneSwitch`: `{ from: "ward", to: "ward", progress: 0 }` while the ward stands, then `{ from: "ward", to: "board", progress }`, the share of the board's bundles loaded (from `assets:bundle-progress`; a bundle loaded at the start or once the scene stage has its loads counts whole), 0 to 1 in steps of 0.01, the last exactly 1; an abort or a throw drops both at once; fast walks, a world that is not live, headless apps and the first scene show nothing. The scene being entered sets the veil's colour and alpha: `defineScene("night", { ..., enter: { cover: { color: 0x0b1020, alpha: 0.7 } } })` wins over what the scene being left resolved, field by field; `inMs`/`outMs` stay the left scene's and a veil turned off stays off. Types `SceneLeave`, `SceneCover`, `SceneLoader`, `SceneEnter` (`Scenes`).
565
565
  - A scene names bundles on top of its `bundle` from the committed state: `defineScene("ward", { bundle: "episodes-kit", bundles: ({ session }) => [session.episode], layers: {}, projections: [wardRoom] })`. `bundles` is read each time a node enters the scene, and every way in (a live entry, a restore, the `safeNode` recovery) waits for all of them before the scene is mounted and the node's gate opens. The keys are `BundleKey`s of `generated/assets.ts`.
566
566
  - `app.assets`: `load(bundle)`, `warm(bundle)` (loads it if needed, then puts its textures and atlas pages on the GPU through `renderer.sync.textures.upload`, `renderer.uploads` a drawn frame; joins a running or finished warm; an unload forgets it; resolves also when the renderer could not upload; headless at once), `unload(bundle)`, `isLoaded(bundle)`, `has(bundle)` (the manifest carries it, loaded or not), `texture(key)`, `font(key)`, `audio(key)`, `usage()`. Per bundle in a feature's `assets.ts`: `defineBundles({ ep01: { tier: "feature", release: "leave", mipmaps: ["items/**"] } })`. `release: "leave"` also unloads the bundle, with reason `"leave"`, at the next rest once nothing holds it: not pinned by the node entered, not named by the mounted scene, no node of its feature on the stack; a bundle the outgoing scene named leaves one rest later. The default `"budget"` leaves only under the texture budget. `mipmaps` (`true` or globs relative to `assets/`) uploads the textures with their full chain; such a texture stays loose in a pack. A sub-feature with resources gets its own bundles, named like its folder, with `dir` and `parent` in the manifest; a code-only one has none. The effect `ready(bundle | bundles)` (root export, also from `defineGame`) lets a node rest on a load and stay answerable: its handler (fast mode too) answers `true` headless, throws for an unknown bundle, answers `true` when every bundle is loaded and warmed or its last warm failed (`ctx.log.warn("assets:ready-failed", { bundle, error })`, cleared by a later successful load), otherwise starts `warm` for what is missing, answers `false` and posts `{ type: "ready" }` into `flow.inbox` once all of it settled. Recipe: a rest node `inbox: ["elapsed", "ready"]` with outcomes `ready` and `back`, and a transit node `if ((await fx(ready(list))) === false) return out.wait();`. `companions.add({ load(bundle), unload(bundle) })` adds what loads and unloads with every bundle; `i18n` adds the strings of a sub-feature that way, only when `assets` is composed. Events `assets:bundle-loaded`, `assets:bundle-progress`, `assets:bundle-unloaded` (`reason: "budget" | "request" | "leave"`), `assets:replaced` (dev). Config: `manifest`, `textureBudgetMb: 192`, `preloadDepth: 2`, `baseUrl`, `io`.
567
567
  - `resource(name, defaults)` clones plain JSON defaults into every world. `resource(name, () => value)` calls the factory once per world on first read, so the value may hold a `Map` or a function: `const Looks = resource("boardLooks", () => ({ shown: new Map<World.Entity, { look: string }>() }))`. A system keeps its own state there; `snapshot()` leaves a value that is not JSON out.
@@ -570,6 +570,7 @@ The graph. Modules `runner`, `gate`, `inbox`, `fx`, `features`. Runner methods s
570
570
  - Motion hooks are told why they play: `enter(view, item, hint, cause)` and `exit(view, item, hint, cause)` get `World.MotionCause`, `"mount"` (the view comes or goes with its screen: a mount, an unmount, a load, a restore, a paused or fast world) or `"change"` (a commit). A world projection plays them only for `"change"`; `ui` plays them for both. `app.world.projection.causeOf(entity)` answers how a view came or how it is leaving, also in a removal hook of its despawn, until the next frame.
571
571
  - `app.world.projection.replace(spec)` swaps the spec of a registered projection; a mounted one runs its new `view` on the next frame. An unknown name throws. The caller is the dev hot swap.
572
572
  - `projection({ …, initialOnly: [[Shape, ["sweep"]]] })`: `view` gives those fields once, at the birth of a view; after that they belong to another writer (a system drawing a timer arc from `Now`), and no changed item, motion, end-of-motion check (`world:view-corrected`), rollback, `settle`, restore or load writes or compares them, as with `mute()` for every view's whole life. Field names are checked per component; a pair with no field throws at register. Absent, every field is the projection's.
573
+ - `from(player, session, sw)`: the third argument is the switch another plugin last handed the projection with `projection.feed(name, sw)`, a `SceneSwitch` `{ from, to, progress }` (the scene left, the scene entered, `progress` 0 to 1), `undefined` for a projection never fed; a `from` with two parameters reads the state alone, as before. A loader reads it: `from: (_player, _session, sw: SceneSwitch | undefined) => ({ to: sw?.to ?? "", progress: sw?.progress ?? 0 })`. World README, "Feeding a projection".
573
574
  - `app.input.lock.window(rect | null | undefined)`: the input lock `ui` sets for a guide (`Input.LockWindow` = `{ x, y, w, h }` in reference units, kept by reference and written in place); a press outside reaches no view and answers `flow.gate.state().blocked` or nothing, a drop or trace sample outside finds nothing; `null` locks everything, `undefined` lifts it. The doors `tap`, `press`, `drag`, `swipe`, `trace` are never locked.
574
575
  - `input`: one followed pointer. A finger that has not started a gesture (pressed, inside the tap slop, no long press, no trace) gives way to the next finger that goes down, wherever it rests, and its press is cancelled; a finger that started a gesture keeps it. `Pointer.id` is the followed `pointerId` (`-1` at rest): a system that measures the finger's travel starts over when it changes.
575
576
  - `Draggable({ payload, carry?, aim? })`: `aim: { x, y }`, a point of the view in its own units, moves the hover and the drop lookup from the finger to that point of the view in the hand; `null` (default) is the finger.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.56",
3
+ "version": "0.15.58",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [