@moku-labs/game 0.15.76 → 0.15.78
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-B4_087j0.d.mts → commands-BICMk0d0.d.mts} +5 -5
- package/dist/control.d.mts +4 -4
- package/dist/{define-CVVpFTAJ.d.mts → define-BrGCWhuG.d.mts} +2 -2
- package/dist/{headless-Cgu6ie7C.d.mts → headless-CFlHYKpY.d.mts} +1 -1
- package/dist/{index-PrAYdg9-.d.mts → index-CDOJKnNB.d.mts} +3 -3
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- 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-CJI4Fdu7.d.mts → runtime-lHRyrkCb.d.mts} +1 -1
- package/dist/{src-CHyBg6X6.mjs → src-C3rvV0rG.mjs} +673 -144
- package/dist/testing.d.mts +4 -4
- package/dist/testing.mjs +1 -1
- package/dist/{types-B0HZvmZZ.d.mts → types-B9dzviB6.d.mts} +2 -2
- package/dist/{types-UP4-RD_A.d.mts → types-CD25TfIM.d.mts} +4 -4
- package/dist/{types-Bkdjj5Fy.d.mts → types-DvAtKyJ3.d.mts} +1 -1
- package/dist/{types-ZI525f5N.d.mts → types-G9hpd34F.d.mts} +2 -2
- package/dist/{types-BEDkqJKu.d.mts → types-JrYEbbeJ.d.mts} +213 -25
- package/dist/{visual-CJUeSL0M.d.mts → visual-Dfue6iA6.d.mts} +6 -6
- package/dist/visual.d.mts +1 -1
- package/llms.txt +2 -1
- package/package.json +1 -1
package/dist/testing.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
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 { Bn as Hint, Dr as ClockSource, En as AnyFlow, Fr as Json, In as Descriptor, Mn as NodeTable, Vn as NodeFx, kr as FakeClock, wn as FeaturePlugin } from "./types-JrYEbbeJ.mjs";
|
|
2
|
+
import { t as createApp } from "./index-CDOJKnNB.mjs";
|
|
3
|
+
import { b as saveOf, v as WithGameState, y as memory } from "./types-CD25TfIM.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-CFlHYKpY.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 {
|
|
1
|
+
import { m as flattenFeatures, on as type, rn as exit, t as createApp, tn as refuseStart } from "./src-C3rvV0rG.mjs";
|
|
2
2
|
import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
|
|
4
4
|
import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-CCiUwvlp.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as HeadlessApp } from "./headless-
|
|
1
|
+
import { Fr as Json, Wr as Snapshot } from "./types-JrYEbbeJ.mjs";
|
|
2
|
+
import { t as HeadlessApp } from "./headless-CFlHYKpY.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/flow/doors/types.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
3
|
-
import { R as I18nApi, U as StringTable, W as TextKey } from "./types-
|
|
4
|
-
import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-
|
|
1
|
+
import { Br as PlayerStateProvider, Dr as ClockSource, En as AnyFlow, Fn as TypeTag, Fr as Json, Gr as SnapshotOf, Hr as SaveDoc, Nr as Config, Vr as ProviderCall, Z as Config$2, a as Config$3, d as Manifest, et as PixiModule, kr as FakeClock, ln as Config$1, n as AssetsIo, ut as Orientation, wn as FeaturePlugin } from "./types-JrYEbbeJ.mjs";
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-G9hpd34F.mjs";
|
|
3
|
+
import { R as I18nApi, U as StringTable, W as TextKey } from "./types-DvAtKyJ3.mjs";
|
|
4
|
+
import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-CDOJKnNB.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 { $n as
|
|
1
|
+
import { $n as ReducedMotion, Bn as Hint, Er as Api$5, Fr as Json, Hn as Answer, In as Descriptor, Jn as MotionCause, Kn as Ease, Un as AnchorTarget, Wn as ChangeHook, X as Api$3, Xn as NumericFields, Yn as MotionHandle, Zn as ProjectionMotion, ar as AnyComponentType, br as TagType, di as Require, dr as Entity, ft as ViewportSize, ir as AnyComponent, lr as ComponentType, or as AnyComponentValue, q as TransformValue, qn as Motion, rr as ViewHandle, s as Events$1, sn as Api$1, t as Api$4, ti as Api, xr as Api$2 } from "./types-JrYEbbeJ.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,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-
|
|
1
|
+
import { $ as PixiFilter, $n as ReducedMotion, A as SyncApi, Fn as TypeTag, Fr as Json, In as Descriptor, Kn as Ease, Mr as Api$6, O as FilterSlot, Pr as Events$3, Un as AnchorTarget, X as Api$4, Xn as NumericFields, Yn as MotionHandle, Zr as Events$5, b as Events$4, di as Require, dr as Entity, dt as Point, et as PixiModule, ir as AnyComponent, k as FilterSlotInputs, lr as ComponentType, nr as TrackSegment, nt as PixiTexture, or as AnyComponentValue, pt as FilterCache, s as Events$1, sn as Api$2, sr as ComponentHandle, t as Api$5, ti as Api$1, tr as TrackOptions, tt as PixiSprite, ui as Events$2, xr as Api$3 } from "./types-JrYEbbeJ.mjs";
|
|
2
|
+
import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-DvAtKyJ3.mjs";
|
|
3
3
|
import { Log } from "@moku-labs/common/browser";
|
|
4
4
|
import { PluginCtx } from "@moku-labs/core";
|
|
5
5
|
|
|
@@ -7233,9 +7233,10 @@ type Position = {
|
|
|
7233
7233
|
//#endregion
|
|
7234
7234
|
//#region src/plugins/renderer/reasons.d.ts
|
|
7235
7235
|
/**
|
|
7236
|
-
* @file renderer plugin — the reasons a frame is drawn, in ring order: the monitor stores a
|
|
7237
|
-
* plain module of the plugin root, so the monitor reads the order without importing the demand
|
|
7238
|
-
* (L1)
|
|
7236
|
+
* @file renderer plugin — the reasons a frame is drawn and a canvas pass begins, in ring order: the monitor stores a
|
|
7237
|
+
* reason by its index. A plain module of the plugin root, so the monitor reads the order without importing the demand
|
|
7238
|
+
* module's run-time code (L1), and `host/render-pass.ts` names a begin without importing the monitor; `DemandReason`
|
|
7239
|
+
* in `demand/types.ts` is derived from it.
|
|
7239
7240
|
*/
|
|
7240
7241
|
/**
|
|
7241
7242
|
* Every reason in ring order: the monitor stores the index (spec 11 `FrameColumns.reason`), 255 for a frame without a
|
|
@@ -7251,6 +7252,30 @@ type Position = {
|
|
|
7251
7252
|
* ```
|
|
7252
7253
|
*/
|
|
7253
7254
|
declare const DEMAND_REASONS: readonly ["always", "first", "resize", "restore", "layers", "debug", "wake", "capture", "request", "mark", "verify", "none", "overlay", "retake"];
|
|
7255
|
+
/**
|
|
7256
|
+
* Why a canvas pass began: `"none"` on a pass that is no canvas pass (and on WebGL, where the reason is not known),
|
|
7257
|
+
* `"first"` the first begin of a render call, `"filter"` a begin after a pass into another target, `"mask"` a restart
|
|
7258
|
+
* for a stencil push, `"depth"` a restart for the first depth use, `"empty"` an owed clear or a settle with no draw.
|
|
7259
|
+
*
|
|
7260
|
+
* @example
|
|
7261
|
+
* ```ts
|
|
7262
|
+
* // A frame of a debug build drew on the canvas, went through one filter and came back to the canvas.
|
|
7263
|
+
* const reason: CanvasRestart = "filter";
|
|
7264
|
+
* ```
|
|
7265
|
+
*/
|
|
7266
|
+
type CanvasRestart = "none" | "first" | "filter" | "mask" | "depth" | "empty";
|
|
7267
|
+
/**
|
|
7268
|
+
* The reasons a canvas pass began, by their index in the pass ring's `restart` column: new ones are only ever appended.
|
|
7269
|
+
* A root export, so a reader of the ring names a reason without building a record.
|
|
7270
|
+
*
|
|
7271
|
+
* @example
|
|
7272
|
+
* ```ts
|
|
7273
|
+
* // The editor's pass strip says why the newest pass of a debug build began.
|
|
7274
|
+
* const { passes } = app.renderer.monitor.frames();
|
|
7275
|
+
* CANVAS_RESTARTS[passes.restart[passes.newest] ?? 0]; // "filter"
|
|
7276
|
+
* ```
|
|
7277
|
+
*/
|
|
7278
|
+
declare const CANVAS_RESTARTS: readonly CanvasRestart[];
|
|
7254
7279
|
//#endregion
|
|
7255
7280
|
//#region src/plugins/renderer/demand/marks.d.ts
|
|
7256
7281
|
/**
|
|
@@ -7510,7 +7535,8 @@ type FrameRing = {
|
|
|
7510
7535
|
kind2: Uint8Array; /** The draw count of the frame when the pass began: a pass drew up to the next one's (WebGPU; 0 on WebGL). */
|
|
7511
7536
|
drawsAt: Uint16Array; /** The target's texture format (`"rgba8unorm"`), by reference; `null` when unknown. */
|
|
7512
7537
|
format: (string | null)[]; /** The target's resolution; NaN when unknown. */
|
|
7513
|
-
resolution: Float32Array;
|
|
7538
|
+
resolution: Float32Array; /** Why a canvas pass began, an index into `CANVAS_RESTARTS` (WebGPU); 0, `"none"`, for any other pass. */
|
|
7539
|
+
restart: Uint8Array;
|
|
7514
7540
|
}; /** Path id → flow path. */
|
|
7515
7541
|
readonly paths: readonly string[];
|
|
7516
7542
|
/**
|
|
@@ -7971,7 +7997,8 @@ type PassRecord = {
|
|
|
7971
7997
|
draws?: number | null; /** The target's texture format; `null` when unknown. */
|
|
7972
7998
|
format?: string | null; /** The target's resolution; `null` when unknown. */
|
|
7973
7999
|
resolution?: number | null; /** The pass took or refreshed a kept picture (its label starts with `kept:`). */
|
|
7974
|
-
kept?: boolean;
|
|
8000
|
+
kept?: boolean; /** Why a canvas pass began (WebGPU); absent for any other pass and on WebGL. */
|
|
8001
|
+
restart?: CanvasRestart;
|
|
7975
8002
|
};
|
|
7976
8003
|
/**
|
|
7977
8004
|
* A frame over the budget, with its detail.
|
|
@@ -8276,6 +8303,8 @@ type ResolutionListener = (from: number, to: number, reason: ResolutionReason) =
|
|
|
8276
8303
|
* Why the pool is trimmed: a still screen, a scene change `restMs` ago, a pause. Not public.
|
|
8277
8304
|
*/
|
|
8278
8305
|
type TrimReason = PoolTrimDetail["reason"];
|
|
8306
|
+
/** Hears a canvas pass that really began (WebGPU), with its reason: an index into `CANVAS_RESTARTS`. Not public. */
|
|
8307
|
+
type CanvasPassListener = (restart: number) => void;
|
|
8279
8308
|
/**
|
|
8280
8309
|
* A listener of a pool trim: why, and the MiB it freed (rounded to two decimals). The monitor of an agent build
|
|
8281
8310
|
* registers one to write the `pool-trim` event line.
|
|
@@ -8352,7 +8381,8 @@ type HostState = {
|
|
|
8352
8381
|
kept: WeakSet<object>; /** A pixel read of the oracle failed and was logged: the next failures stay quiet. */
|
|
8353
8382
|
pixelsFailed: boolean; /** The pool trim of C14. */
|
|
8354
8383
|
pool: PoolState; /** The trim listeners: the monitor's, in an agent build. Emptied by `stopHost`. */
|
|
8355
|
-
onTrim: TrimListener[];
|
|
8384
|
+
onTrim: TrimListener[]; /** The listener of the canvas passes that really begin: the monitor's, set at every attach; cleared by `stopHost`. */
|
|
8385
|
+
onCanvasPass: CanvasPassListener | undefined;
|
|
8356
8386
|
};
|
|
8357
8387
|
/**
|
|
8358
8388
|
* host module API, `app.renderer.host`. Everything a caller needs to know about the one Pixi
|
|
@@ -8686,6 +8716,13 @@ type HostInternal = {
|
|
|
8686
8716
|
* @param fn - Called after every trim with the reason and the MiB freed.
|
|
8687
8717
|
*/
|
|
8688
8718
|
onTrim(fn: TrimListener): void;
|
|
8719
|
+
/**
|
|
8720
|
+
* Sets the one listener of the canvas passes that really begin on WebGPU: `host/render-pass.ts` never imports the
|
|
8721
|
+
* monitor (O24), which counts them here. Cleared by `stopHost`.
|
|
8722
|
+
*
|
|
8723
|
+
* @param fn - Called at every begin with the reason, an index into `CANVAS_RESTARTS`.
|
|
8724
|
+
*/
|
|
8725
|
+
onCanvasPass(fn: CanvasPassListener): void;
|
|
8689
8726
|
};
|
|
8690
8727
|
//#endregion
|
|
8691
8728
|
//#region src/plugins/renderer/kept/types.d.ts
|
|
@@ -8704,14 +8741,63 @@ type FilterCache = "local" | "placed" | "screen";
|
|
|
8704
8741
|
*
|
|
8705
8742
|
* @example
|
|
8706
8743
|
* ```ts
|
|
8707
|
-
* const kept: KeptStats = { pictures: 2, mb: 9.6, retakes: 0 }; // the memory screen at rest
|
|
8744
|
+
* const kept: KeptStats = { pictures: 2, mb: 9.6, retakes: 0, evicted: 0, refused: 0 }; // the memory screen at rest
|
|
8708
8745
|
* ```
|
|
8709
8746
|
*/
|
|
8710
8747
|
type KeptStats = {
|
|
8711
|
-
pictures: number;
|
|
8712
|
-
mb: number;
|
|
8748
|
+
/** Views drawn as one texture in the last drawn frame. */pictures: number; /** The MiB the kept textures hold. */
|
|
8749
|
+
mb: number; /** Pictures taken in the last full second. */
|
|
8713
8750
|
retakes: number;
|
|
8751
|
+
/**
|
|
8752
|
+
* Pictures the budget evicted in the last full second, to make room for a take. 0 while inert or with `keptMb: 0`.
|
|
8753
|
+
*
|
|
8754
|
+
* @example
|
|
8755
|
+
* ```ts
|
|
8756
|
+
* // A scene of 80 MiB of pictures under the default budget of 64: the oldest go, drawn live until they are taken.
|
|
8757
|
+
* app.renderer.stats().kept.evicted; // 3
|
|
8758
|
+
* ```
|
|
8759
|
+
*/
|
|
8760
|
+
evicted: number;
|
|
8761
|
+
/**
|
|
8762
|
+
* Takes the budget refused in the last full second: a refusal that holds for many frames counts once. 0 while inert
|
|
8763
|
+
* or with `keptMb: 0`.
|
|
8764
|
+
*
|
|
8765
|
+
* @example
|
|
8766
|
+
* ```ts
|
|
8767
|
+
* // A full-screen picture that does not fit a budget of 8 MiB: the view stays live, and `why()` says `"budget"`.
|
|
8768
|
+
* app.renderer.stats().kept.refused; // 1
|
|
8769
|
+
* ```
|
|
8770
|
+
*/
|
|
8771
|
+
refused: number;
|
|
8714
8772
|
};
|
|
8773
|
+
/**
|
|
8774
|
+
* Why a filtered view is drawn live, as `sync.debug.why()` names it. Its checks in the order they are made: the switch
|
|
8775
|
+
* (`"off"`), the view's filters (`"backdrop"`, `"filter-blend"`, `"cache-false"`), its top (`"faded-out"`, `"top-blend"`,
|
|
8776
|
+
* `"hidden"`), its ancestors (`"ancestor-tint"`, `"ancestor-blend"`, `"ancestor-hidden"`, `"placed-under-filter"`),
|
|
8777
|
+
* then what the cache decided: `"blend-below"` (a node under the top blends otherwise), `"display"` (a `Display` without
|
|
8778
|
+
* `onDemand`), `"waiting"` (still frames, or the frame's first takes went to others), `"alpha-due"` (a stack of alphas
|
|
8779
|
+
* goes first), `"churn"` (it changed too often, calming down), `"budget"` (a take refused) and `"idle"` (a take had
|
|
8780
|
+
* nothing to render).
|
|
8781
|
+
*
|
|
8782
|
+
* @example
|
|
8783
|
+
* ```ts
|
|
8784
|
+
* app.renderer.sync.debug.why()[0]?.reason; // "churn"
|
|
8785
|
+
* ```
|
|
8786
|
+
*/
|
|
8787
|
+
type WhyLive = "off" | "backdrop" | "filter-blend" | "cache-false" | "hidden" | "faded-out" | "top-blend" | "ancestor-tint" | "ancestor-blend" | "ancestor-hidden" | "placed-under-filter" | "blend-below" | "display" | "waiting" | "alpha-due" | "churn" | "budget" | "idle";
|
|
8788
|
+
/**
|
|
8789
|
+
* What a kept picture's last take was for, as `sync.debug.why()` names it: `"first"` (taken from live), `"mark"` (its
|
|
8790
|
+
* subtree changed), `"inner-first"` (a view inside it took its first picture, F114), `"resolution"`, `"settle"` (it came
|
|
8791
|
+
* to rest off its picture's grid), `"scale-limit"` (a zoom past what a picture is drawn scaled), `"canvas"` (a picture
|
|
8792
|
+
* cut to the canvas moved or the canvas changed), `"filter"` (the filter output alone), `"chain"` (the filter's pre-pass
|
|
8793
|
+
* and output) and `"placed-move"` (a view drawn scaled that may not be: placed, or cut to the canvas).
|
|
8794
|
+
*
|
|
8795
|
+
* @example
|
|
8796
|
+
* ```ts
|
|
8797
|
+
* app.renderer.sync.debug.why()[0]?.retake; // { why: "mark", by: "Text#1048612 tags:timer" }
|
|
8798
|
+
* ```
|
|
8799
|
+
*/
|
|
8800
|
+
type RetakeWhy = "first" | "mark" | "inner-first" | "resolution" | "settle" | "scale-limit" | "canvas" | "filter" | "chain" | "placed-move";
|
|
8715
8801
|
/**
|
|
8716
8802
|
* One picture of an overlay's range, as spec 22 hands it over.
|
|
8717
8803
|
*/
|
|
@@ -8743,7 +8829,8 @@ type KeptInternal = {
|
|
|
8743
8829
|
release(id: Entity): void; /** Spec 22: whether a range has a picture. */
|
|
8744
8830
|
kept(id: Entity): boolean; /** Spec 22: the sprite that shows a range's picture. */
|
|
8745
8831
|
sprite(id: Entity): PixiContainer | undefined; /** The numbers `stats().kept` reports. */
|
|
8746
|
-
stats(): KeptStats; /**
|
|
8832
|
+
stats(): KeptStats; /** Why every filtered view is drawn as it is: `sync.debug.why()`. Agent builds only, a frozen `[]` elsewhere. */
|
|
8833
|
+
why(): readonly WhyEntry[]; /** The takes since the last call, the evictions and refusals with them; the monitor's window close. */
|
|
8747
8834
|
drainTakes(): number; /** The stage-3-only redos since the last call. */
|
|
8748
8835
|
drainRefreshes(): number; /** Dev and agent builds only: every record and range drawn live for one extract, and back. */
|
|
8749
8836
|
bypass(on: boolean): void;
|
|
@@ -8804,7 +8891,11 @@ type KeptRecord = {
|
|
|
8804
8891
|
* The quad draws the subtree picture itself at the stack's alpha, with no stage 3 (F54): every enabled filter is an
|
|
8805
8892
|
* `AlphaFilter` at the canvas resolution.
|
|
8806
8893
|
*/
|
|
8807
|
-
direct: boolean;
|
|
8894
|
+
direct: boolean;
|
|
8895
|
+
/**
|
|
8896
|
+
* A take attempt found a view of kind `"Display"` under the top that it may not keep (no `onDemand`); `undefined` until
|
|
8897
|
+
* an attempt walked the subtree, and again after a change under the top. Read by the report alone.
|
|
8898
|
+
*/
|
|
8808
8899
|
displays: boolean | undefined;
|
|
8809
8900
|
/**
|
|
8810
8901
|
* A walk found a node under the top that blends otherwise than normally (F68): the record is not taken, and the walk
|
|
@@ -8817,9 +8908,20 @@ type KeptRecord = {
|
|
|
8817
8908
|
* A take attempt rendered nothing (off the canvas, empty bounds, too big, a `Display` without `onDemand`): no take is
|
|
8818
8909
|
* offered or attempted until a change under the top or a move of it clears it (F114).
|
|
8819
8910
|
*/
|
|
8820
|
-
idle: boolean;
|
|
8911
|
+
idle: boolean;
|
|
8912
|
+
/**
|
|
8913
|
+
* A take rendered nothing since the last change under the top or the last take: `idle`, which a move clears to offer
|
|
8914
|
+
* the take again, as the report keeps saying it. Read by the report alone.
|
|
8915
|
+
*/
|
|
8916
|
+
idleSeen: boolean; /** A stack drawn direct that may be taken in this flush: no other first take happens before it (F114). */
|
|
8821
8917
|
alphaDue: boolean; /** It was due and did not end the flush kept: not due again until a change under the top (F114). */
|
|
8822
|
-
alphaMissed: boolean;
|
|
8918
|
+
alphaMissed: boolean; /** Why it is drawn live: `WHY_LIVE[why - 1]`; 0 while kept, and for a record evicted until its next step. */
|
|
8919
|
+
why: number; /** Still frames left before a take; 0 when it waits for none. */
|
|
8920
|
+
calmIn: number; /** The entity whose mark set `dirtyS1` in this frame, or the inner record's whose drawing changed; 0 for none. */
|
|
8921
|
+
markBy: Entity; /** What the last take was for: `RETAKE_WHY[retakeWhy - 1]`; 0 before its first. */
|
|
8922
|
+
retakeWhy: number; /** The entity whose mark caused the last take; 0 for none. */
|
|
8923
|
+
retakeBy: Entity; /** The `KeptState.frame` of the last take. */
|
|
8924
|
+
retakeAt: number;
|
|
8823
8925
|
};
|
|
8824
8926
|
/** One picture of an overlay's range (P7), keyed by the owner overlay's entity. */
|
|
8825
8927
|
type RangeRecord = {
|
|
@@ -8863,7 +8965,14 @@ type KeptState = {
|
|
|
8863
8965
|
takesOpen: number; /** The takes of the last closed window: `stats().kept.retakes`. */
|
|
8864
8966
|
takesWindow: number; /** Stage-3-only redos since the last window close (agent log only). */
|
|
8865
8967
|
refreshesOpen: number; /** Stage-1 and range takes of the frame running now: the ring's `retakes` column. */
|
|
8866
|
-
frameTakes: number; /**
|
|
8968
|
+
frameTakes: number; /** Records the budget evicted since the monitor's last window close. */
|
|
8969
|
+
frameEvicted: number; /** Record takes the budget refused since the monitor's last window close. */
|
|
8970
|
+
frameRefused: number; /** The evictions of the last closed window: `stats().kept.evicted`. */
|
|
8971
|
+
evictedWindow: number; /** The refusals of the last closed window: `stats().kept.refused`. */
|
|
8972
|
+
refusedWindow: number; /** The first `frame` of the last closed window. */
|
|
8973
|
+
windowStart: number; /** The last `frame` of the last closed window; below `windowStart` before the first close. */
|
|
8974
|
+
windowEnd: number; /** The first `frame` of the open window. */
|
|
8975
|
+
windowNext: number; /** Quads drawn in the last drawn frame (stats().kept.pictures). */
|
|
8867
8976
|
drawnPictures: number; /** Debug switch `debug.kept` (P14); config `keptMb: 0` forces it off. */
|
|
8868
8977
|
on: boolean; /** `keptMb > 0`: the switch can be turned on. */
|
|
8869
8978
|
allowed: boolean; /** One warning per run for a budget refusal. */
|
|
@@ -9084,7 +9193,8 @@ type ViewportInternal = {
|
|
|
9084
9193
|
* const stats: RenderStats = {
|
|
9085
9194
|
* fps: 60, drawn: 60, frameMs: 3.4, textures: 12, textureMb: 41.25,
|
|
9086
9195
|
* textureMbSplit: { art: 30.1, targets: 9.75, kept: 1.4 }, views: 180, pooled: 24,
|
|
9087
|
-
* renderPasses: 1, renderPassesMax: 3,
|
|
9196
|
+
* renderPasses: 1, renderPassesMax: 3, canvasPasses: 1, canvasPassesMax: 2,
|
|
9197
|
+
* kept: { pictures: 1, mb: 1.4, retakes: 0, evicted: 0, refused: 0 }, drawCalls: 14
|
|
9088
9198
|
* };
|
|
9089
9199
|
* // The same board at rest with `onDemand`: the loop runs, nothing is drawn.
|
|
9090
9200
|
* const still: RenderStats = { ...stats, drawn: 0 };
|
|
@@ -9131,8 +9241,33 @@ type RenderStats = {
|
|
|
9131
9241
|
renderPasses: number; /** The most render passes of one drawn frame in the last full second: the frame that took a picture shows here. */
|
|
9132
9242
|
renderPassesMax: number;
|
|
9133
9243
|
/**
|
|
9134
|
-
*
|
|
9135
|
-
*
|
|
9244
|
+
* Canvas render passes begun in the last drawn frame: every build, counted where the lazy canvas pass really begins
|
|
9245
|
+
* one (WebGPU) or the canvas is bound (WebGL). Each pass after the first is a break of the canvas, the cost on a tiled
|
|
9246
|
+
* GPU: breaks = `canvasPasses - 1`. Where nothing counts (headless, a test stage, a canvas with multisampling) it is
|
|
9247
|
+
* estimated from the filter slots: 1 + the views drawn live with an enabled filter. 0 while inert.
|
|
9248
|
+
*
|
|
9249
|
+
* @example
|
|
9250
|
+
* ```ts
|
|
9251
|
+
* // A board with two buttons whose glows are drawn live: the first pass, and one back from each filter.
|
|
9252
|
+
* app.renderer.stats().canvasPasses; // 3
|
|
9253
|
+
* ```
|
|
9254
|
+
*/
|
|
9255
|
+
canvasPasses: number;
|
|
9256
|
+
/**
|
|
9257
|
+
* The most canvas render passes of one drawn frame in the last full second.
|
|
9258
|
+
*
|
|
9259
|
+
* @example
|
|
9260
|
+
* ```ts
|
|
9261
|
+
* // The same two buttons a second after they were kept as pictures: no break now, two in the second before.
|
|
9262
|
+
* app.renderer.stats().canvasPasses; // 1
|
|
9263
|
+
* app.renderer.stats().canvasPassesMax; // 3
|
|
9264
|
+
* ```
|
|
9265
|
+
*/
|
|
9266
|
+
canvasPassesMax: number;
|
|
9267
|
+
/**
|
|
9268
|
+
* Kept pictures: views drawn as one texture in the last drawn frame, the MiB their textures hold, the pictures taken,
|
|
9269
|
+
* the pictures the budget evicted and the takes it refused in the last full second.
|
|
9270
|
+
* `{ pictures: 0, mb: 0, retakes: 0, evicted: 0, refused: 0 }` while inert or with `keptMb: 0`.
|
|
9136
9271
|
*/
|
|
9137
9272
|
kept: KeptStats;
|
|
9138
9273
|
/**
|
|
@@ -9294,6 +9429,7 @@ type RingPasses = {
|
|
|
9294
9429
|
drawsAt: Uint16Array;
|
|
9295
9430
|
format: (string | null)[];
|
|
9296
9431
|
resolution: Float32Array;
|
|
9432
|
+
restart: Uint8Array;
|
|
9297
9433
|
};
|
|
9298
9434
|
/**
|
|
9299
9435
|
* The last 64 changes of a frame that had a subject: a scene switched to, a bundle loaded. Not
|
|
@@ -9513,6 +9649,11 @@ type MonitorState = {
|
|
|
9513
9649
|
last: number;
|
|
9514
9650
|
open: number;
|
|
9515
9651
|
max: number;
|
|
9652
|
+
}; /** The canvas passes (F126), kept as `passes`: of the last drawn frame, the open window and the last closed one. */
|
|
9653
|
+
canvas: {
|
|
9654
|
+
last: number;
|
|
9655
|
+
open: number;
|
|
9656
|
+
max: number;
|
|
9516
9657
|
}; /** Removers of the count-only WebGL pass items of a build without the agent flag (F8). */
|
|
9517
9658
|
passDetach: Array<() => void>;
|
|
9518
9659
|
};
|
|
@@ -9523,7 +9664,7 @@ type MonitorState = {
|
|
|
9523
9664
|
* @example
|
|
9524
9665
|
* ```ts
|
|
9525
9666
|
* // A headless test: nothing is drawn, so every counter is 0 and there is no picture.
|
|
9526
|
-
* app.renderer.stats(); // { fps: 0, drawn: 0, frameMs: 0, textures: 0, textureMb: 0, textureMbSplit: { art: 0, targets: 0, kept: 0 }, views: 0, pooled: 0, renderPasses: 0, renderPassesMax: 0, kept: { pictures: 0, mb: 0, retakes: 0 } }
|
|
9667
|
+
* app.renderer.stats(); // { fps: 0, drawn: 0, frameMs: 0, textures: 0, textureMb: 0, textureMbSplit: { art: 0, targets: 0, kept: 0 }, views: 0, pooled: 0, renderPasses: 0, renderPassesMax: 0, canvasPasses: 0, canvasPassesMax: 0, kept: { pictures: 0, mb: 0, retakes: 0, evicted: 0, refused: 0 } }
|
|
9527
9668
|
* await app.renderer.capture(); // undefined
|
|
9528
9669
|
* ```
|
|
9529
9670
|
*/
|
|
@@ -9531,22 +9672,22 @@ type MonitorApi = {
|
|
|
9531
9672
|
/**
|
|
9532
9673
|
* The counters of the renderer, as a fresh object. The frame timing, the draw calls and the
|
|
9533
9674
|
* render passes are kept each frame without an allocation; the rest is read at call time from
|
|
9534
|
-
* `sync`, the kept pictures and Pixi. `renderPasses`
|
|
9675
|
+
* `sync`, the kept pictures and Pixi. `renderPasses` and `canvasPasses` are measured on the GPU path in every build
|
|
9535
9676
|
* (the estimate of the filter slots where nothing counts). `drawCalls`, `redraws` and `rebuilds` are there in a dev
|
|
9536
9677
|
* build only.
|
|
9537
9678
|
*
|
|
9538
9679
|
* @returns Frames per second, frame work, GPU textures and their memory, views, pooled objects,
|
|
9539
|
-
* render passes and their most in the last second, the kept pictures, and in a dev build the
|
|
9680
|
+
* render passes and canvas passes with their most in the last second, the kept pictures, and in a dev build the
|
|
9540
9681
|
* draw calls of the last frame and the Graphics redraws and Pixi rebuilds per second. Inert: all 0.
|
|
9541
9682
|
* @example
|
|
9542
9683
|
* ```ts
|
|
9543
9684
|
* // The editor's stats panel reads it every frame. Here the game drew one sprite for 51 frames,
|
|
9544
9685
|
* // 20 ms apart with 4 ms of work each, and its texture is not uploaded yet.
|
|
9545
|
-
* app.renderer.stats(); // { fps: 50, drawn: 50, frameMs: 4, textures: 0, textureMb: 0, textureMbSplit: { art: 0, targets: 0, kept: 0 }, views: 1, pooled: 0, renderPasses: 1, renderPassesMax: 1, kept: { pictures: 0, mb: 0, retakes: 0 } }
|
|
9686
|
+
* app.renderer.stats(); // { fps: 50, drawn: 50, frameMs: 4, textures: 0, textureMb: 0, textureMbSplit: { art: 0, targets: 0, kept: 0 }, views: 1, pooled: 0, renderPasses: 1, renderPassesMax: 1, canvasPasses: 1, canvasPassesMax: 1, kept: { pictures: 0, mb: 0, retakes: 0, evicted: 0, refused: 0 } }
|
|
9546
9687
|
* // The same frame in a dev build also counts the one sprite batch, and the one instruction build of the first
|
|
9547
9688
|
* // frame: { ..., drawCalls: 1, redraws: 0, rebuilds: 1 }
|
|
9548
9689
|
* app.renderer.stats(); // { fps: 120, drawn: 0, … }: a still board with onDemand
|
|
9549
|
-
* // the ward at rest with its lamps kept: { renderPasses: 1, renderPassesMax: 1, kept: { pictures: 4, mb: 1.6, retakes: 0 }, … }
|
|
9690
|
+
* // the ward at rest with its lamps kept: { renderPasses: 1, renderPassesMax: 1, canvasPasses: 1, canvasPassesMax: 1, kept: { pictures: 4, mb: 1.6, retakes: 0, evicted: 0, refused: 0 }, … }
|
|
9550
9691
|
* ```
|
|
9551
9692
|
*/
|
|
9552
9693
|
stats(): RenderStats;
|
|
@@ -9934,7 +10075,7 @@ type PictureRequest = {
|
|
|
9934
10075
|
reject: (error: Error) => void;
|
|
9935
10076
|
};
|
|
9936
10077
|
declare namespace types_d_exports$2 {
|
|
9937
|
-
export { AdaptiveScale, Api$1 as Api, AspectRange, BitmapFontData, CaptureOptions, Captured, Config$2 as Config, CountingClasses, CoverFrame, CreateTextureOptions$1 as CreateTextureOptions, DebugApi, DebugSwitches, DemandFrame, DemandModule, DemandReason, DemandState, Deps$2 as Deps, DisplayAdapter, DisplayEntry, DisplaysApi, DrawCounter, Events$2 as Events, FilterCache, FilterSlot, FilterSlotInputs, FiltersApi, FontsApi, FrameColumns, FrameReadResult, FrameReadout, FrameRecord, FrameRing, HitBox, HostApi, HostInternal, HostModule, HostState, HudPartValue, KeptInternal, KeptModule, KeptRange, KeptState, KeptStats, KernelSlice$2 as KernelSlice, LayerEntry, LeaveApi, LeaveCover, LeaveLoader, LeaveLook, LegendEntry, LongFrameEntry, Modules, MonitorApi, MonitorConfig, MonitorCounts, MonitorDeps, MonitorInternal, MonitorModule, MonitorSections, MonitorState, NineBorders$1 as NineBorders, Orientation, OverlayEventDetail, OverlayLevelValue, OverlayMode, OverlayPhase, OverlayReport, OverlayValue, OverlayWhat, PassKind, PassRecord, PerfCause, PerfChange, PerfChangeEntry, PerfCollectorLine, PerfCounts, PerfDisplay, PerfEventLine, PerfEventName, PerfGapLine, PerfHeaderLine, PerfLogLine, PerfLongFrameLine, PerfMarkLine, PerfMeasured, PerfMonitorApi, PerfSampleLine, PerfSpikeLine, PerfStartupLine, PerfTelemetryLine, PerfThermalLine, PictureRect, PixiApplication, PixiBitmapFont, PixiBounds, PixiContainer, PixiFilter, PixiFilterManager, PixiGraphics, PixiMatrix, PixiMesh, PixiModule, PixiNineSliceSprite, PixiRectangle, PixiRenderTexture, PixiSprite, PixiTexture, PixiTextureSource, Point, PoolTrim, PoolTrimDetail, ProblemEventDetail, ProblemRule, Rect, RenderStats, RendererCtx, RendererKind, SafeArea, ShaderEventDetail, ShaderWhat, SliceFrame, State$2 as State, SyncApi, SyncCounts, SyncInternal, SyncModule, SyncState, TeardownScope, TextureProvider, TextureUsage, TexturesApi, Under, View, ViewKind, ViewportApi, ViewportInternal, ViewportModule, ViewportSize, ViewportState, WarmDetail };
|
|
10078
|
+
export { AdaptiveScale, Api$1 as Api, AspectRange, BitmapFontData, CanvasRestart, CaptureOptions, Captured, Config$2 as Config, CountingClasses, CoverFrame, CreateTextureOptions$1 as CreateTextureOptions, DebugApi, DebugSwitches, DemandFrame, DemandModule, DemandReason, DemandState, Deps$2 as Deps, DisplayAdapter, DisplayEntry, DisplaysApi, DrawCounter, Events$2 as Events, FilterCache, FilterSlot, FilterSlotInputs, FiltersApi, FontsApi, FrameColumns, FrameReadResult, FrameReadout, FrameRecord, FrameRing, HitBox, HostApi, HostInternal, HostModule, HostState, HudPartValue, KeptInternal, KeptModule, KeptRange, KeptState, KeptStats, KernelSlice$2 as KernelSlice, LayerEntry, LeaveApi, LeaveCover, LeaveLoader, LeaveLook, LegendEntry, LongFrameEntry, Modules, MonitorApi, MonitorConfig, MonitorCounts, MonitorDeps, MonitorInternal, MonitorModule, MonitorSections, MonitorState, NineBorders$1 as NineBorders, Orientation, OverlayEventDetail, OverlayLevelValue, OverlayMode, OverlayPhase, OverlayReport, OverlayValue, OverlayWhat, PassKind, PassRecord, PerfCause, PerfChange, PerfChangeEntry, PerfCollectorLine, PerfCounts, PerfDisplay, PerfEventLine, PerfEventName, PerfGapLine, PerfHeaderLine, PerfLogLine, PerfLongFrameLine, PerfMarkLine, PerfMeasured, PerfMonitorApi, PerfSampleLine, PerfSpikeLine, PerfStartupLine, PerfTelemetryLine, PerfThermalLine, PictureRect, PixiApplication, PixiBitmapFont, PixiBounds, PixiContainer, PixiFilter, PixiFilterManager, PixiGraphics, PixiMatrix, PixiMesh, PixiModule, PixiNineSliceSprite, PixiRectangle, PixiRenderTexture, PixiSprite, PixiTexture, PixiTextureSource, Point, PoolTrim, PoolTrimDetail, ProblemEventDetail, ProblemRule, Rect, RenderStats, RendererCtx, RendererKind, RetakeWhy, SafeArea, ShaderEventDetail, ShaderWhat, SliceFrame, State$2 as State, SyncApi, SyncCounts, SyncInternal, SyncModule, SyncState, TeardownScope, TextureProvider, TextureUsage, TexturesApi, Under, View, ViewKind, ViewportApi, ViewportInternal, ViewportModule, ViewportSize, ViewportState, WarmDetail, WhyEntry, WhyLive };
|
|
9938
10079
|
}
|
|
9939
10080
|
/**
|
|
9940
10081
|
* The part of Pixi the engine uses: the classes `sync` builds views from (a `Rectangle` frames the
|
|
@@ -11387,6 +11528,33 @@ type DebugSwitches = {
|
|
|
11387
11528
|
kept: boolean;
|
|
11388
11529
|
overdraw: boolean;
|
|
11389
11530
|
};
|
|
11531
|
+
/**
|
|
11532
|
+
* One view of `sync.debug.why()`: the label the monitor names its view by; how it is drawn (`"direct"` is a stack of
|
|
11533
|
+
* `AlphaFilter`s drawn by its quad, F54); why it is live, `null` when it is not; the still frames left before a take, 0
|
|
11534
|
+
* when it waits for none; and the last take in the last full second, with the view whose mark caused it.
|
|
11535
|
+
*
|
|
11536
|
+
* @example
|
|
11537
|
+
* ```ts
|
|
11538
|
+
* // A panel whose timer text changes every frame: taken again and again, then left live until it stands still.
|
|
11539
|
+
* const entry: WhyEntry = {
|
|
11540
|
+
* view: "Shape#1048590 board:bottom",
|
|
11541
|
+
* mode: "live",
|
|
11542
|
+
* reason: "churn",
|
|
11543
|
+
* calmIn: 6,
|
|
11544
|
+
* retake: { why: "mark", by: "Text#1048612 tags:timer" }
|
|
11545
|
+
* };
|
|
11546
|
+
* ```
|
|
11547
|
+
*/
|
|
11548
|
+
type WhyEntry = {
|
|
11549
|
+
/** The label of the view's display object, as the performance log names it. */view: string; /** How the view is drawn in this frame. */
|
|
11550
|
+
mode: "kept" | "direct" | "live"; /** Why it is drawn live; `null` when kept or direct. */
|
|
11551
|
+
reason: WhyLive | null; /** Still frames left before a take; 0 when it waits for none. */
|
|
11552
|
+
calmIn: number; /** The view's last take, when it fell in the last full second. */
|
|
11553
|
+
retake: {
|
|
11554
|
+
why: RetakeWhy;
|
|
11555
|
+
by: string | null;
|
|
11556
|
+
} | null;
|
|
11557
|
+
};
|
|
11390
11558
|
/**
|
|
11391
11559
|
* The debug drawing of the renderer, `app.renderer.sync.debug`. The switch outlines every
|
|
11392
11560
|
* nine-slice at once; a single panel asks for its own outline with `NineSlice.debug` (`ui`:
|
|
@@ -11482,6 +11650,25 @@ type DebugApi = {
|
|
|
11482
11650
|
* ```
|
|
11483
11651
|
*/
|
|
11484
11652
|
overlays(): readonly OverlayReport[];
|
|
11653
|
+
/**
|
|
11654
|
+
* Why every view with an enabled filter is drawn as it is, in draw order: from its picture, by its quad, or live and
|
|
11655
|
+
* why, how many still frames are left before a take, and what its last take was for. Built when called, never per
|
|
11656
|
+
* frame, so a tool may ask at any moment. Agent builds only (dev and `--debug`); every other build answers a frozen
|
|
11657
|
+
* `[]`, and an inert renderer an empty array.
|
|
11658
|
+
*
|
|
11659
|
+
* @returns One entry per view, a fresh array.
|
|
11660
|
+
* @example
|
|
11661
|
+
* ```ts
|
|
11662
|
+
* // The memory screen in a debug build: the board churns, a lamp under a filtered room stays live, a picture stands.
|
|
11663
|
+
* app.renderer.sync.debug.why();
|
|
11664
|
+
* // [
|
|
11665
|
+
* // { view: "Shape#1048590 board:bottom", mode: "live", reason: "churn", calmIn: 6, retake: { why: "mark", by: "Text#1048612 tags:timer" } },
|
|
11666
|
+
* // { view: "Sprite#1048633 ward:glow3", mode: "live", reason: "placed-under-filter", calmIn: 0, retake: null },
|
|
11667
|
+
* // { view: "Sprite#1048640 board:g1", mode: "kept", reason: null, calmIn: 0, retake: { why: "resolution", by: null } }
|
|
11668
|
+
* // ]
|
|
11669
|
+
* ```
|
|
11670
|
+
*/
|
|
11671
|
+
why(): readonly WhyEntry[];
|
|
11485
11672
|
/**
|
|
11486
11673
|
* What the debug switches are set to, as a fresh object.
|
|
11487
11674
|
*
|
|
@@ -11871,7 +12058,8 @@ type SyncInternal = {
|
|
|
11871
12058
|
* Creates the root container, registers the world hooks and the `renderer.sync` system, and
|
|
11872
12059
|
* builds the views of the entities that already exist.
|
|
11873
12060
|
*/
|
|
11874
|
-
start(): void;
|
|
12061
|
+
start(): void; /** The canvas passes of a frame estimated from the filter slots, read by `stats()` where nothing counts them. */
|
|
12062
|
+
canvasPasses(): number;
|
|
11875
12063
|
/**
|
|
11876
12064
|
* Drops every view, rebuilds the root, the layers and every view. Used after a restore, where
|
|
11877
12065
|
* the old application and all its objects are gone.
|
|
@@ -14026,4 +14214,4 @@ type BundleCompanion = {
|
|
|
14026
14214
|
unload(bundle: string): void;
|
|
14027
14215
|
};
|
|
14028
14216
|
//#endregion
|
|
14029
|
-
export {
|
|
14217
|
+
export { PixiFilter as $, ReducedMotion as $n, State$7 as $r, ProblemRule as $t, SyncApi as A, FlowState as An, State$5 as Ar, PassKind as At, Shape as B, Hint as Bn, PlayerStateProvider as Br, PerfGapLine as Bt, SceneSpec as C, FeatureDescription as Cn, Explained as Cr, MonitorSections as Ct, DebugSwitches as D, Bookmark as Dn, ClockSource as Dr, PERF_GAP_BUCKETS as Dt, types_d_exports$1 as E, AnyFlow as En, Api$4 as Er, PERF_CAUSES as Et, NineSlice$1 as F, TypeTag as Fn, Json as Fr, PerfCollectorLine as Ft, SpriteValue as G, DescriptionNode as Gn, SnapshotOf as Gr, PerfMeasured as Gt, Sprite as H, Answer as Hn, SaveDoc as Hr, PerfLogLine as Ht, NineSliceValue as I, Descriptor as In, Root as Ir, PerfCounts as It, sprite as J, MotionCause as Jn, RngState as Jr, PerfStartupLine as Jt, Transform as K, Ease as Kn, StoreApi as Kr, PerfSampleLine as Kt, Overlay as L, Effect as Ln, State$6 as Lr, PerfDisplay as Lt, Display as M, NodeTable as Mn, Api$5 as Mr, PerfCause as Mt, HudPart as N, RouteStep as Nn, Config$6 as Nr, PerfChange as Nt, FilterSlot as O, DefineNode as On, Config$5 as Or, PERF_LOG_VERSION as Ot, HudPartValue as P, SceneIdOf as Pn, Events$5 as Pr, PerfChangeEntry as Pt, MonitorConfig as Q, ProjectionSpec as Qn, PauseReason as Qr, ProblemEventDetail as Qt, OverlayValue as R, EffectOptions as Rn, types_d_exports$6 as Rr, PerfEventLine as Rt, SceneDefinition as S, type as Sn, Config$4 as Sr, MONITOR_SECTIONS as St, State$1 as T, FeatureTree as Tn, types_d_exports$4 as Tr, OverlayWhat as Tt, SpriteBlend as U, AnchorTarget as Un, SaveUnreadableError as Ur, PerfLongFrameLine as Ut, ShapeValue as V, NodeFx as Vn, ProviderCall as Vr, PerfHeaderLine as Vt, SpriteOptions as W, ChangeHook as Wn, Snapshot as Wr, PerfMarkLine as Wt, Api$1 as X, NumericFields as Xn, Config$7 as Xr, PerfThermalLine as Xt, AdaptiveScale as Y, MotionHandle as Yn, Api$6 as Yr, PerfTelemetryLine as Yt, Config$2 as Z, ProjectionMotion as Zn, Events$6 as Zr, PoolTrimDetail as Zt, AnySceneProjection as _, contribution as _n, ResourceType as _r, FrameReadResult as _t, Config as a, State$8 as ai, CanvasRestart as an, AnyComponentType as ar, Under as at, Events$1 as b, slot as bn, TagType as br, FrameRing as bt, LoadBundles as c, types_d_exports$8 as ci, BundlesOf as cn, ComponentSchema as cr, MonitorCounts as ct, Manifest as d, Require as di, GameTypes as dn, Entity as dr, Point as dt, types_d_exports$7 as ei, SHADER_WHATS as en, SceneSwitch as er, PixiModule as et, ReadyBundles as f, HudKeysOf as fn, EntitySnapshot as fr, ViewportSize as ft, types_d_exports as g, types_d_exports$3 as gn, QueryTerm as gr, FrameColumns as gt, Usage as h, TextStylesOf as hn, Narrowed as hr, WhyLive as ht, BundleSpec as i, RateChange as ii, CANVAS_RESTARTS as in, AnyComponent as ir, State$2 as it, WhyEntry as j, JournalEntry as jn, types_d_exports$5 as jr, PassRecord as jt, FilterSlotInputs as k, FlowGraph as kn, FakeClock as kr, PROBLEM_RULES as kt, LoadReason as l, Config$9 as li, Config$3 as ln, ComponentType as lr, RenderStats as lt, Tier as m, State$3 as mn, Mut as mr, RetakeWhy as mt, AssetsIo as n, Config$8 as ni, ShaderWhat as nn, TrackSegment as nr, PixiTexture as nt, DefineBundles as o, ThermalReading as oi, DEMAND_REASONS as on, AnyComponentValue as or, types_d_exports$2 as ot, State as p, Position as pn, FrameDiff as pr, FilterCache as pt, TransformValue as q, Motion as qn, RngApi as qr, PerfSpikeLine as qt, BundleMap as r, FrameRate as ri, WarmDetail as rn, ViewHandle as rr, PoolTrim as rt, Events as s, Time as si, Api$2 as sn, ComponentHandle as sr, Captured as st, Api as t, Api$7 as ti, ShaderEventDetail as tn, TrackOptions as tr, PixiSprite as tt, LoadResult as u, Events$8 as ui, EmitterIdOf as un, ComponentValue as ur, Orientation as ut, Config$1 as v, defineFlow as vn, SystemDefinition as vr, FrameReadout as vt, ScenesApi as w, FeaturePlugin as wn, State$4 as wr, OverlayEventDetail as wt, LayerMap as x, to as xn, Api$3 as xr, LongFrameEntry as xt, DefineScene as y, exit as yn, SystemFor as yr, FrameRecord as yt, Parent as z, GuideOptions as zn, Patch as zr, PerfEventName as zt };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as AnimApi, r as UiApi } from "./types-
|
|
3
|
-
import { N 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 { Er as Api$4, Mr as Api$2, X as Api, Yr as Api$3, xr as Api$1 } from "./types-JrYEbbeJ.mjs";
|
|
2
|
+
import { P as AnimApi, r as UiApi } from "./types-G9hpd34F.mjs";
|
|
3
|
+
import { N as InputApi } from "./types-DvAtKyJ3.mjs";
|
|
4
|
+
import { r as Repro } from "./headless-CFlHYKpY.mjs";
|
|
5
|
+
import { a as InputOf, r as ControlApp } from "./types-B9dzviB6.mjs";
|
|
6
|
+
import { t as commands } from "./commands-BICMk0d0.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-Dfue6iA6.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
|
@@ -667,7 +667,8 @@ Cosmetic rendering extras as data, drawn by `effectsPlugin`: `plugins: [...scree
|
|
|
667
667
|
- Particles: `defineEmitter(id, config)` returns frozen data a feature lists under `emitters`. Required: `textures` (1 to 16 asset keys of one atlas page) and exactly one of `burst` (an integer, emitted once) and `rate` (particles per second while `active`). Optional with defaults: `lifeMs`, `speed`, `angle`, `gravity`, `drag`, `spin`, `shape` (`point`, `circle`, `rect`, `ring`), `scale`, `alpha`, `tint` (each `{ from, to }`), `space` (`"world"` or `"local"`), `prewarmMs`, `maxParticles` (`256`), `blend` (`"normal"` or `"add"`). A mistake throws at definition.
|
|
668
668
|
- The `Emitter({ effect, active })` component on an entity runs an emitter: `generator: item => [Sprite({ texture: "board.generator" }), Emitter({ effect: "fx.steam" })]`. `effect: ""` draws nothing. Particles step in the `animate` phase, so they freeze while paused and a fast walk emits nothing. Their random source is seeded, never `Math.random` and never the model's rng. In `defineGame<Types>()`'s `Emitter`, `effect` takes the game's emitter ids and `""`; `defineEmitter` never takes `""`.
|
|
669
669
|
- Filters: `defineFilter(id, { wgsl, glsl, uniforms?, passes?, padding?, inputs?, fallback? })` returns a component type a feature lists under `filters`. Both bodies are required: `wgsl` is the WGSL `fn mainFragment` and reads a uniform as `fu.amount`; `glsl` is GLSL ES 3.0 `void main()` that sets `finalColor` and reads a uniform as `amount`. A uniform is a number (tweenable), `{ color: 0xffd700 }` or an array of 2 to 4 numbers. Every filter component also has `enabled: true` and `order: 0`. A filter covers the entity's subtree; on a ui element it goes in the `components` prop.
|
|
670
|
-
- Kept pictures: a still filtered view is drawn as one quad from an engine-owned picture, also while it moves (`renderer.keptMb`, default 64; `0` turns it off; `renderer.sync.debug.kept(false)` draws everything live). `defineFilter(id, { cache?: "local" | "placed" | false })`, default `"local"`; a body that reads `uOutputFrame.xy`, `uGlobalFrame`, `gl_FragCoord`, `@builtin(position)` or `uOutputTexture` and declares nothing is drawn live (dev warns `effects:filter-reads-screen`); write `canvasPixel(uv)` for the pixel's canvas position (in WGSL and GLSL) and it is kept; `cache: false` draws it live always. `app.renderer.stats()` measures `renderPasses` on the GPU path in every build and adds `renderPassesMax` (the most of one frame in the last second) and `kept: { pictures, mb, retakes }
|
|
670
|
+
- Kept pictures: a still filtered view is drawn as one quad from an engine-owned picture, also while it moves (`renderer.keptMb`, default 64; `0` turns it off; `renderer.sync.debug.kept(false)` draws everything live). `defineFilter(id, { cache?: "local" | "placed" | false })`, default `"local"`; a body that reads `uOutputFrame.xy`, `uGlobalFrame`, `gl_FragCoord`, `@builtin(position)` or `uOutputTexture` and declares nothing is drawn live (dev warns `effects:filter-reads-screen`); write `canvasPixel(uv)` for the pixel's canvas position (in WGSL and GLSL) and it is kept; `cache: false` draws it live always. `app.renderer.stats()` measures `renderPasses` on the GPU path in every build and adds `renderPassesMax` (the most of one frame in the last second), `canvasPasses` and `canvasPassesMax` (the same for the passes on the canvas: breaks = `canvasPasses - 1`; where nothing counts, 1 + the views drawn live with an enabled filter) and `kept: { pictures, mb, retakes, evicted, refused }` (`evicted`, `refused`: the budget's evictions and refused takes in the last second, a refusal that holds counted once).
|
|
671
|
+
- Why a view is drawn live (agent builds): `app.renderer.sync.debug.why()` answers `WhyEntry[]` in draw order, one per view with an enabled filter: `{ view, mode: "kept" | "direct" | "live", reason: WhyLive | null, calmIn, retake: { why: RetakeWhy, by } | null }`; every other build a frozen `[]`. `frames().passes.restart` indexes the root export `CANVAS_RESTARTS` (`"none"`, `"first"`, `"filter"`, `"mask"`, `"depth"`, `"empty"`, append-only: why a canvas pass began, WebGPU); a spike's `passes[].restart` carries the name, no key for `"none"`. Root types `CanvasRestart`, `WhyEntry`, `WhyLive`, `RetakeWhy`.
|
|
671
672
|
- Filter inputs: `inputs: { blur: { stages: [FrostBox4, FrostGauss], chain: (value, { resolution }) => [{ stage, scale, uniforms? }] } }` gives the body `sampleBlur(uv)` in both languages: the last texture of a chain of stages (each a `defineFilter`, drawing alone) drawn from the view's input into pooled textures at `resolution × scale`. The chain runs only when a uniform or the resolution changed; a step naming a stage not in `stages` breaks the filter. The engine counts the passes (leave `passes` out). `fallback: OtherFilter` (a subset of the uniforms) draws when the filter is broken.
|
|
672
673
|
- Shader checks run in every build: every body, stage and fallback compiles once on the device when the renderer first draws, and the first scene mounts after the checks (`effects:mount-waited`). A broken filter (`effects:broken` with reason `compile`, `apply` or `chain`) draws its fallback or the view unfiltered, never a blank frame; a dev build also draws magenta stripes over it.
|
|
673
674
|
- Built-in filters: `Glow`, `Outline`, `Blur`, `ColorMatrix`, `Noise`, `Displacement` (`map` is an asset key), `Alpha`. A motion hook tweens them like any component: `view.tween(Glow, { strength: 0 }, { ms: 200 })`.
|