@moku-labs/game 0.15.4 → 0.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/page.d.mts +1 -1
- package/dist/app/system.d.mts +3 -3
- package/dist/app.d.mts +3 -3
- package/dist/app.mjs +1 -1
- package/dist/assets.d.mts +1 -1
- package/dist/{commands-CvWBaoEi.d.mts → commands-CAEwtEAy.d.mts} +5 -5
- package/dist/control.d.mts +4 -4
- package/dist/{define-DSC-Q0yU.d.mts → define-CNctRrea.d.mts} +2 -2
- package/dist/{headless-oykCMFBV.d.mts → headless-DDkRwLnJ.d.mts} +1 -1
- package/dist/{index-Cv5r0M9Y.d.mts → index-DytzVJFz.d.mts} +15 -8
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/inspect.d.mts +6 -6
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/{runtime-BVVlgcMv.d.mts → runtime-BGsDXKuO.d.mts} +1 -1
- package/dist/{src-tkKl-oCn.mjs → src-DWJabPi4.mjs} +464 -110
- package/dist/testing.d.mts +4 -4
- package/dist/testing.mjs +1 -1
- package/dist/{types-CiTr21gu.d.mts → types-C2LZJIxH.d.mts} +25 -5
- package/dist/{types-VNoG7shY.d.mts → types-CRgEt4wq.d.mts} +4 -4
- package/dist/{types-B6YgPkY8.d.mts → types-CWSMo70I.d.mts} +13 -2
- package/dist/{types-DY_wOvUF.d.mts → types-DFoxDq-g.d.mts} +2 -2
- package/dist/{types-vjWgmPqS.d.mts → types-DnttyLeu.d.mts} +25 -6
- package/dist/{visual-B8ve4Qll.d.mts → visual-gTuXlmvH.d.mts} +6 -6
- package/dist/visual.d.mts +1 -1
- package/package.json +1 -1
package/dist/testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Jn as FeaturePlugin, Sr as Json, Xn as AnyFlow, dr as NodeFx, gr as FakeClock, mr as ClockSource, nr as NodeTable, or as Descriptor, ur as Hint } from "./types-
|
|
2
|
-
import { t as createApp } from "./index-
|
|
3
|
-
import { b as saveOf, v as WithGameState, y as memory } from "./types-
|
|
4
|
-
import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-
|
|
1
|
+
import { Jn as FeaturePlugin, Sr as Json, Xn as AnyFlow, dr as NodeFx, gr as FakeClock, mr as ClockSource, nr as NodeTable, or as Descriptor, ur as Hint } from "./types-DnttyLeu.mjs";
|
|
2
|
+
import { t as createApp } from "./index-DytzVJFz.mjs";
|
|
3
|
+
import { b as saveOf, v as WithGameState, y as memory } from "./types-CRgEt4wq.mjs";
|
|
4
|
+
import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-DDkRwLnJ.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/clock/fake.d.ts
|
package/dist/testing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { an as exit, cn as type, in as refuseStart, m as flattenFeatures, t as createApp } from "./src-
|
|
1
|
+
import { an as exit, cn as type, in as refuseStart, m as flattenFeatures, t as createApp } from "./src-DWJabPi4.mjs";
|
|
2
2
|
import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { t as fakeClock } from "./fake-6mazmHK3.mjs";
|
|
4
4
|
import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-BA6ffzqD.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as PixiSprite, An as TrackSegment, Hr as Api$1, Mn as Api$2, Nt as FilterCache, O as PixiFilter, On as ReducedMotion, Ot as FilterSlot, Qr as Require, Rr as Events$5, Sr as Json, T as Api$4, Tn as NumericFields, Zr as Events$2, Zt as Api$3, an as ComponentHandle, ar as TypeTag, in as AnyComponentValue, j as PixiTexture, jt as Point, k as PixiModule, kn as TrackOptions, kt as FilterSlotInputs, ln as Entity, nn as AnyComponent, or as Descriptor, s as Events$1, sn as ComponentType, t as Api$5, v as Events$4, wn as MotionHandle, xn as Ease, xr as Events$3, yr as Api$6 } from "./types-
|
|
2
|
-
import { I as I18nApi, J as StylesState, S as TextApi, c as UiNode, i as Finding, j as InputApi, n as ElementChange, o as JsxState, r as ElementMotion } from "./types-
|
|
1
|
+
import { A as PixiSprite, An as TrackSegment, Hr as Api$1, Mn as Api$2, Nt as FilterCache, O as PixiFilter, On as ReducedMotion, Ot as FilterSlot, Qr as Require, Rr as Events$5, Sr as Json, T as Api$4, Tn as NumericFields, Zr as Events$2, Zt as Api$3, an as ComponentHandle, ar as TypeTag, in as AnyComponentValue, j as PixiTexture, jt as Point, k as PixiModule, kn as TrackOptions, kt as FilterSlotInputs, ln as Entity, nn as AnyComponent, or as Descriptor, s as Events$1, sn as ComponentType, t as Api$5, v as Events$4, wn as MotionHandle, xn as Ease, xr as Events$3, yr as Api$6 } from "./types-DnttyLeu.mjs";
|
|
2
|
+
import { I as I18nApi, J as StylesState, S as TextApi, c as UiNode, i as Finding, j as InputApi, n as ElementChange, o as JsxState, r as ElementMotion } from "./types-CWSMo70I.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
import { PluginCtx } from "@moku-labs/core";
|
|
5
5
|
import { Node, Yoga } from "yoga-layout/load";
|
|
@@ -1408,6 +1408,13 @@ type FilterSpec<Uniforms extends Record<string, UniformDeclaration>> = {
|
|
|
1408
1408
|
* only when the value changed.
|
|
1409
1409
|
*/
|
|
1410
1410
|
readonly area?: (value: Readonly<FilterValueOf<Uniforms>>) => FilterArea | undefined;
|
|
1411
|
+
/**
|
|
1412
|
+
* The texels per CSS px the view and its filters are drawn at under this filter, from 0 to 4; `0` (the default) for
|
|
1413
|
+
* the resolution of the canvas. Pixi draws all the filters of a view at the smallest resolution among them, so a
|
|
1414
|
+
* resolution below the canvas's lowers the others on the same view too. A stage of an input ignores it: its step's
|
|
1415
|
+
* `scale` sizes it.
|
|
1416
|
+
*/
|
|
1417
|
+
readonly resolution?: number;
|
|
1411
1418
|
};
|
|
1412
1419
|
/**
|
|
1413
1420
|
* How one uniform travels to the GPU: its name, its WGSL type and the form it was declared in.
|
|
@@ -1452,7 +1459,8 @@ type FilterDefinition = {
|
|
|
1452
1459
|
* `undefined` for any other body.
|
|
1453
1460
|
*/
|
|
1454
1461
|
readonly origin: UniformSpec | undefined; /** The rectangle outside of which the filter draws nothing, from the value; present only when the spec gave one. */
|
|
1455
|
-
readonly area?: (value: Readonly<FilterFields>) => FilterArea | undefined;
|
|
1462
|
+
readonly area?: (value: Readonly<FilterFields>) => FilterArea | undefined; /** The texels per CSS px it draws at; 0 for the resolution of the canvas. */
|
|
1463
|
+
readonly resolution: number;
|
|
1456
1464
|
};
|
|
1457
1465
|
/**
|
|
1458
1466
|
* A filter a chain may draw: any component `defineFilter` made. Listed in an input's `stages` and named by its steps.
|
|
@@ -1685,15 +1693,22 @@ type DisplacementValue = {
|
|
|
1685
1693
|
order: number;
|
|
1686
1694
|
};
|
|
1687
1695
|
/**
|
|
1688
|
-
* `Alpha`: Pixi's alpha over the whole subtree, as one layer.
|
|
1696
|
+
* `Alpha`: Pixi's alpha over the whole subtree, as one layer. `resolution` is the texels per CSS px the subtree is drawn
|
|
1697
|
+
* at, at most 4, `0` for the resolution of the canvas; Pixi draws all the filters of a view at the smallest resolution
|
|
1698
|
+
* among them, so `Alpha({ resolution: 0.5 })` beside a `Glow` draws the glow at 0.5 too. At `alpha: 1` and
|
|
1699
|
+
* `resolution: 0` the filter would copy the subtree unchanged through a pass of its own: it is switched off, at once
|
|
1700
|
+
* when it is built so, otherwise after 8 frames at rest there (a keyframe that touches 1 switches nothing), and the
|
|
1701
|
+
* subtree draws as if the Alpha were not there.
|
|
1689
1702
|
*
|
|
1690
1703
|
* @example
|
|
1691
1704
|
* ```ts
|
|
1692
|
-
*
|
|
1705
|
+
* // The fog of a memory screen, opaque, drawn at half a texel per CSS px through the Alpha's one pass.
|
|
1706
|
+
* const value: AlphaValue = { alpha: 1, resolution: 0.5, enabled: true, order: 0 };
|
|
1693
1707
|
* ```
|
|
1694
1708
|
*/
|
|
1695
1709
|
type AlphaValue = {
|
|
1696
1710
|
alpha: number;
|
|
1711
|
+
resolution: number;
|
|
1697
1712
|
enabled: boolean;
|
|
1698
1713
|
order: number;
|
|
1699
1714
|
};
|
|
@@ -1789,6 +1804,11 @@ type FilterBody = {
|
|
|
1789
1804
|
readonly applied: Record<string, FilterField>; /** The keys of `applied`, listed once: a compare walks them by index, with no `Object.keys` per frame. */
|
|
1790
1805
|
readonly fields: readonly string[];
|
|
1791
1806
|
passes: number;
|
|
1807
|
+
/**
|
|
1808
|
+
* Syncs in a row its value drew the view unchanged (at 1, at the canvas's resolution) while its filter was on;
|
|
1809
|
+
* the filter is switched off at `CALM_AFTER` and the count starts over.
|
|
1810
|
+
*/
|
|
1811
|
+
calm: number;
|
|
1792
1812
|
};
|
|
1793
1813
|
/**
|
|
1794
1814
|
* A probe of the warm-up (spec 27 F4): the Pixi filter handed to `renderer.sync.filters.warm`, and its teardown.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { At as Orientation, Dr as PlayerStateProvider, E as Config$2, Jn as FeaturePlugin, Mr as SnapshotOf, Or as ProviderCall, Pn as Config$1, Sr as Json, Xn as AnyFlow, a as Config$3, ar as TypeTag, br as Config, d as Manifest, gr as FakeClock, k as PixiModule, kr as SaveDoc, mr as ClockSource, n as AssetsIo } from "./types-
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
3
|
-
import { H as TextKey, I as I18nApi, V as StringTable } from "./types-
|
|
4
|
-
import { ft as platformPlugin, i as screen, mt as PlatformProvider, t as createApp, wt as audioPlugin, xt as effectsPlugin } from "./index-
|
|
1
|
+
import { At as Orientation, Dr as PlayerStateProvider, E as Config$2, Jn as FeaturePlugin, Mr as SnapshotOf, Or as ProviderCall, Pn as Config$1, Sr as Json, Xn as AnyFlow, a as Config$3, ar as TypeTag, br as Config, d as Manifest, gr as FakeClock, k as PixiModule, kr as SaveDoc, mr as ClockSource, n as AssetsIo } from "./types-DnttyLeu.mjs";
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-C2LZJIxH.mjs";
|
|
3
|
+
import { H as TextKey, I as I18nApi, V as StringTable } from "./types-CWSMo70I.mjs";
|
|
4
|
+
import { ft as platformPlugin, i as screen, mt as PlatformProvider, t as createApp, wt as audioPlugin, xt as effectsPlugin } from "./index-DytzVJFz.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/model/store/providers/memory.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cn as MotionCause, En as ProjectionMotion, Hr as Api, Jt as TransformValue, Mn as Api$1, Mt as ViewportSize, Qr as Require, Sn as Motion, Sr as Json, T as Api$3, Tn as NumericFields, Zt as Api$2, fr as Answer, in as AnyComponentValue, jn as ViewHandle, ln as Entity, nn as AnyComponent, or as Descriptor, pr as Api$5, rn as AnyComponentType, s as Events$1, sn as ComponentType, t as Api$4, ur as Hint, vn as TagType, wn as MotionHandle, yn as ChangeHook } from "./types-
|
|
1
|
+
import { Cn as MotionCause, En as ProjectionMotion, Hr as Api, Jt as TransformValue, Mn as Api$1, Mt as ViewportSize, Qr as Require, Sn as Motion, Sr as Json, T as Api$3, Tn as NumericFields, Zt as Api$2, fr as Answer, in as AnyComponentValue, jn as ViewHandle, ln as Entity, nn as AnyComponent, or as Descriptor, pr as Api$5, rn as AnyComponentType, s as Events$1, sn as ComponentType, t as Api$4, ur as Hint, vn as TagType, wn as MotionHandle, yn as ChangeHook } from "./types-DnttyLeu.mjs";
|
|
2
2
|
import { Log } from "@moku-labs/common/browser";
|
|
3
3
|
import { PluginCtx } from "@moku-labs/core";
|
|
4
4
|
|
|
@@ -1694,12 +1694,23 @@ type State = {
|
|
|
1694
1694
|
cache: Map<string, TextLayout>; /** What every live label container was last filled from, by container. */
|
|
1695
1695
|
drawn: WeakMap<object, DrawnLabel>; /** Entities to re-resolve in the next layout phase. */
|
|
1696
1696
|
dirty: Set<Entity>;
|
|
1697
|
+
/**
|
|
1698
|
+
* The labels whose `Text` came while the world was live since the layout system last ran. The
|
|
1699
|
+
* flush of phase `layout` brings the ones `ui` adds in its solve, and they are resolved right
|
|
1700
|
+
* after it.
|
|
1701
|
+
*/
|
|
1702
|
+
added: Entity[];
|
|
1703
|
+
/**
|
|
1704
|
+
* The labels the step after the last layout flush resolved. The next system run writes their
|
|
1705
|
+
* `Text` once more, so `ui` measures the string they show.
|
|
1706
|
+
*/
|
|
1707
|
+
rewrite: Entity[];
|
|
1697
1708
|
/**
|
|
1698
1709
|
* Counts the dev hot swaps that replaced a font or an inline icon of a live label. A label
|
|
1699
1710
|
* container drawn under an older count is built again on its next update.
|
|
1700
1711
|
*/
|
|
1701
1712
|
generation: number; /** Warning keys already written, so a style, a tag, a glyph or a font warns once. */
|
|
1702
|
-
warned: Set<string>; /** The system, the two world hooks and the display adapter. */
|
|
1713
|
+
warned: Set<string>; /** The system, the step after the layout flush, the two world hooks and the display adapter. */
|
|
1703
1714
|
removers: Array<() => void>;
|
|
1704
1715
|
};
|
|
1705
1716
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Sr as Json, jr as Snapshot } from "./types-
|
|
2
|
-
import { t as HeadlessApp } from "./headless-
|
|
1
|
+
import { Sr as Json, jr as Snapshot } from "./types-DnttyLeu.mjs";
|
|
2
|
+
import { t as HeadlessApp } from "./headless-DDkRwLnJ.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/flow/doors/types.d.ts
|
|
@@ -4299,8 +4299,8 @@ type View$1 = {
|
|
|
4299
4299
|
cause: MotionCause;
|
|
4300
4300
|
};
|
|
4301
4301
|
/**
|
|
4302
|
-
* One mounted projection: its owner, the live views by key, the despawn queue
|
|
4303
|
-
* the
|
|
4302
|
+
* One mounted projection: its owner, the live views by key, the despawn queue, the items of the
|
|
4303
|
+
* last reconcile, its place in the list of its scene and the layer list of that scene.
|
|
4304
4304
|
*
|
|
4305
4305
|
* @example
|
|
4306
4306
|
* ```ts
|
|
@@ -4309,7 +4309,8 @@ type View$1 = {
|
|
|
4309
4309
|
* live: new Map(),
|
|
4310
4310
|
* queue: [],
|
|
4311
4311
|
* items: new Map(),
|
|
4312
|
-
* order: -1
|
|
4312
|
+
* order: -1,
|
|
4313
|
+
* layers: Object.freeze([{ name: "items", sort: "y" }])
|
|
4313
4314
|
* };
|
|
4314
4315
|
* ```
|
|
4315
4316
|
*/
|
|
@@ -4323,6 +4324,11 @@ type Mounted = {
|
|
|
4323
4324
|
* minus the length of that list (the roots of one scene take −n … −1, in list order).
|
|
4324
4325
|
*/
|
|
4325
4326
|
order: number;
|
|
4327
|
+
/**
|
|
4328
|
+
* The layer list (`setLayers`) of the scene the projection was mounted into or kept by last, compared by
|
|
4329
|
+
* identity: a `mount` under the same list is a second mount of one scene, a `mount` under a new one keeps it.
|
|
4330
|
+
*/
|
|
4331
|
+
layers: ReadonlyArray<LayerSpec>;
|
|
4326
4332
|
};
|
|
4327
4333
|
/**
|
|
4328
4334
|
* One track the projection started on the driver. The world keeps the component name and the
|
|
@@ -4496,17 +4502,30 @@ type ProjectionApi = {
|
|
|
4496
4502
|
layers(): ReadonlyArray<LayerSpec>;
|
|
4497
4503
|
/**
|
|
4498
4504
|
* Marks projections mounted under an owner and reconciles them at once, direct: a scene brings
|
|
4499
|
-
* its own transition.
|
|
4505
|
+
* its own transition. A screen root draws at the `Order` of its place in the list, −n … −1. A
|
|
4506
|
+
* projection a scene before mounted (under another layer list, `setLayers`) stays mounted when
|
|
4507
|
+
* the new list declares its `layer` and `lift` alike: its views keep their entities and their
|
|
4508
|
+
* motions, no hook runs, and its screen roots take the `Order` of their place in this list. One
|
|
4509
|
+
* whose layer the new list declares otherwise is unmounted and mounted again. One mounted under
|
|
4510
|
+
* the current layer list already is a second mount of one scene: it warns
|
|
4511
|
+
* `world:already-mounted` and changes nothing. Nothing is mounted when the call throws.
|
|
4500
4512
|
*
|
|
4501
4513
|
* @param names - Names of the projections to mount.
|
|
4502
4514
|
* @param owner - Who owns the entities of these projections.
|
|
4503
4515
|
* @throws {Error} For an unknown name, or a `layer` or `lift` the scene does not declare.
|
|
4504
4516
|
* @example
|
|
4505
4517
|
* ```ts
|
|
4506
|
-
* // `scenes` mounts the
|
|
4518
|
+
* // `scenes` mounts the board scene it just switched to: its HUD screen is listed last, at -1.
|
|
4507
4519
|
* const world = ctx.require(worldPlugin);
|
|
4508
|
-
* world.projection.mount(["board.
|
|
4520
|
+
* world.projection.mount(["board.items", "hud"], { kind: "plugin", name: "scenes" });
|
|
4509
4521
|
* world.projection.entityOf("board.items", "i7"); // 1048576, the picture is already there
|
|
4522
|
+
*
|
|
4523
|
+
* // The shop lists the HUD too and declares `ui` alike: the shop's layers, the board's items
|
|
4524
|
+
* // out, the shop's list in.
|
|
4525
|
+
* world.projection.setLayers([{ name: "ui", sort: "order" }]);
|
|
4526
|
+
* world.projection.unmount(["board.items"]);
|
|
4527
|
+
* world.projection.mount(["hud", "shop.shelf"], { kind: "plugin", name: "scenes" });
|
|
4528
|
+
* world.ecs.get(world.projection.entityOf("hud", "hud") ?? 0, Order)?.value; // -2: the same entity, first of two
|
|
4510
4529
|
* ```
|
|
4511
4530
|
*/
|
|
4512
4531
|
mount(names: readonly string[], owner: Owner): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ir as Api$3, T as Api, Zt as Api$1, yr as Api$2 } from "./types-
|
|
2
|
-
import { P as AnimApi, r as UiApi } from "./types-
|
|
3
|
-
import { j as InputApi } from "./types-
|
|
4
|
-
import { r as Repro } from "./headless-
|
|
5
|
-
import { a as InputOf, r as ControlApp } from "./types-
|
|
6
|
-
import { t as commands } from "./commands-
|
|
1
|
+
import { Ir as Api$3, T as Api, Zt as Api$1, yr as Api$2 } from "./types-DnttyLeu.mjs";
|
|
2
|
+
import { P as AnimApi, r as UiApi } from "./types-C2LZJIxH.mjs";
|
|
3
|
+
import { j as InputApi } from "./types-CWSMo70I.mjs";
|
|
4
|
+
import { r as Repro } from "./headless-DDkRwLnJ.mjs";
|
|
5
|
+
import { a as InputOf, r as ControlApp } from "./types-DFoxDq-g.mjs";
|
|
6
|
+
import { t as commands } from "./commands-CAEwtEAy.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-
|
|
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-gTuXlmvH.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 };
|