@moku-labs/game 0.15.97 → 0.15.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -236,7 +236,7 @@ createApp({ plugins: [...screen, effectsPlugin, audioPlugin, platformPlugin] });
236
236
  | [`i18n`](./src/plugins/i18n/README.md) | screen | Strings as data, ICU messages, compiled per locale; a sub-feature's strings travel with its bundle |
237
237
  | [`text`](./src/plugins/text/README.md) | screen | MSDF text, styles, inline tags and icons |
238
238
  | [`ui`](./src/plugins/ui/README.md) | screen | Screens in JSX, Yoga layout, popups, styles |
239
- | [`effects`](./src/plugins/effects/README.md) | opt-in | Particles and filters as components, WGSL and GLSL |
239
+ | [`effects`](./src/plugins/effects/README.md) | opt-in | Particles and filters as components, WGSL and GLSL; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Fold` ready to list ([set](./src/plugins/effects/set/README.md)) |
240
240
  | [`audio`](./src/plugins/audio/README.md) | opt-in | Music and sound effects on three buses |
241
241
  | [`platform`](./src/plugins/platform/README.md) | opt-in | The phone: Back button, haptics, keep-awake |
242
242
 
@@ -1,4 +1,4 @@
1
- import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-Brsj29M-.mjs";
1
+ import { h as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-BBRC69WT.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import { qr as PlayerStateProvider } from "../types-qCcSw8YI.mjs";
2
- import { gt as PlatformProvider } from "../index-U_AN5j0L.mjs";
3
- import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-Brsj29M-.mjs";
2
+ import { wt as PlatformProvider } from "../index-aU0FlLL6.mjs";
3
+ import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-BBRC69WT.mjs";
4
4
  import { Back, Haptics, KeepAwake, Lifecycle, Store } from "@moku-labs/system";
5
5
 
6
6
  //#region src/app/system.d.ts
package/dist/app.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Hr as Json } from "./types-qCcSw8YI.mjs";
2
2
  import { q as StringTable } from "./types-L3E-YS4N.mjs";
3
- import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-Brsj29M-.mjs";
3
+ import { _ as SystemName, a as GameHandle, c as MemoryProvider, d as PlistValue, f as SaveKind, i as GameDefinition, l as PageAgent, m as ScreenSeams, n as GameApp, o as GamePluginConfigs, p as Scenario, r as GameConfig, s as HeadlessSeams, y as WithGameState } from "./types-BBRC69WT.mjs";
4
4
  import { AnyPluginInstance } from "@moku-labs/core";
5
5
 
6
6
  //#region src/app/define.d.ts
package/dist/app.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-C32BYdgi.mjs";
1
+ import { Mt as effectsPlugin, S as flattenFeatures, Ut as audioPlugin, X as platformPlugin, i as screen, t as createApp } from "./src-DUt139Ds.mjs";
2
2
  import { t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  //#region src/app/define.ts
@@ -1,5 +1,5 @@
1
1
  import { $r as StoreApi, D as DebugSwitches, In as FlowState, Nn as Bookmark, Or as Api$2, Z as Api$1, Zr as Snapshot, ft as Captured, mi as Time, ni as Api, ui as FrameRate, w as ScenesApi } from "./types-qCcSw8YI.mjs";
2
- import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-Cffn9Rbm.mjs";
2
+ import { H as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-BsF8WS0c.mjs";
3
3
  import { L as InputApi } from "./types-L3E-YS4N.mjs";
4
4
  import { t as HeadlessApp } from "./headless-Co3SEFi5.mjs";
5
5
  import { i as ControlApp, r as Command } from "./types-BE6tcAFX.mjs";
@@ -1,6 +1,6 @@
1
1
  import { t as HeadlessApp } from "./headless-Co3SEFi5.mjs";
2
2
  import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-BE6tcAFX.mjs";
3
- import { t as commands } from "./commands-DQXSQB_C.mjs";
3
+ import { t as commands } from "./commands-12Om5aNO.mjs";
4
4
  import { t as defineCommand } from "./define-hPbGjPAY.mjs";
5
5
 
6
6
  //#region src/plugins/flow/doors/dev.d.ts
@@ -1,5 +1,5 @@
1
1
  import { $n as Ease, $r as StoreApi, An as FeaturePlugin, Bn as SceneIdOf, Br as Config$5, C as SceneSpec, Cr as QueryTerm, Dr as TagType, Er as SystemFor, F as HudPartValue, Fr as Config$2, Ft as PassKind, G as SpriteOptions, Gn as GuideOptions, H as ShapeValue, Hn as Descriptor, Hr as Json, J as TransformValue, K as SpriteValue, Kn as Hint, Kr as Patch, L as NineSliceValue, Lr as State$2, Nr as Api$1, Or as Api$6, Pn as DefineNode, Q as Config$6, Qn as DescriptionNode, S as SceneDefinition, Sr as Narrowed, T as State$7, Tr as SystemDefinition, Tt as FrameRing, Un as Effect, Ur as Root, Wn as EffectOptions, Wr as State$5, Y as sprite, Yn as Answered, Z as Api$4, _ as AnySceneProjection, _i as Events$1, _n as HudKeysOf, _r as ComponentValue, _t as ViewportSize, a as Config$1, ai as PauseReason, ar as ProjectionSpec, bn as TextFormatsOf, c as LoadBundles, ci as Api$5, di as RateChange, ei as RngApi, f as ReadyBundles, fi as State$8, fn as Api$2, gi as Config$10, gn as GameTypes, gr as ComponentType, hn as EmitterIdOf, i as BundleSpec, ii as Events, ir as ProjectionMotion, jn as FeatureTree, jr as State$9, kn as FeatureDescription, kr as Config$9, l as LoadReason, li as Config$8, m as Tier, mn as Config$3, mr as ComponentHandle, ni as Api$3, o as DefineBundles, oi as State$4, or as ReducedMotion, p as State$1, pi as ThermalReading, pn as BundlesOf, r as BundleMap, ri as Config$4, rr as NumericFields, st as State$6, t as Api, u as LoadResult, v as Config$7, vi as Require, w as ScenesApi, wn as defineFlow, wr as ResourceType, wt as FrameRecord, x as LayerMap, xn as TextStylesOf, xr as Mut, y as DefineScene, yn as State$3, z as OverlayValue } from "./types-qCcSw8YI.mjs";
2
- import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$11, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, lt as OverlayApi, m as Config$13, n as State$13, r as UiApi, s as Config$12, t as Config$14, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-Cffn9Rbm.mjs";
2
+ import { A as AlphaValue, B as OutlineValue, C as RevealLineValue, D as EmitterConfig, E as VignetteValue, F as FilterComponent, G as FramesValue, H as AnimApi, I as FilterSpec, J as Target, K as MotionKeyframe, L as FilterValueOf, M as ColorMatrixValue, N as DisplacementValue, O as EmitterDefinition, Q as Step, R as GlowValue, S as GradeValue, T as ShineValue, U as AnimPlayerValue, V as UniformDeclaration, W as Config$11, X as HapticKind, Z as SfxDescriptor, _ as State$12, _t as OverlayApi, a as AudioApi, b as FlashValue, c as MusicDescriptor, d as State$11, et as defineAnimation, f as VolumesFor, h as EffectsApi, j as BlurValue, k as EmitterValue, l as MusicOptions, m as Config$13, n as State$13, ot as play, q as State$10, r as UiApi, s as Config$12, t as Config$14, w as RevealRoundValue, x as FoldValue, y as DissolveValue, z as NoiseValue } from "./types-BsF8WS0c.mjs";
3
3
  import { $ as Style, A as TextFormats, B as Argument, C as Point, E as TextBind, F as defineComponent, G as Part, H as I18nApi, I as Config$16, J as TextKey, K as State$14, L as InputApi, M as TextStyles, N as TextValue, Q as ResolvedStyle, R as State$15, T as TextApi, U as IntlKit, V as Config$15, W as Message, Y as TypedTr, Z as IsFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as TextStyleInput, k as TextFormatFunction, s as PopupComponent, tt as WhenFlags, v as BindField, w as State$16, x as CountdownValue, y as BindOptions } from "./types-L3E-YS4N.mjs";
4
4
  import { Log } from "@moku-labs/common/browser";
5
5
  import { PluginCtx } from "@moku-labs/core";
@@ -1758,6 +1758,141 @@ declare const Alpha: ComponentType<AlphaValue>;
1758
1758
  */
1759
1759
  declare function defineFilter<Uniforms extends Record<string, UniformDeclaration> = Record<never, never>>(id: string, spec: FilterSpec<Uniforms>): FilterComponent<FilterValueOf<Uniforms>>;
1760
1760
  //#endregion
1761
+ //#region src/plugins/effects/set/dissolve.d.ts
1762
+ /**
1763
+ * A view eaten away by a noise of `scale` cells across: `progress` 0 keeps all of it, 1 none, and the edge of what is
1764
+ * left glows in `edgeColor` over `edge` (0..1 of the noise). The noise has no time: the same cells go first at every
1765
+ * run, on WebGPU and WebGL alike. For a piece that burns away, a card that crumbles. List it in a feature's
1766
+ * `filters`, as a game's own filter. One render pass, one sample of the input; on WebGPU a tween draws on the view's
1767
+ * own quad, no pass, from its third frame.
1768
+ *
1769
+ * @example
1770
+ * ```ts
1771
+ * // A cleared piece burns away with a white rim.
1772
+ * Dissolve({ progress: 0.5 }).value.edge; // 0.08
1773
+ * view.tween(Dissolve, { progress: 1 }, { ms: 600 });
1774
+ * ```
1775
+ */
1776
+ declare const Dissolve: FilterComponent<DissolveValue>;
1777
+ //#endregion
1778
+ //#region src/plugins/effects/set/flash.d.ts
1779
+ /**
1780
+ * A view washed with `color` by `amount`: 0 draws the view as it is, 1 draws its shape in `color`, its alpha kept.
1781
+ * For a hit, a pick, a merge: tween `amount` up and down. List it in a feature's `filters`, as a game's own filter.
1782
+ * One render pass, one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
1783
+ *
1784
+ * @example
1785
+ * ```ts
1786
+ * // features/board/feature.ts lists it: filters: [Flash]. A merged piece flashes gold, then a motion fades it out.
1787
+ * Flash({ amount: 1, color: 0xffd700 }).value; // { amount: 1, color: 0xffd700, enabled: true, order: 0 }
1788
+ * view.tween(Flash, { amount: 0 }, { ms: 160 });
1789
+ * ```
1790
+ */
1791
+ declare const Flash: FilterComponent<FlashValue>;
1792
+ //#endregion
1793
+ //#region src/plugins/effects/set/fold.d.ts
1794
+ /**
1795
+ * A view turned by `angle` radians about its vertical axis (`axis: 0`) or its horizontal one (`axis: 1`), as a card or
1796
+ * an order row flips: at a quarter turn it is edge-on, at a half turn it shows its back, unmirrored and darkened by
1797
+ * `shade` (0..1). `perspective` (0..1) leans it: the side that goes away shrinks, to `1 − perspective` of its height at
1798
+ * a quarter turn, while the near side keeps its size, so the view never grows past its box. The view is padded by 8 px.
1799
+ * For a card flip, a row that turns to its next order. List it in a feature's `filters`, as a game's own filter. One
1800
+ * render pass, one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
1801
+ *
1802
+ * @example
1803
+ * ```ts
1804
+ * // An order row flips about its horizontal axis to show its next order.
1805
+ * Fold({ axis: 1 }).value.axis; // 1
1806
+ * view.tween(Fold, { angle: Math.PI }, { ms: 320 });
1807
+ * ```
1808
+ */
1809
+ declare const Fold: FilterComponent<FoldValue>;
1810
+ //#endregion
1811
+ //#region src/plugins/effects/set/grade.d.ts
1812
+ /**
1813
+ * A colour grade of a view: `contrast` about the middle grey, then `brightness`, then `saturation` against the luma,
1814
+ * then a multiply by `tint`. Each number is 1 for no change, 0..2; `saturation: 0` is grey. The alpha is kept. In place
1815
+ * of `ColorMatrix` where a value moves: on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
1816
+ * List it in a feature's `filters`, as a game's own filter. One render pass, one sample.
1817
+ *
1818
+ * @example
1819
+ * ```ts
1820
+ * // A locked level card goes grey, and a kept picture holds it: a still view pays no pass.
1821
+ * Grade({ saturation: 0 }).value.saturation; // 0
1822
+ * Grade.filter.cache; // "local"
1823
+ * ```
1824
+ */
1825
+ declare const Grade: FilterComponent<GradeValue>;
1826
+ //#endregion
1827
+ //#region src/plugins/effects/set/reveal-line.d.ts
1828
+ /**
1829
+ * A view shown up to a straight line that sweeps across it: `progress` 0 hides all of it, 1 shows all of it, the line
1830
+ * at `angle` radians (0 sweeps from the left, `Math.PI / 2` from the top) with an edge `soft` wide. The angle is in the
1831
+ * view's own 0..1 frame, so `Math.PI / 4` sweeps from one corner to the opposite one on a view of any shape. For a wipe
1832
+ * in or out of a card, a panel, a picture. List it in a feature's `filters`, as a game's own filter. One render pass,
1833
+ * one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
1834
+ *
1835
+ * @example
1836
+ * ```ts
1837
+ * // A level card wipes in from the top: it starts hidden, and a motion tweens progress to 1.
1838
+ * RevealLine({ angle: Math.PI / 2 }).value.progress; // 0
1839
+ * view.tween(RevealLine, { progress: 1 }, { ms: 400 });
1840
+ * ```
1841
+ */
1842
+ declare const RevealLine: FilterComponent<RevealLineValue>;
1843
+ //#endregion
1844
+ //#region src/plugins/effects/set/reveal-round.d.ts
1845
+ /**
1846
+ * A view shown inside a disc around the point `x`, `y`: `radius: 0` hides all of it, and from about 0.75 a disc at the
1847
+ * centre shows every corner (1.5 shows all of it from any point). The edge fades over `soft` and waves by `wobble`
1848
+ * (0..0.2). The point and the lengths are in 0..1 of the view on each axis, so on a view twice as wide as tall the disc
1849
+ * is an ellipse. It hides the outside by alpha and declares no `area`: the view's fill is still paid. List it in a
1850
+ * feature's `filters`, as a game's own filter. One render pass, one sample; on WebGPU a tween draws on the view's own
1851
+ * quad, no pass, from its third frame.
1852
+ *
1853
+ * @example
1854
+ * ```ts
1855
+ * // A lens opens over the map: the window starts closed and grows to show the whole view.
1856
+ * RevealRound({ wobble: 0.04 }).value.radius; // 0
1857
+ * view.tween(RevealRound, { radius: 1.2 }, { ms: 640 });
1858
+ * ```
1859
+ */
1860
+ declare const RevealRound: FilterComponent<RevealRoundValue>;
1861
+ //#endregion
1862
+ //#region src/plugins/effects/set/shine.d.ts
1863
+ /**
1864
+ * A band of light across a view: `position` is where the band stands along its sweep, -0.5 before the view and 1.5 past
1865
+ * it, so a tween from one to the other sweeps it across once; `width` is how far from its line the band reaches (0..1
1866
+ * of the sweep), `angle` its direction in radians in the view's own 0..1 frame, `strength` how much light it adds. Light
1867
+ * is added to the colour only: the transparent pixels around the view's shape stay transparent. For a glint on a
1868
+ * reward, a card, a button. List it in a feature's `filters`, as a game's own filter. One render pass, one sample; on
1869
+ * WebGPU a tween draws on the view's own quad, no pass, from its third frame.
1870
+ *
1871
+ * @example
1872
+ * ```ts
1873
+ * // A new reward glints once: the band sweeps across it in half a second.
1874
+ * Shine().value.position; // -0.5
1875
+ * view.tween(Shine, { position: 1.5 }, { ms: 500 });
1876
+ * ```
1877
+ */
1878
+ declare const Shine: FilterComponent<ShineValue>;
1879
+ //#endregion
1880
+ //#region src/plugins/effects/set/vignette.d.ts
1881
+ /**
1882
+ * A view darkened outside a disc: inside `radius` of the point `x`, `y` it is drawn as it is, from there over `soft` it
1883
+ * fades to `color`, by `amount`. The point and the lengths are in 0..1 of the view on each axis, so on a view twice as
1884
+ * wide as tall the disc is an ellipse. The alpha is kept. List it in a feature's `filters`, as a game's own filter. One
1885
+ * render pass, one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
1886
+ *
1887
+ * @example
1888
+ * ```ts
1889
+ * // A dream scene closes in at the edges, then the vignette fades away as the player wakes.
1890
+ * Vignette({ radius: 0.3, soft: 0.4 }).value.amount; // 1
1891
+ * view.tween(Vignette, { amount: 0 }, { ms: 300 });
1892
+ * ```
1893
+ */
1894
+ declare const Vignette: FilterComponent<VignetteValue>;
1895
+ //#endregion
1761
1896
  //#region src/plugins/effects/particles/component.d.ts
1762
1897
  /**
1763
1898
  * A particle effect on an entity. A `burst` effect emits when the component appears or its
@@ -2076,4 +2211,4 @@ declare const screen: readonly [import("@moku-labs/core").PluginInstance<"world"
2076
2211
  };
2077
2212
  }> & Record<never, never>, import("@moku-labs/core").PluginInstance<"text", Config$17, State$16, TextApi, {}> & Record<never, never>, import("@moku-labs/core").PluginInstance<"ui", Config$14, State$13, UiApi, {}> & Record<never, never>];
2078
2213
  //#endregion
2079
- export { resource as $, Draggable as A, Countdown as At, Tappable as B, AnimPlayer as C, effectsPlugin as Ct, defineBundles as D, assetsPlugin as Dt, defineScene as E, audioPlugin as Et, PointerOver as F, label as Ft, frameAt as G, Traceable as H, Pressable as I, Now as J, Exiting as K, Pressed as L, Held as M, bind as Mt, Hovered as N, defineTextFormats as Nt, load as O, animPlugin as Ot, Pointer as P, defineTextStyles as Pt, mut as Q, Swipeable as R, defineMotion as S, flowPlugin as St, Frames as T, clockPlugin as Tt, Traced as U, Touchable as V, PASS_KINDS as W, Tree as X, Order as Y, component as Z, defineStyle as _, types_d_exports as _t, defineEmitter as a, schedule as at, messageDuration as b, inputPlugin as bt, Alpha as c, worldPlugin as ct, Displacement as d, textPlugin as dt, system as et, Glow as f, scenesPlugin as ft, resolve as g, PlatformProvider as gt, music as h, BackResult as ht, screen as i, hint as it, DropTarget as j, Text as jt, ready as k, projection as kt, Blur as l, uiPlugin as lt, Outline as m, platformPlugin as mt, createPlugin as n, defineEffect as nt, Emitter as o, defineFeature as ot, Noise as p, rendererPlugin as pt, Layer as q, defineGame as r, guide as rt, defineFilter as s, flattenFeatures as st, createApp as t, tag as tt, ColorMatrix as u, timePlugin as ut, tr as v, modelPlugin as vt, Animation as w, debugPlugin as wt, cubicBezier as x, i18nPlugin as xt, messageArgument as y, lifecyclePlugin as yt, TapValue as z };
2214
+ export { frameAt as $, defineMotion as A, flowPlugin as At, Held as B, bind as Bt, music as C, BackResult as Ct, messageArgument as D, lifecyclePlugin as Dt, tr as E, modelPlugin as Et, defineBundles as F, assetsPlugin as Ft, Pressed as G, Pointer as H, defineTextStyles as Ht, load as I, animPlugin as It, Tappable as J, Swipeable as K, ready as L, projection as Lt, Animation as M, debugPlugin as Mt, Frames as N, clockPlugin as Nt, messageDuration as O, inputPlugin as Ot, defineScene as P, audioPlugin as Pt, PASS_KINDS as Q, Draggable as R, Countdown as Rt, Outline as S, platformPlugin as St, defineStyle as T, types_d_exports as Tt, PointerOver as U, label as Ut, Hovered as V, defineTextFormats as Vt, Pressable as W, Traceable as X, Touchable as Y, Traced as Z, Blur as _, uiPlugin as _t, defineEmitter as a, component as at, Glow as b, scenesPlugin as bt, Shine as c, system as ct, Grade as d, guide as dt, Exiting as et, Fold as f, hint as ft, Alpha as g, worldPlugin as gt, defineFilter as h, flattenFeatures as ht, screen as i, Tree as it, AnimPlayer as j, effectsPlugin as jt, cubicBezier as k, i18nPlugin as kt, RevealRound as l, tag as lt, Dissolve as m, defineFeature as mt, createPlugin as n, Now as nt, Emitter as o, mut as ot, Flash as p, schedule as pt, TapValue as q, defineGame as r, Order as rt, Vignette as s, resource as st, createApp as t, Layer as tt, RevealLine as u, defineEffect as ut, ColorMatrix as v, timePlugin as vt, resolve as w, PlatformProvider as wt, Noise as x, rendererPlugin as xt, Displacement as y, textPlugin as yt, DropTarget as z, Text as zt };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as MonitorConfig, $t as PerfStartupLine, At as OverlayWhat, B as Parent, Bt as PerfCollectorLine, Cn as contribution, Ct as FrameReadout, Dn as to, Dt as MONITOR_SECTIONS, E as types_d_exports$13, En as slot, Et as LongFrameEntry, F as HudPartValue, Ft as PassKind, Gr as types_d_exports$10, Gt as PerfGapLine, Ht as PerfDisplay, I as NineSlice, It as PassRecord, Jt as PerfLongFrameLine, Kt as PerfHeaderLine, Lt as PerfCause, M as WhyEntry, Mr as types_d_exports$17, Mt as PERF_GAP_BUCKETS, N as Display, Nt as PERF_LOG_VERSION, On as type, Ot as MonitorSections, P as HudPart, Pt as PROBLEM_RULES, Qn as DescriptionNode, Qt as PerfSpikeLine, R as Overlay, Rr as types_d_exports$3, Rt as PerfChange, Sn as types_d_exports$6, St as FrameReadResult, Tn as exit, Tt as FrameRing, U as Sprite, Ut as PerfEventLine, V as Shape, Vt as PerfCounts, W as SpriteBlend, Wt as PerfEventName, X as AdaptiveScale, Xn as AnchorTarget, Xr as SaveUnreadableError, Xt as PerfMeasured, Y as sprite, Yt as PerfMarkLine, Zt as PerfSampleLine, an as SHADER_WHATS, bt as WhyLive, cn as WarmDetail, dn as DEMAND_REASONS, dt as ShotsConfig, en as PerfTelemetryLine, g as types_d_exports$1, hi as types_d_exports$15, in as ProblemRule, jt as PERF_CAUSES, kt as OverlayEventDetail, ln as CANVAS_RESTARTS, lt as types_d_exports$12, nn as PoolTrimDetail, on as ShaderEventDetail, ot as PoolTrim, pt as MonitorCounts, q as Transform, qt as PerfLogLine, rn as ProblemEventDetail, si as types_d_exports$9, sn as ShaderWhat, sr as SceneSwitch, tn as PerfThermalLine, un as CanvasRestart, ut as ShotsApi, wt as FrameRecord, xt as FrameColumns, yt as RetakeWhy, z as OverlayValue, zt as PerfChangeEntry } from "./types-qCcSw8YI.mjs";
2
- import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as stopSfx, ct as wait, et as set, i as types_d_exports$16, it as stagger, nt as spawn, ot as tween, p as types_d_exports$2, q as external, rt as spawned, st as use, tt as sfx, ut as types_d_exports$4, v as types_d_exports$5 } from "./types-Cffn9Rbm.mjs";
2
+ import { $ as HAPTIC_KINDS, C as RevealLineValue, E as VignetteValue, P as FilterArea, S as GradeValue, T as ShineValue, X as HapticKind, Y as types_d_exports, at as parallel, b as FlashValue, ct as set, dt as spawned, et as defineAnimation, ft as stagger, gt as wait, ht as use, i as types_d_exports$16, it as mark, lt as sfx, mt as tween, nt as frames, ot as play, p as types_d_exports$2, pt as stopSfx, rt as haptic, st as sequence, tt as external, ut as spawn, v as types_d_exports$5, vt as types_d_exports$4, w as RevealRoundValue, x as FoldValue, y as DissolveValue } from "./types-BsF8WS0c.mjs";
3
3
  import { A as TextFormats, D as TextFormat, F as defineComponent, O as TextFormatAnswer, P as types_d_exports$14, S as FormattedNumber, X as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, k as TextFormatFunction, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions, z as types_d_exports$8 } from "./types-L3E-YS4N.mjs";
4
- import { $ as resource, A as Draggable, At as Countdown, B as Tappable, C as AnimPlayer, Ct as effectsPlugin, D as defineBundles, Dt as assetsPlugin, E as defineScene, Et as audioPlugin, F as PointerOver, Ft as label, G as frameAt, H as Traceable, I as Pressable, J as Now, K as Exiting, L as Pressed, M as Held, Mt as bind, N as Hovered, Nt as defineTextFormats, O as load, Ot as animPlugin, P as Pointer, Pt as defineTextStyles, Q as mut, R as Swipeable, S as defineMotion, St as flowPlugin, T as Frames, Tt as clockPlugin, U as Traced, V as Touchable, W as PASS_KINDS, X as Tree, Y as Order, Z as component, _ as defineStyle, _t as types_d_exports$11, a as defineEmitter, at as schedule, b as messageDuration, bt as inputPlugin, c as Alpha, ct as worldPlugin, d as Displacement, dt as textPlugin, et as system, f as Glow, ft as scenesPlugin, g as resolve, gt as PlatformProvider, h as music, ht as BackResult, i as screen, it as hint, j as DropTarget, jt as Text, k as ready, kt as projection, l as Blur, lt as uiPlugin, m as Outline, mt as platformPlugin, n as createPlugin, nt as defineEffect, o as Emitter, ot as defineFeature, p as Noise, pt as rendererPlugin, q as Layer, r as defineGame, rt as guide, s as defineFilter, st as flattenFeatures, t as createApp, tt as tag, u as ColorMatrix, ut as timePlugin, v as tr, vt as modelPlugin, w as Animation, wt as debugPlugin, x as cubicBezier, xt as i18nPlugin, y as messageArgument, yt as lifecyclePlugin, z as TapValue } from "./index-U_AN5j0L.mjs";
5
- export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, type BackResult, type BindOptions, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, types_d_exports$6 as Flow, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
4
+ import { $ as frameAt, A as defineMotion, At as flowPlugin, B as Held, Bt as bind, C as music, Ct as BackResult, D as messageArgument, Dt as lifecyclePlugin, E as tr, Et as modelPlugin, F as defineBundles, Ft as assetsPlugin, G as Pressed, H as Pointer, Ht as defineTextStyles, I as load, It as animPlugin, J as Tappable, K as Swipeable, L as ready, Lt as projection, M as Animation, Mt as debugPlugin, N as Frames, Nt as clockPlugin, O as messageDuration, Ot as inputPlugin, P as defineScene, Pt as audioPlugin, Q as PASS_KINDS, R as Draggable, Rt as Countdown, S as Outline, St as platformPlugin, T as defineStyle, Tt as types_d_exports$11, U as PointerOver, Ut as label, V as Hovered, Vt as defineTextFormats, W as Pressable, X as Traceable, Y as Touchable, Z as Traced, _ as Blur, _t as uiPlugin, a as defineEmitter, at as component, b as Glow, bt as scenesPlugin, c as Shine, ct as system, d as Grade, dt as guide, et as Exiting, f as Fold, ft as hint, g as Alpha, gt as worldPlugin, h as defineFilter, ht as flattenFeatures, i as screen, it as Tree, j as AnimPlayer, jt as effectsPlugin, k as cubicBezier, kt as i18nPlugin, l as RevealRound, lt as tag, m as Dissolve, mt as defineFeature, n as createPlugin, nt as Now, o as Emitter, ot as mut, p as Flash, pt as schedule, q as TapValue, r as defineGame, rt as Order, s as Vignette, st as resource, t as createApp, tt as Layer, u as RevealLine, ut as defineEffect, v as ColorMatrix, vt as timePlugin, w as resolve, wt as PlatformProvider, x as Noise, xt as rendererPlugin, y as Displacement, yt as textPlugin, z as DropTarget, zt as Text } from "./index-aU0FlLL6.mjs";
5
+ export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, type BackResult, type BindOptions, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Dissolve, type DissolveValue, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, Flash, type FlashValue, types_d_exports$6 as Flow, Fold, type FoldValue, type FormattedNumber, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, Grade, type GradeValue, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, RevealLine, type RevealLineValue, RevealRound, type RevealRoundValue, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Shine, type ShineValue, type ShotsApi, type ShotsConfig, Sprite, type SpriteBlend, Swipeable, type TapValue, Tappable, Text, type TextFormat, type TextFormatAnswer, type TextFormatFunction, type TextFormats, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, Vignette, type VignetteValue, type WarmDetail, type WhyEntry, type WhyLive, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as sfx, $t as worldPlugin, A as types_exports$7, At as Glow, B as defineMotion, Bt as Animation, C as types_exports$14, Ct as messageDuration, D as types_exports$10, Dt as Blur, E as types_exports$11, Et as Alpha, F as types_exports$2, Ft as audioPlugin, G as external, Gt as MONITOR_SECTIONS, H as platformPlugin, Ht as rendererPlugin, I as types_exports$1, It as scenesPlugin, J as mark, Jt as PERF_LOG_VERSION, K as frames, Kt as PERF_CAUSES, L as types_exports, Lt as assetsPlugin, M as types_exports$5, Mt as Outline, N as types_exports$4, Nt as defineFilter, O as types_exports$9, Ot as ColorMatrix, P as types_exports$3, Pt as debugPlugin, Q as set, Qt as DEMAND_REASONS, R as uiPlugin, Rt as animPlugin, S as types_exports$15, St as messageArgument, T as types_exports$12, Tt as Emitter, U as HAPTIC_KINDS, Ut as PASS_KINDS, V as textPlugin, Vt as Frames, W as defineAnimation, Wt as frameAt, X as play, Xt as SHADER_WHATS, Y as parallel, Yt as PROBLEM_RULES, Z as sequence, Zt as CANVAS_RESTARTS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as to, at as use, b as types_exports$17, bt as Traced, c as hint, cn as SaveUnreadableError, ct as Draggable, d as defineScene, dn as clockPlugin, dt as Hovered, en as flowPlugin, et as spawn, f as tr, ft as Pointer, g as music, gt as Swipeable, h as defineEmitter, ht as Pressed, i as screen, in as slot, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as lifecyclePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as contribution, nt as stagger, o as defineEffect, on as type, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as exit, rt as stopSfx, s as guide, sn as modelPlugin, st as inputPlugin, t as createApp, tt as spawned, u as projection, un as timePlugin, ut as Held, v as load, vt as Touchable, w as types_exports$13, wt as effectsPlugin, x as types_exports$16, xt as i18nPlugin, y as ready, yt as Traceable, z as resolve, zt as AnimPlayer } from "./src-C32BYdgi.mjs";
1
+ import { $ as external, $t as MONITOR_SECTIONS, A as types_exports$15, At as messageArgument, B as types_exports$5, Bt as Outline, C as defineEmitter, Ct as Pressed, D as ready, Dt as Traceable, E as load, Et as Touchable, F as types_exports$10, Ft as Blur, G as types_exports, Gt as assetsPlugin, H as types_exports$3, Ht as debugPlugin, I as types_exports$9, It as ColorMatrix, J as defineMotion, Jt as Animation, K as uiPlugin, Kt as animPlugin, L as types_exports$8, Lt as Displacement, M as types_exports$13, Mt as effectsPlugin, N as types_exports$12, Nt as Emitter, O as types_exports$17, Ot as Traced, P as types_exports$11, Pt as Alpha, Q as defineAnimation, Qt as frameAt, R as types_exports$7, Rt as Glow, S as flattenFeatures, St as Pressable, T as defineBundles, Tt as Tappable, U as types_exports$2, Ut as audioPlugin, V as types_exports$4, Vt as defineFilter, W as types_exports$1, Wt as scenesPlugin, X as platformPlugin, Xt as rendererPlugin, Y as textPlugin, Yt as Frames, Z as HAPTIC_KINDS, Zt as PASS_KINDS, _ as schedule, _n as lifecyclePlugin, _t as DropTarget, a as Vignette, an as CANVAS_RESTARTS, at as sequence, b as tr, bt as Pointer, c as RevealLine, cn as flowPlugin, ct as spawn, d as Flash, dn as exit, dt as stopSfx, en as PERF_CAUSES, et as frames, f as Dissolve, fn as slot, ft as tween, g as hint, gn as SaveUnreadableError, gt as Draggable, h as guide, hn as modelPlugin, ht as inputPlugin, i as screen, in as SHADER_WHATS, it as play, j as types_exports$14, jt as messageDuration, k as types_exports$16, kt as i18nPlugin, l as Grade, lt as spawned, m as defineEffect, mn as type, mt as wait, n as createPlugin, nn as PERF_LOG_VERSION, nt as mark, o as Shine, on as DEMAND_REASONS, ot as set, p as cubicBezier, pn as to, pt as use, q as resolve, qt as AnimPlayer, r as defineGame, rn as PROBLEM_RULES, rt as parallel, s as RevealRound, sn as worldPlugin, st as sfx, t as createApp, tn as PERF_GAP_BUCKETS, tt as haptic, u as Fold, un as contribution, ut as stagger, v as projection, vn as timePlugin, vt as Held, w as music, wt as Swipeable, x as defineFeature, xt as PointerOver, y as defineScene, yn as clockPlugin, yt as Hovered, z as types_exports$6, zt as Noise } from "./src-DUt139Ds.mjs";
2
2
  import { $ as Shape, A as Countdown, F as defineTextStyles, I as label, J as HudPart, M as bind, P as defineTextFormats, Q as Parent, S as popup, T as defineStyle, X as Overlay, Y as NineSlice, _ as LocalWrite, at as Exiting, ct as Order, dt as mut, et as Sprite, ft as resource, h as DebugTrigger, ht as tag, it as sprite, j as Text, lt as Tree, ot as Layer, p as Box, pt as system, q as Display, st as Now, tt as Transform, ut as component, w as defineTokens, y as ScrollState } from "./visual-DhqD6W3v.mjs";
3
3
  import { t as defineComponent } from "./component-DGg5DqKK.mjs";
4
- export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, types_exports$6 as Flow, Frames, Glow, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
4
+ export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Dissolve, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, Flash, types_exports$6 as Flow, Fold, Frames, Glow, Grade, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, RevealLine, RevealRound, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Shine, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, Vignette, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextFormats, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
@@ -1,5 +1,5 @@
1
1
  import { Ar as Explained, Fn as FlowGraph, Ln as JournalEntry, Or as Api$1, Z as Api$2, Zr as Snapshot, br as FrameDiff, ct as Under, h as Usage, hr as ComponentSchema, mt as RenderStats, t as Api$3, vn as Position, yr as EntitySnapshot, zr as Api } from "./types-qCcSw8YI.mjs";
2
- import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-Cffn9Rbm.mjs";
2
+ import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-BsF8WS0c.mjs";
3
3
  import { c as UiNode } from "./types-L3E-YS4N.mjs";
4
4
  import { t as HeadlessApp } from "./headless-Co3SEFi5.mjs";
5
5
  import { a as InputArguments, d as WatchApp, f as WatchInput, l as Source, o as InputOf, s as InputSchema, t as CheatEntry } from "./types-BE6tcAFX.mjs";
@@ -48385,6 +48385,29 @@ function emptyReaders() {
48385
48385
  }
48386
48386
  /** The definitions whose bodies read the screen: a dev build warns about the ones that declared no `cache: false`. */
48387
48387
  const screenReaders = emptyReaders();
48388
+ /**
48389
+ * Creates the map of the components `defineFilter` made, by id. A function: the module-scope rule sees no collection
48390
+ * literal.
48391
+ *
48392
+ * @returns An empty map.
48393
+ */
48394
+ function emptyMade() {
48395
+ return /* @__PURE__ */ new Map();
48396
+ }
48397
+ /**
48398
+ * Every component `defineFilter` made in a dev build, by id, the last one winning: a hot reload makes a new object
48399
+ * under the same id. The start of a dev build watches the ones no feature lists (`effects:filter-unlisted`). A release
48400
+ * build fills nothing, and drops the map with its one reader.
48401
+ */
48402
+ const madeFilters = /*#__PURE__*/ emptyMade();
48403
+ /**
48404
+ * The components `defineFilter` made in a dev build, by id: nothing in a release build.
48405
+ *
48406
+ * @returns The map, read-only.
48407
+ */
48408
+ function filtersMade() {
48409
+ return madeFilters;
48410
+ }
48388
48411
  /** How bad a category is for the cache, for "the worst of": a screen read beats a placed one beats a local one. */
48389
48412
  const WORST = {
48390
48413
  local: 0,
@@ -48919,7 +48942,9 @@ function defineFilter(id, spec) {
48919
48942
  ["enabled", true],
48920
48943
  ["order", 0]
48921
48944
  ]);
48922
- return Object.assign(component(id, defaults), { filter });
48945
+ const made = Object.assign(component(id, defaults), { filter });
48946
+ if (typeof __MOKU_GAME_DEV__ !== "undefined" && __MOKU_GAME_DEV__) madeFilters.set(id, made);
48947
+ return made;
48923
48948
  }
48924
48949
  //#endregion
48925
48950
  //#region src/plugins/effects/filters/glow-glsl.ts
@@ -53611,10 +53636,12 @@ function registerEmitters(ectx) {
53611
53636
  }
53612
53637
  /**
53613
53638
  * Registers the filter kinds: the built-ins first, then the `filters` of every feature in
53614
- * feature order. The order is each kind's `index`, the tie-break of the filters on a view.
53639
+ * feature order. The order is each kind's `index`, the tie-break of the filters on a view. An entry
53640
+ * that is the same component as one already read is skipped, so two features may list one member of
53641
+ * the effect set; the first feature's place sets its index.
53615
53642
  *
53616
53643
  * @param ectx - Domain context of the effects plugin.
53617
- * @throws {Error} When a filter id is registered twice or is the id of a built-in.
53644
+ * @throws {Error} When two components take one filter id, or one takes the id of a built-in.
53618
53645
  */
53619
53646
  function registerKinds(ectx) {
53620
53647
  const builtIns = builtInKinds();
@@ -53622,6 +53649,7 @@ function registerKinds(ectx) {
53622
53649
  for (const entry of featureEntries(ectx, "filters")) {
53623
53650
  const id = entry.filter.id;
53624
53651
  if (builtIns.some((kind) => kind.id === id)) throw new Error(`[game] Filter "${id}" is built in.\n Choose another id.`);
53652
+ if (entries.some((kind) => kind.component === entry)) continue;
53625
53653
  if (entries.some((kind) => kind.id === id)) throw new Error(`[game] Filter "${id}" is registered twice.\n Keep one defineFilter per id.`);
53626
53654
  entries.push({
53627
53655
  id,
@@ -53665,6 +53693,40 @@ function openWorld(ectx, kinds) {
53665
53693
  const ecs = ectx.deps.world.ecs;
53666
53694
  ectx.state.removers.push(ecs.system(createParticleSystem(ectx)), ecs.system(createOrphanSystem(ectx)), ecs.system(createFilterSystem(ectx)), ecs.onRemoved(Emitter, (entity) => forgetEmitter(ectx, entity)), ...kinds.map((kind) => ecs.onRemoved(kind.component, (entity) => forgetFilter(ectx, kind, entity))), ...kinds.map((kind) => ecs.onAdded(kind.component, (entity) => trackFilter(ectx, kind, entity))));
53667
53695
  for (const kind of kinds) for (const [entity] of ecs.query(kind.component)) trackFilter(ectx, kind, entity);
53696
+ if (typeof __MOKU_GAME_DEV__ !== "undefined" && __MOKU_GAME_DEV__) watchUnlisted(ectx);
53697
+ }
53698
+ /**
53699
+ * Watches every filter `defineFilter` made that no kind holds: a view that gets one draws unfiltered, so the first
53700
+ * such view of each id warns `effects:filter-unlisted`. An id the world holds under another object is skipped: a
53701
+ * second object of a known name would throw "defined twice". Dev builds only.
53702
+ *
53703
+ * @param ectx - Domain context of the effects plugin.
53704
+ */
53705
+ function watchUnlisted(ectx) {
53706
+ const { ecs } = ectx.deps.world;
53707
+ for (const [id, component] of filtersMade()) {
53708
+ const known = ecs.typeOf(id);
53709
+ const heldByOther = known !== void 0 && !Object.is(known, component);
53710
+ if (ectx.state.kinds.has(id) || heldByOther) continue;
53711
+ ectx.state.removers.push(ecs.onAdded(component, (entity) => warnUnlisted(ectx, id, entity)));
53712
+ }
53713
+ }
53714
+ /**
53715
+ * Warns once per id that a view carries a filter no feature lists.
53716
+ *
53717
+ * @param ectx - Domain context of the effects plugin.
53718
+ * @param id - The filter id.
53719
+ * @param entity - The view that got it.
53720
+ */
53721
+ function warnUnlisted(ectx, id, entity) {
53722
+ const key = `unlisted:${id}`;
53723
+ if (ectx.state.warned.has(key)) return;
53724
+ ectx.state.warned.add(key);
53725
+ ectx.log.warn("effects:filter-unlisted", {
53726
+ filter: id,
53727
+ entity,
53728
+ hint: `Filter "${id}" is on a view but no feature lists it in filters`
53729
+ });
53668
53730
  }
53669
53731
  /**
53670
53732
  * Starts the plugin in `onStart`. The teardown closure goes first into `state.removers`, because
@@ -74299,6 +74361,481 @@ function cubicBezier(x1, y1, x2, y2) {
74299
74361
  return (t) => progressAt(table, t);
74300
74362
  }
74301
74363
  //#endregion
74364
+ //#region src/plugins/effects/set/head.ts
74365
+ /**
74366
+ * @file effects/set — the set head: the WGSL and GLSL the engine's effect set puts before every member's body. Four
74367
+ * helpers: `inputPlace(uv)`, where the pixel is in its input frame (0..1 on each axis, the padded frame Pixi hands the
74368
+ * filter), and `sampleInput(n)`, the input read at such a place, inside the clamp; `inputFrame()`, the size of that
74369
+ * frame in CSS px, for a padded member that maps its content box; and `setHash(cell)`, the integer hash of `Dissolve`.
74370
+ * They read the input's own uniforms (`uInputClamp`, `uInputPixel`, `uInputSize`), never the screen, so a member stays
74371
+ * `"local"`; and the clamp is half a texel in from the frame in a live pass and from the whole picture on the quad of
74372
+ * stage 2 (`shade.ts`), so one body draws the same in both. A game's body does not get them. Pure strings.
74373
+ */
74374
+ /**
74375
+ * The WGSL head of every member: `inputPlace(uv)` and `sampleInput(n)` over the filter's input, `inputFrame()` and
74376
+ * `setHash(cell)`. `textureSampleLevel`, so a member may read its input inside a branch. `inputFrame()` is the clamp's
74377
+ * span plus one texel, times the texture's CSS size: live the frame is a share of a pooled texture and `uInputSize` is
74378
+ * the texture's, on the quad the frame is the whole picture; both give the frame. `setHash` is a 32-bit integer hash of
74379
+ * a cell, 0 up to 1 (24 bits): integers wrap the same on every GPU, so WebGL and WebGPU dissolve the same cells.
74380
+ */
74381
+ const SET_WGSL = `fn inputPlace(uv: vec2<f32>) -> vec2<f32> {
74382
+ return (uv - gfu.uInputClamp.xy) / (gfu.uInputClamp.zw - gfu.uInputClamp.xy);
74383
+ }
74384
+
74385
+ fn sampleInput(n: vec2<f32>) -> vec4<f32> {
74386
+ return textureSampleLevel(uTexture, uSampler, mix(gfu.uInputClamp.xy, gfu.uInputClamp.zw, clamp(n, vec2<f32>(0.0), vec2<f32>(1.0))), 0.0);
74387
+ }
74388
+
74389
+ fn inputFrame() -> vec2<f32> {
74390
+ return (gfu.uInputClamp.zw - gfu.uInputClamp.xy + gfu.uInputPixel.zw) * gfu.uInputSize.xy;
74391
+ }
74392
+
74393
+ fn setHash(cell: vec2<f32>) -> f32 {
74394
+ let q = vec2<u32>(vec2<i32>(cell));
74395
+ var h = (q.x * 1597334677u) ^ (q.y * 3812015801u);
74396
+ h = (h ^ (h >> 16u)) * 2246822519u;
74397
+ h = h ^ (h >> 13u);
74398
+ return f32(h >> 8u) / 16777216.0;
74399
+ }
74400
+
74401
+ `;
74402
+ /**
74403
+ * The GLSL twin of `SET_WGSL`: the same four helpers over `uInputClamp`, `uInputPixel`, `uInputSize` and `uTexture` of
74404
+ * the GLSL header. The hash's integers are `highp`: the default of a fragment stage is `mediump`, 16 bits on a phone.
74405
+ */
74406
+ const SET_GLSL = `vec2 inputPlace(vec2 uv) {
74407
+ return (uv - uInputClamp.xy) / (uInputClamp.zw - uInputClamp.xy);
74408
+ }
74409
+
74410
+ vec4 sampleInput(vec2 n) {
74411
+ return textureLod(uTexture, mix(uInputClamp.xy, uInputClamp.zw, clamp(n, 0.0, 1.0)), 0.0);
74412
+ }
74413
+
74414
+ vec2 inputFrame() {
74415
+ return (uInputClamp.zw - uInputClamp.xy + uInputPixel.zw) * uInputSize.xy;
74416
+ }
74417
+
74418
+ float setHash(vec2 cell) {
74419
+ highp uvec2 q = uvec2(ivec2(cell));
74420
+ highp uint h = (q.x * 1597334677u) ^ (q.y * 3812015801u);
74421
+ h = (h ^ (h >> 16u)) * 2246822519u;
74422
+ h = h ^ (h >> 13u);
74423
+ return float(h >> 8u) / 16777216.0;
74424
+ }
74425
+
74426
+ `;
74427
+ /**
74428
+ * A member's WGSL body with the set head before it. A call, so a bundle that drops the member drops the text too: a
74429
+ * concatenation at module scope would stay, its strings with it.
74430
+ *
74431
+ * @param body - The member's WGSL body.
74432
+ * @returns The head, then the body.
74433
+ * @example
74434
+ * ```ts
74435
+ * withSetWgsl("@fragment fn mainFragment").startsWith("fn inputPlace("); // true
74436
+ * ```
74437
+ */
74438
+ function withSetWgsl(body) {
74439
+ return SET_WGSL + body;
74440
+ }
74441
+ /**
74442
+ * A member's GLSL body with the set head before it, for the same reason as `withSetWgsl`.
74443
+ *
74444
+ * @param body - The member's GLSL body.
74445
+ * @returns The head, then the body.
74446
+ * @example
74447
+ * ```ts
74448
+ * withSetGlsl("void main() {}").startsWith("vec2 inputPlace("); // true
74449
+ * ```
74450
+ */
74451
+ function withSetGlsl(body) {
74452
+ return SET_GLSL + body;
74453
+ }
74454
+ /**
74455
+ * A view eaten away by a noise of `scale` cells across: `progress` 0 keeps all of it, 1 none, and the edge of what is
74456
+ * left glows in `edgeColor` over `edge` (0..1 of the noise). The noise has no time: the same cells go first at every
74457
+ * run, on WebGPU and WebGL alike. For a piece that burns away, a card that crumbles. List it in a feature's
74458
+ * `filters`, as a game's own filter. One render pass, one sample of the input; on WebGPU a tween draws on the view's
74459
+ * own quad, no pass, from its third frame.
74460
+ *
74461
+ * @example
74462
+ * ```ts
74463
+ * // A cleared piece burns away with a white rim.
74464
+ * Dissolve({ progress: 0.5 }).value.edge; // 0.08
74465
+ * view.tween(Dissolve, { progress: 1 }, { ms: 600 });
74466
+ * ```
74467
+ */
74468
+ const Dissolve = /*#__PURE__*/ defineFilter("effects.dissolve", {
74469
+ wgsl: /* @__PURE__ */ withSetWgsl(`@fragment
74470
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74471
+ let n = inputPlace(uv);
74472
+ let c = sampleInput(n);
74473
+ let g = n * max(fu.scale, 1.0);
74474
+ let cell = floor(g);
74475
+ let w = smoothstep(vec2<f32>(0.0), vec2<f32>(1.0), fract(g));
74476
+ let top = mix(setHash(cell), setHash(cell + vec2<f32>(1.0, 0.0)), w.x);
74477
+ let bottom = mix(setHash(cell + vec2<f32>(0.0, 1.0)), setHash(cell + vec2<f32>(1.0, 1.0)), w.x);
74478
+ let grain = mix(top, bottom, w.y);
74479
+ let rim = max(fu.edge, 1e-4);
74480
+ let e = mix(-rim, 1.0 + rim, clamp(fu.progress, 0.0, 1.0));
74481
+ let keep = smoothstep(e - rim, e, grain);
74482
+ let glow = 1.0 - smoothstep(e, e + rim, grain);
74483
+
74484
+ return vec4<f32>(mix(c.rgb, fu.edgeColor * c.a, glow), c.a) * keep;
74485
+ }
74486
+ `),
74487
+ glsl: /* @__PURE__ */ withSetGlsl(`void main() {
74488
+ vec2 n = inputPlace(vTextureCoord);
74489
+ vec4 c = sampleInput(n);
74490
+ vec2 g = n * max(scale, 1.0);
74491
+ vec2 cell = floor(g);
74492
+ vec2 w = smoothstep(vec2(0.0), vec2(1.0), fract(g));
74493
+ float top = mix(setHash(cell), setHash(cell + vec2(1.0, 0.0)), w.x);
74494
+ float bottom = mix(setHash(cell + vec2(0.0, 1.0)), setHash(cell + vec2(1.0, 1.0)), w.x);
74495
+ float grain = mix(top, bottom, w.y);
74496
+ float rim = max(edge, 1e-4);
74497
+ float e = mix(-rim, 1.0 + rim, clamp(progress, 0.0, 1.0));
74498
+ float keep = smoothstep(e - rim, e, grain);
74499
+ float glow = 1.0 - smoothstep(e, e + rim, grain);
74500
+
74501
+ finalColor = vec4(mix(c.rgb, edgeColor * c.a, glow), c.a) * keep;
74502
+ }
74503
+ `),
74504
+ uniforms: {
74505
+ progress: 0,
74506
+ scale: 8,
74507
+ edge: .08,
74508
+ edgeColor: { color: 16777215 }
74509
+ }
74510
+ });
74511
+ /**
74512
+ * A view washed with `color` by `amount`: 0 draws the view as it is, 1 draws its shape in `color`, its alpha kept.
74513
+ * For a hit, a pick, a merge: tween `amount` up and down. List it in a feature's `filters`, as a game's own filter.
74514
+ * One render pass, one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
74515
+ *
74516
+ * @example
74517
+ * ```ts
74518
+ * // features/board/feature.ts lists it: filters: [Flash]. A merged piece flashes gold, then a motion fades it out.
74519
+ * Flash({ amount: 1, color: 0xffd700 }).value; // { amount: 1, color: 0xffd700, enabled: true, order: 0 }
74520
+ * view.tween(Flash, { amount: 0 }, { ms: 160 });
74521
+ * ```
74522
+ */
74523
+ const Flash = /*#__PURE__*/ defineFilter("effects.flash", {
74524
+ wgsl: /* @__PURE__ */ withSetWgsl(`@fragment
74525
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74526
+ let c = sampleInput(inputPlace(uv));
74527
+
74528
+ return mix(c, vec4<f32>(fu.color * c.a, c.a), clamp(fu.amount, 0.0, 1.0));
74529
+ }
74530
+ `),
74531
+ glsl: /* @__PURE__ */ withSetGlsl(`void main() {
74532
+ vec4 c = sampleInput(inputPlace(vTextureCoord));
74533
+
74534
+ finalColor = mix(c, vec4(color * c.a, c.a), clamp(amount, 0.0, 1.0));
74535
+ }
74536
+ `),
74537
+ uniforms: {
74538
+ amount: 0,
74539
+ color: { color: 16777215 }
74540
+ }
74541
+ });
74542
+ /**
74543
+ * A view turned by `angle` radians about its vertical axis (`axis: 0`) or its horizontal one (`axis: 1`), as a card or
74544
+ * an order row flips: at a quarter turn it is edge-on, at a half turn it shows its back, unmirrored and darkened by
74545
+ * `shade` (0..1). `perspective` (0..1) leans it: the side that goes away shrinks, to `1 − perspective` of its height at
74546
+ * a quarter turn, while the near side keeps its size, so the view never grows past its box. The view is padded by 8 px.
74547
+ * For a card flip, a row that turns to its next order. List it in a feature's `filters`, as a game's own filter. One
74548
+ * render pass, one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
74549
+ *
74550
+ * @example
74551
+ * ```ts
74552
+ * // An order row flips about its horizontal axis to show its next order.
74553
+ * Fold({ axis: 1 }).value.axis; // 1
74554
+ * view.tween(Fold, { angle: Math.PI }, { ms: 320 });
74555
+ * ```
74556
+ */
74557
+ const Fold = /*#__PURE__*/ defineFilter("effects.fold", {
74558
+ wgsl: /* @__PURE__ */ withSetWgsl(`const FOLD_PADDING: f32 = 8.0;
74559
+
74560
+ @fragment
74561
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74562
+ let n = inputPlace(uv);
74563
+ let s = inputFrame();
74564
+ let q = (n * s - FOLD_PADDING) / (s - 2.0 * FOLD_PADDING);
74565
+ let a = step(0.5, fu.axis);
74566
+ let u = mix(q.x, q.y, a);
74567
+ let v = mix(q.y, q.x, a);
74568
+ let su = 0.5 + (u - 0.5) / max(abs(cos(fu.angle)), 0.02);
74569
+ let lean = 1.0 - clamp(fu.perspective, 0.0, 1.0) * (0.5 * abs(sin(fu.angle)) - sin(fu.angle) * (su - 0.5));
74570
+ let sv = 0.5 + (v - 0.5) / max(lean, 0.05);
74571
+ let place = mix(vec2<f32>(su, sv), vec2<f32>(sv, su), a);
74572
+ let inside = step(0.0, place.x) * step(place.x, 1.0) * step(0.0, place.y) * step(place.y, 1.0);
74573
+ let c = sampleInput((place * (s - 2.0 * FOLD_PADDING) + FOLD_PADDING) / s);
74574
+ let dark = 1.0 - clamp(fu.shade, 0.0, 1.0) * max(-cos(fu.angle), 0.0);
74575
+
74576
+ return vec4<f32>(c.rgb * dark, c.a) * inside;
74577
+ }
74578
+ `),
74579
+ glsl: /* @__PURE__ */ withSetGlsl(`const float FOLD_PADDING = 8.0;
74580
+
74581
+ void main() {
74582
+ vec2 n = inputPlace(vTextureCoord);
74583
+ vec2 s = inputFrame();
74584
+ vec2 q = (n * s - FOLD_PADDING) / (s - 2.0 * FOLD_PADDING);
74585
+ float a = step(0.5, axis);
74586
+ float u = mix(q.x, q.y, a);
74587
+ float v = mix(q.y, q.x, a);
74588
+ float su = 0.5 + (u - 0.5) / max(abs(cos(angle)), 0.02);
74589
+ float lean = 1.0 - clamp(perspective, 0.0, 1.0) * (0.5 * abs(sin(angle)) - sin(angle) * (su - 0.5));
74590
+ float sv = 0.5 + (v - 0.5) / max(lean, 0.05);
74591
+ vec2 place = mix(vec2(su, sv), vec2(sv, su), a);
74592
+ float inside = step(0.0, place.x) * step(place.x, 1.0) * step(0.0, place.y) * step(place.y, 1.0);
74593
+ vec4 c = sampleInput((place * (s - 2.0 * FOLD_PADDING) + FOLD_PADDING) / s);
74594
+ float dark = 1.0 - clamp(shade, 0.0, 1.0) * max(-cos(angle), 0.0);
74595
+
74596
+ finalColor = vec4(c.rgb * dark, c.a) * inside;
74597
+ }
74598
+ `),
74599
+ uniforms: {
74600
+ angle: 0,
74601
+ axis: 0,
74602
+ perspective: .5,
74603
+ shade: .4
74604
+ },
74605
+ padding: 8
74606
+ });
74607
+ /**
74608
+ * A colour grade of a view: `contrast` about the middle grey, then `brightness`, then `saturation` against the luma,
74609
+ * then a multiply by `tint`. Each number is 1 for no change, 0..2; `saturation: 0` is grey. The alpha is kept. In place
74610
+ * of `ColorMatrix` where a value moves: on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
74611
+ * List it in a feature's `filters`, as a game's own filter. One render pass, one sample.
74612
+ *
74613
+ * @example
74614
+ * ```ts
74615
+ * // A locked level card goes grey, and a kept picture holds it: a still view pays no pass.
74616
+ * Grade({ saturation: 0 }).value.saturation; // 0
74617
+ * Grade.filter.cache; // "local"
74618
+ * ```
74619
+ */
74620
+ const Grade = /*#__PURE__*/ defineFilter("effects.grade", {
74621
+ wgsl: /* @__PURE__ */ withSetWgsl(`const GRADE_LUMA = vec3<f32>(0.2126, 0.7152, 0.0722);
74622
+
74623
+ @fragment
74624
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74625
+ let c = sampleInput(inputPlace(uv));
74626
+ var rgb = c.rgb / max(c.a, 1e-6);
74627
+
74628
+ rgb = (rgb - 0.5) * fu.contrast + 0.5;
74629
+ rgb = rgb * fu.brightness;
74630
+ rgb = mix(vec3<f32>(dot(rgb, GRADE_LUMA)), rgb, fu.saturation);
74631
+ rgb = clamp(rgb * fu.tint, vec3<f32>(0.0), vec3<f32>(1.0));
74632
+
74633
+ return vec4<f32>(rgb * c.a, c.a);
74634
+ }
74635
+ `),
74636
+ glsl: /* @__PURE__ */ withSetGlsl(`const vec3 GRADE_LUMA = vec3(0.2126, 0.7152, 0.0722);
74637
+
74638
+ void main() {
74639
+ vec4 c = sampleInput(inputPlace(vTextureCoord));
74640
+ vec3 rgb = c.rgb / max(c.a, 1e-6);
74641
+
74642
+ rgb = (rgb - 0.5) * contrast + 0.5;
74643
+ rgb = rgb * brightness;
74644
+ rgb = mix(vec3(dot(rgb, GRADE_LUMA)), rgb, saturation);
74645
+ rgb = clamp(rgb * tint, vec3(0.0), vec3(1.0));
74646
+
74647
+ finalColor = vec4(rgb * c.a, c.a);
74648
+ }
74649
+ `),
74650
+ uniforms: {
74651
+ brightness: 1,
74652
+ contrast: 1,
74653
+ saturation: 1,
74654
+ tint: { color: 16777215 }
74655
+ }
74656
+ });
74657
+ /**
74658
+ * A view shown up to a straight line that sweeps across it: `progress` 0 hides all of it, 1 shows all of it, the line
74659
+ * at `angle` radians (0 sweeps from the left, `Math.PI / 2` from the top) with an edge `soft` wide. The angle is in the
74660
+ * view's own 0..1 frame, so `Math.PI / 4` sweeps from one corner to the opposite one on a view of any shape. For a wipe
74661
+ * in or out of a card, a panel, a picture. List it in a feature's `filters`, as a game's own filter. One render pass,
74662
+ * one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
74663
+ *
74664
+ * @example
74665
+ * ```ts
74666
+ * // A level card wipes in from the top: it starts hidden, and a motion tweens progress to 1.
74667
+ * RevealLine({ angle: Math.PI / 2 }).value.progress; // 0
74668
+ * view.tween(RevealLine, { progress: 1 }, { ms: 400 });
74669
+ * ```
74670
+ */
74671
+ const RevealLine = /*#__PURE__*/ defineFilter("effects.revealLine", {
74672
+ wgsl: /* @__PURE__ */ withSetWgsl(`@fragment
74673
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74674
+ let n = inputPlace(uv);
74675
+ let c = sampleInput(n);
74676
+ let dir = vec2<f32>(cos(fu.angle), sin(fu.angle));
74677
+ let reach = 0.5 * (abs(dir.x) + abs(dir.y));
74678
+ let p = ((n.x - 0.5) * dir.x + (n.y - 0.5) * dir.y + reach) / (2.0 * reach);
74679
+ let fade = max(fu.soft, 1e-4);
74680
+ let e = mix(-fade, 1.0 + fade, clamp(fu.progress, 0.0, 1.0));
74681
+
74682
+ return c * (1.0 - smoothstep(e - fade, e + fade, p));
74683
+ }
74684
+ `),
74685
+ glsl: /* @__PURE__ */ withSetGlsl(`void main() {
74686
+ vec2 n = inputPlace(vTextureCoord);
74687
+ vec4 c = sampleInput(n);
74688
+ vec2 dir = vec2(cos(angle), sin(angle));
74689
+ float reach = 0.5 * (abs(dir.x) + abs(dir.y));
74690
+ float p = ((n.x - 0.5) * dir.x + (n.y - 0.5) * dir.y + reach) / (2.0 * reach);
74691
+ float fade = max(soft, 1e-4);
74692
+ float e = mix(-fade, 1.0 + fade, clamp(progress, 0.0, 1.0));
74693
+
74694
+ finalColor = c * (1.0 - smoothstep(e - fade, e + fade, p));
74695
+ }
74696
+ `),
74697
+ uniforms: {
74698
+ progress: 0,
74699
+ angle: 0,
74700
+ soft: .05
74701
+ }
74702
+ });
74703
+ /**
74704
+ * A view shown inside a disc around the point `x`, `y`: `radius: 0` hides all of it, and from about 0.75 a disc at the
74705
+ * centre shows every corner (1.5 shows all of it from any point). The edge fades over `soft` and waves by `wobble`
74706
+ * (0..0.2). The point and the lengths are in 0..1 of the view on each axis, so on a view twice as wide as tall the disc
74707
+ * is an ellipse. It hides the outside by alpha and declares no `area`: the view's fill is still paid. List it in a
74708
+ * feature's `filters`, as a game's own filter. One render pass, one sample; on WebGPU a tween draws on the view's own
74709
+ * quad, no pass, from its third frame.
74710
+ *
74711
+ * @example
74712
+ * ```ts
74713
+ * // A lens opens over the map: the window starts closed and grows to show the whole view.
74714
+ * RevealRound({ wobble: 0.04 }).value.radius; // 0
74715
+ * view.tween(RevealRound, { radius: 1.2 }, { ms: 640 });
74716
+ * ```
74717
+ */
74718
+ const RevealRound = /*#__PURE__*/ defineFilter("effects.revealRound", {
74719
+ wgsl: /* @__PURE__ */ withSetWgsl(`@fragment
74720
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74721
+ let n = inputPlace(uv);
74722
+ let c = sampleInput(n);
74723
+ let wave = fu.wobble * sin(n.x * 37.0 + n.y * 23.0);
74724
+ let d = max(distance(n, vec2<f32>(fu.x, fu.y)) + wave, 0.0);
74725
+ let fade = max(fu.soft, 1e-4);
74726
+
74727
+ return c * (1.0 - smoothstep(fu.radius - fade, fu.radius, d));
74728
+ }
74729
+ `),
74730
+ glsl: /* @__PURE__ */ withSetGlsl(`void main() {
74731
+ vec2 n = inputPlace(vTextureCoord);
74732
+ vec4 c = sampleInput(n);
74733
+ float wave = wobble * sin(n.x * 37.0 + n.y * 23.0);
74734
+ float d = max(distance(n, vec2(x, y)) + wave, 0.0);
74735
+ float fade = max(soft, 1e-4);
74736
+
74737
+ finalColor = c * (1.0 - smoothstep(radius - fade, radius, d));
74738
+ }
74739
+ `),
74740
+ uniforms: {
74741
+ x: .5,
74742
+ y: .5,
74743
+ radius: 0,
74744
+ soft: .05,
74745
+ wobble: 0
74746
+ }
74747
+ });
74748
+ /**
74749
+ * A band of light across a view: `position` is where the band stands along its sweep, -0.5 before the view and 1.5 past
74750
+ * it, so a tween from one to the other sweeps it across once; `width` is how far from its line the band reaches (0..1
74751
+ * of the sweep), `angle` its direction in radians in the view's own 0..1 frame, `strength` how much light it adds. Light
74752
+ * is added to the colour only: the transparent pixels around the view's shape stay transparent. For a glint on a
74753
+ * reward, a card, a button. List it in a feature's `filters`, as a game's own filter. One render pass, one sample; on
74754
+ * WebGPU a tween draws on the view's own quad, no pass, from its third frame.
74755
+ *
74756
+ * @example
74757
+ * ```ts
74758
+ * // A new reward glints once: the band sweeps across it in half a second.
74759
+ * Shine().value.position; // -0.5
74760
+ * view.tween(Shine, { position: 1.5 }, { ms: 500 });
74761
+ * ```
74762
+ */
74763
+ const Shine = /*#__PURE__*/ defineFilter("effects.shine", {
74764
+ wgsl: /* @__PURE__ */ withSetWgsl(`@fragment
74765
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74766
+ let n = inputPlace(uv);
74767
+ let c = sampleInput(n);
74768
+ let dir = vec2<f32>(cos(fu.angle), sin(fu.angle));
74769
+ let reach = 0.5 * (abs(dir.x) + abs(dir.y));
74770
+ let p = ((n.x - 0.5) * dir.x + (n.y - 0.5) * dir.y + reach) / (2.0 * reach);
74771
+ let band = 1.0 - smoothstep(0.0, max(fu.width, 1e-4), abs(p - fu.position));
74772
+ let light = max(fu.strength, 0.0) * band * c.a;
74773
+
74774
+ return vec4<f32>(min(c.rgb + vec3<f32>(light), vec3<f32>(c.a)), c.a);
74775
+ }
74776
+ `),
74777
+ glsl: /* @__PURE__ */ withSetGlsl(`void main() {
74778
+ vec2 n = inputPlace(vTextureCoord);
74779
+ vec4 c = sampleInput(n);
74780
+ vec2 dir = vec2(cos(angle), sin(angle));
74781
+ float reach = 0.5 * (abs(dir.x) + abs(dir.y));
74782
+ float p = ((n.x - 0.5) * dir.x + (n.y - 0.5) * dir.y + reach) / (2.0 * reach);
74783
+ float band = 1.0 - smoothstep(0.0, max(width, 1e-4), abs(p - position));
74784
+ float light = max(strength, 0.0) * band * c.a;
74785
+
74786
+ finalColor = vec4(min(c.rgb + vec3(light), vec3(c.a)), c.a);
74787
+ }
74788
+ `),
74789
+ uniforms: {
74790
+ position: -.5,
74791
+ width: .2,
74792
+ angle: .6,
74793
+ strength: .6
74794
+ }
74795
+ });
74796
+ /**
74797
+ * A view darkened outside a disc: inside `radius` of the point `x`, `y` it is drawn as it is, from there over `soft` it
74798
+ * fades to `color`, by `amount`. The point and the lengths are in 0..1 of the view on each axis, so on a view twice as
74799
+ * wide as tall the disc is an ellipse. The alpha is kept. List it in a feature's `filters`, as a game's own filter. One
74800
+ * render pass, one sample; on WebGPU a tween draws on the view's own quad, no pass, from its third frame.
74801
+ *
74802
+ * @example
74803
+ * ```ts
74804
+ * // A dream scene closes in at the edges, then the vignette fades away as the player wakes.
74805
+ * Vignette({ radius: 0.3, soft: 0.4 }).value.amount; // 1
74806
+ * view.tween(Vignette, { amount: 0 }, { ms: 300 });
74807
+ * ```
74808
+ */
74809
+ const Vignette = /*#__PURE__*/ defineFilter("effects.vignette", {
74810
+ wgsl: /* @__PURE__ */ withSetWgsl(`@fragment
74811
+ fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
74812
+ let n = inputPlace(uv);
74813
+ let c = sampleInput(n);
74814
+ let d = distance(n, vec2<f32>(fu.x, fu.y));
74815
+ let v = smoothstep(fu.radius, fu.radius + max(fu.soft, 1e-4), d) * clamp(fu.amount, 0.0, 1.0);
74816
+
74817
+ return vec4<f32>(mix(c.rgb, fu.color * c.a, v), c.a);
74818
+ }
74819
+ `),
74820
+ glsl: /* @__PURE__ */ withSetGlsl(`void main() {
74821
+ vec2 n = inputPlace(vTextureCoord);
74822
+ vec4 c = sampleInput(n);
74823
+ float d = distance(n, vec2(x, y));
74824
+ float v = smoothstep(radius, radius + max(soft, 1e-4), d) * clamp(amount, 0.0, 1.0);
74825
+
74826
+ finalColor = vec4(mix(c.rgb, color * c.a, v), c.a);
74827
+ }
74828
+ `),
74829
+ uniforms: {
74830
+ x: .5,
74831
+ y: .5,
74832
+ radius: .5,
74833
+ soft: .25,
74834
+ color: { color: 0 },
74835
+ amount: 1
74836
+ }
74837
+ });
74838
+ //#endregion
74302
74839
  //#region src/index.ts
74303
74840
  /**
74304
74841
  * The `@moku-labs/game` package — 2D puzzle game engine on Moku Core.
@@ -74515,4 +75052,4 @@ const screen = [
74515
75052
  uiPlugin
74516
75053
  ];
74517
75054
  //#endregion
74518
- export { sfx as $, worldPlugin as $t, types_exports$10 as A, Glow as At, defineMotion as B, Animation as Bt, types_exports$3 as C, messageDuration as Ct, types_exports$7 as D, Blur as Dt, types_exports$6 as E, Alpha as Et, types_exports$15 as F, audioPlugin as Ft, external as G, MONITOR_SECTIONS as Gt, platformPlugin as H, rendererPlugin as Ht, types_exports$16 as I, scenesPlugin as It, mark as J, PERF_LOG_VERSION as Jt, frames as K, PERF_CAUSES as Kt, types_exports$17 as L, assetsPlugin as Lt, types_exports$12 as M, Outline as Mt, types_exports$13 as N, defineFilter as Nt, types_exports$8 as O, ColorMatrix as Ot, types_exports$14 as P, debugPlugin as Pt, set as Q, DEMAND_REASONS as Qt, uiPlugin as R, animPlugin as Rt, types_exports$2 as S, messageArgument as St, types_exports$5 as T, Emitter as Tt, HAPTIC_KINDS as U, PASS_KINDS as Ut, textPlugin as V, Frames as Vt, defineAnimation as W, frameAt as Wt, play$1 as X, SHADER_WHATS as Xt, parallel as Y, PROBLEM_RULES as Yt, sequence as Z, CANVAS_RESTARTS as Zt, defineBundles as _, Tappable as _t, cubicBezier as a, to as an, use as at, types_exports as b, Traced as bt, hint as c, SaveUnreadableError as cn, Draggable as ct, defineScene as d, clockPlugin as dn, Hovered as dt, flowPlugin as en, spawn as et, tr as f, Pointer as ft, music as g, Swipeable as gt, defineEmitter as h, Pressed as ht, screen as i, slot as in, tween as it, types_exports$11 as j, Noise as jt, types_exports$9 as k, Displacement as kt, schedule as l, lifecyclePlugin as ln, DropTarget as lt, flattenFeatures as m, Pressable as mt, createPlugin as n, contribution as nn, stagger as nt, defineEffect as o, type as on, wait as ot, defineFeature as p, PointerOver as pt, haptic as q, PERF_GAP_BUCKETS as qt, defineGame as r, exit as rn, stopSfx as rt, guide as s, modelPlugin as sn, inputPlugin as st, createApp as t, refuseStart as tn, spawned as tt, projection as u, timePlugin as un, Held as ut, load as v, Touchable as vt, types_exports$4 as w, effectsPlugin as wt, types_exports$1 as x, i18nPlugin as xt, ready as y, Traceable as yt, resolve as z, AnimPlayer as zt };
75055
+ export { external as $, MONITOR_SECTIONS as $t, types_exports$2 as A, messageArgument as At, types_exports$12 as B, Outline as Bt, defineEmitter as C, Pressed as Ct, ready as D, Traceable as Dt, load as E, Touchable as Et, types_exports$7 as F, Blur as Ft, types_exports$17 as G, assetsPlugin as Gt, types_exports$14 as H, debugPlugin as Ht, types_exports$8 as I, ColorMatrix as It, defineMotion as J, Animation as Jt, uiPlugin as K, animPlugin as Kt, types_exports$9 as L, Displacement as Lt, types_exports$4 as M, effectsPlugin as Mt, types_exports$5 as N, Emitter as Nt, types_exports as O, Traced as Ot, types_exports$6 as P, Alpha as Pt, defineAnimation as Q, frameAt as Qt, types_exports$10 as R, Glow as Rt, flattenFeatures as S, Pressable as St, defineBundles as T, Tappable as Tt, types_exports$15 as U, audioPlugin as Ut, types_exports$13 as V, defineFilter as Vt, types_exports$16 as W, scenesPlugin as Wt, platformPlugin as X, rendererPlugin as Xt, textPlugin as Y, Frames as Yt, HAPTIC_KINDS as Z, PASS_KINDS as Zt, schedule as _, lifecyclePlugin as _n, DropTarget as _t, Vignette as a, CANVAS_RESTARTS as an, sequence as at, tr as b, Pointer as bt, RevealLine as c, flowPlugin as cn, spawn as ct, Flash as d, exit as dn, stopSfx as dt, PERF_CAUSES as en, frames as et, Dissolve as f, slot as fn, tween as ft, hint as g, SaveUnreadableError as gn, Draggable as gt, guide as h, modelPlugin as hn, inputPlugin as ht, screen as i, SHADER_WHATS as in, play$1 as it, types_exports$3 as j, messageDuration as jt, types_exports$1 as k, i18nPlugin as kt, Grade as l, refuseStart as ln, spawned as lt, defineEffect as m, type as mn, wait as mt, createPlugin as n, PERF_LOG_VERSION as nn, mark as nt, Shine as o, DEMAND_REASONS as on, set as ot, cubicBezier as p, to as pn, use as pt, resolve as q, AnimPlayer as qt, defineGame as r, PROBLEM_RULES as rn, parallel as rt, RevealRound as s, worldPlugin as sn, sfx as st, createApp as t, PERF_GAP_BUCKETS as tn, haptic as tt, Fold as u, contribution as un, stagger as ut, projection as v, timePlugin as vn, Held as vt, music as w, Swipeable as wt, defineFeature as x, PointerOver as xt, defineScene as y, clockPlugin as yn, Hovered as yt, types_exports$11 as z, Noise as zt };
@@ -1,6 +1,6 @@
1
1
  import { An as FeaturePlugin, Hn as Descriptor, Hr as Json, Ir as FakeClock, Kn as Hint, Mn as AnyFlow, Pr as ClockSource, Rn as NodeTable, qn as NodeFx } from "./types-qCcSw8YI.mjs";
2
- import { t as createApp } from "./index-U_AN5j0L.mjs";
3
- import { b as memory, x as saveOf, y as WithGameState } from "./types-Brsj29M-.mjs";
2
+ import { t as createApp } from "./index-aU0FlLL6.mjs";
3
+ import { b as memory, x as saveOf, y as WithGameState } from "./types-BBRC69WT.mjs";
4
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-Co3SEFi5.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
package/dist/testing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { m as flattenFeatures, on as type, rn as exit, t as createApp, tn as refuseStart } from "./src-C32BYdgi.mjs";
1
+ import { S as flattenFeatures, dn as exit, ln as refuseStart, mn as type, t as createApp } from "./src-DUt139Ds.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,7 +1,7 @@
1
1
  import { An as FeaturePlugin, Br as Config, Hr as Json, Ir as FakeClock, Jr as ProviderCall, Mn as AnyFlow, Pr as ClockSource, Q as Config$2, Qr as SnapshotOf, Vn as TypeTag, Yr as SaveDoc, a as Config$3, d as Manifest, ht as Orientation, mn as Config$1, n as AssetsIo, nt as PixiModule, qr as PlayerStateProvider } from "./types-qCcSw8YI.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-Cffn9Rbm.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-BsF8WS0c.mjs";
3
3
  import { H as I18nApi, J as TextKey, q as StringTable } from "./types-L3E-YS4N.mjs";
4
- import { Ct as effectsPlugin, Et as audioPlugin, gt as PlatformProvider, i as screen, mt as platformPlugin, t as createApp } from "./index-U_AN5j0L.mjs";
4
+ import { Pt as audioPlugin, St as platformPlugin, i as screen, jt as effectsPlugin, t as createApp, wt as PlatformProvider } from "./index-aU0FlLL6.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/model/store/providers/memory.d.ts
@@ -2241,8 +2241,149 @@ type EmitterInstance = {
2241
2241
  readonly space: "world" | "local"; /** Pixi's particle class, from the module the renderer loaded. */
2242
2242
  readonly particleClass: PixiModule["Particle"];
2243
2243
  };
2244
+ //#endregion
2245
+ //#region src/plugins/effects/set/types.d.ts
2246
+ /**
2247
+ * @file effects/set — the values of the members of the engine's effect set: one field per uniform, then `enabled` and
2248
+ * `order`, which every filter component carries. A number field is tweenable; a colour is a `0xrrggbb` number, set,
2249
+ * not tweened.
2250
+ */
2251
+ /**
2252
+ * `Flash`: the view washed with `color` by `amount`, 0 none, 1 all of it.
2253
+ *
2254
+ * @example
2255
+ * ```ts
2256
+ * const value: FlashValue = { amount: 1, color: 0xffd700, enabled: true, order: 0 };
2257
+ * ```
2258
+ */
2259
+ type FlashValue = {
2260
+ amount: number;
2261
+ color: number;
2262
+ enabled: boolean;
2263
+ order: number;
2264
+ };
2265
+ /**
2266
+ * `Grade`: contrast, brightness and saturation of the view, each 1 for none (0..2), then a multiply by `tint`.
2267
+ *
2268
+ * @example
2269
+ * ```ts
2270
+ * const value: GradeValue = { brightness: 1, contrast: 1, saturation: 0, tint: 0xffffff, enabled: true, order: 0 };
2271
+ * ```
2272
+ */
2273
+ type GradeValue = {
2274
+ brightness: number;
2275
+ contrast: number;
2276
+ saturation: number;
2277
+ tint: number;
2278
+ enabled: boolean;
2279
+ order: number;
2280
+ };
2281
+ /**
2282
+ * `Vignette`: the view darkened, or coloured, outside a disc around `x`, `y` (0..1 of the view) of `radius`, over a soft
2283
+ * edge `soft` wide, by `amount`.
2284
+ *
2285
+ * @example
2286
+ * ```ts
2287
+ * const value: VignetteValue = { x: 0.5, y: 0.5, radius: 0.3, soft: 0.4, color: 0x000000, amount: 1, enabled: true, order: 0 };
2288
+ * ```
2289
+ */
2290
+ type VignetteValue = {
2291
+ x: number;
2292
+ y: number;
2293
+ radius: number;
2294
+ soft: number;
2295
+ color: number;
2296
+ amount: number;
2297
+ enabled: boolean;
2298
+ order: number;
2299
+ };
2300
+ /**
2301
+ * `RevealLine`: the view shown up to a straight line that sweeps across it, `progress` 0 none of it, 1 all of it, the
2302
+ * line at `angle` (radians, in the view's own 0..1 frame), its edge `soft` wide.
2303
+ *
2304
+ * @example
2305
+ * ```ts
2306
+ * const value: RevealLineValue = { progress: 0.5, angle: Math.PI / 4, soft: 0.1, enabled: true, order: 0 };
2307
+ * ```
2308
+ */
2309
+ type RevealLineValue = {
2310
+ progress: number;
2311
+ angle: number;
2312
+ soft: number;
2313
+ enabled: boolean;
2314
+ order: number;
2315
+ };
2316
+ /**
2317
+ * `RevealRound`: the view shown inside a disc around `x`, `y` (0..1 of the view) of `radius`, its edge `soft` wide and
2318
+ * wavy by `wobble`.
2319
+ *
2320
+ * @example
2321
+ * ```ts
2322
+ * const value: RevealRoundValue = { x: 0.5, y: 0.5, radius: 1.2, soft: 0.05, wobble: 0.04, enabled: true, order: 0 };
2323
+ * ```
2324
+ */
2325
+ type RevealRoundValue = {
2326
+ x: number;
2327
+ y: number;
2328
+ radius: number;
2329
+ soft: number;
2330
+ wobble: number;
2331
+ enabled: boolean;
2332
+ order: number;
2333
+ };
2334
+ /**
2335
+ * `Dissolve`: the view eaten by a noise of `scale` cells across, `progress` 0 none of it, 1 all of it, the rim `edge`
2336
+ * wide in `edgeColor`.
2337
+ *
2338
+ * @example
2339
+ * ```ts
2340
+ * const value: DissolveValue = { progress: 0.5, scale: 8, edge: 0.08, edgeColor: 0xffffff, enabled: true, order: 0 };
2341
+ * ```
2342
+ */
2343
+ type DissolveValue = {
2344
+ progress: number;
2345
+ scale: number;
2346
+ edge: number;
2347
+ edgeColor: number;
2348
+ enabled: boolean;
2349
+ order: number;
2350
+ };
2351
+ /**
2352
+ * `Shine`: a band of light `width` wide at `position` of its sweep (-0.5..1.5), across the view at `angle`, by
2353
+ * `strength`.
2354
+ *
2355
+ * @example
2356
+ * ```ts
2357
+ * const value: ShineValue = { position: 0.5, width: 0.2, angle: 0.6, strength: 0.6, enabled: true, order: 0 };
2358
+ * ```
2359
+ */
2360
+ type ShineValue = {
2361
+ position: number;
2362
+ width: number;
2363
+ angle: number;
2364
+ strength: number;
2365
+ enabled: boolean;
2366
+ order: number;
2367
+ };
2368
+ /**
2369
+ * `Fold`: the view turned by `angle` (radians) about its vertical axis (`axis: 0`) or its horizontal one (`axis: 1`),
2370
+ * leaning by `perspective` (0..1), its back darkened by `shade` (0..1).
2371
+ *
2372
+ * @example
2373
+ * ```ts
2374
+ * const value: FoldValue = { angle: Math.PI / 2, axis: 1, perspective: 0.5, shade: 0.4, enabled: true, order: 0 };
2375
+ * ```
2376
+ */
2377
+ type FoldValue = {
2378
+ angle: number;
2379
+ axis: number;
2380
+ perspective: number;
2381
+ shade: number;
2382
+ enabled: boolean;
2383
+ order: number;
2384
+ };
2244
2385
  declare namespace types_d_exports$2 {
2245
- export { AlphaValue, AssetsReplaced$1 as AssetsReplaced, BlurValue, BundleUnloaded$1 as BundleUnloaded, ColorMatrixValue, Config$2 as Config, CoreKind, Curve, Deps$2 as Deps, DisplacementValue, EffectsApi, EffectsCtx, EffectsDiagnostics, EffectsStats, EmitterConfig, EmitterDefinition, EmitterValue, FilterArea, FilterCache, FilterChainContext, FilterComponent, FilterDefinition, FilterInput, FilterInputDefinition, FilterSpec, FilterStage, FilterStep, FilterValueOf, GlowValue, HotSwap, KernelSlice$2 as KernelSlice, NoiseValue, OutlineValue, Range, ResolvedEmitterConfig, Shape, State$2 as State, UniformDeclaration, UniformSpec, UniformValue };
2386
+ export { AlphaValue, AssetsReplaced$1 as AssetsReplaced, BlurValue, BundleUnloaded$1 as BundleUnloaded, ColorMatrixValue, Config$2 as Config, CoreKind, Curve, Deps$2 as Deps, DisplacementValue, DissolveValue, EffectsApi, EffectsCtx, EffectsDiagnostics, EffectsStats, EmitterConfig, EmitterDefinition, EmitterValue, FilterArea, FilterCache, FilterChainContext, FilterComponent, FilterDefinition, FilterInput, FilterInputDefinition, FilterSpec, FilterStage, FilterStep, FilterValueOf, FlashValue, FoldValue, GlowValue, GradeValue, HotSwap, KernelSlice$2 as KernelSlice, NoiseValue, OutlineValue, Range, ResolvedEmitterConfig, RevealLineValue, RevealRoundValue, Shape, ShineValue, State$2 as State, UniformDeclaration, UniformSpec, UniformValue, VignetteValue };
2246
2387
  }
2247
2388
  /**
2248
2389
  * effects plugin config. `maxParticles` here is the global warning line; the `maxParticles` of an
@@ -3229,4 +3370,4 @@ type UiApi = {
3229
3370
  }> | undefined;
3230
3371
  };
3231
3372
  //#endregion
3232
- export { sequence as $, GlowValue as A, Target as B, BlurValue as C, FilterComponent as D, FilterArea as E, AnimPlayerValue as F, HAPTIC_KINDS as G, HapticKind as H, Config$3 as I, frames as J, defineAnimation as K, FramesValue as L, OutlineValue as M, UniformDeclaration as N, FilterSpec as O, AnimApi as P, play as Q, MotionKeyframe as R, AlphaValue as S, DisplacementValue as T, SfxDescriptor as U, types_d_exports$3 as V, Step as W, mark as X, haptic as Y, parallel as Z, State$2 as _, AudioApi as a, stopSfx as at, EmitterDefinition as b, MusicDescriptor as c, wait as ct, State$1 as d, set as et, VolumesFor as f, EffectsStats as g, EffectsApi as h, types_d_exports as i, stagger as it, NoiseValue as j, FilterValueOf as k, MusicOptions as l, OverlayApi as lt, Config$2 as m, State as n, spawn as nt, AudioContextLike as o, tween as ot, types_d_exports$1 as p, external as q, UiApi as r, spawned as rt, Config$1 as s, use as st, Config as t, sfx as tt, SoundEntry as u, types_d_exports$4 as ut, types_d_exports$2 as v, ColorMatrixValue as w, EmitterValue as x, EmitterConfig as y, State$3 as z };
3373
+ export { HAPTIC_KINDS as $, AlphaValue as A, OutlineValue as B, RevealLineValue as C, EmitterConfig as D, VignetteValue as E, FilterComponent as F, FramesValue as G, AnimApi as H, FilterSpec as I, Target as J, MotionKeyframe as K, FilterValueOf as L, ColorMatrixValue as M, DisplacementValue as N, EmitterDefinition as O, FilterArea as P, Step as Q, GlowValue as R, GradeValue as S, ShineValue as T, AnimPlayerValue as U, UniformDeclaration as V, Config$3 as W, HapticKind as X, types_d_exports$3 as Y, SfxDescriptor as Z, State$2 as _, OverlayApi as _t, AudioApi as a, parallel as at, FlashValue as b, MusicDescriptor as c, set as ct, State$1 as d, spawned as dt, defineAnimation as et, VolumesFor as f, stagger as ft, EffectsStats as g, wait as gt, EffectsApi as h, use as ht, types_d_exports as i, mark as it, BlurValue as j, EmitterValue as k, MusicOptions as l, sfx as lt, Config$2 as m, tween as mt, State as n, frames as nt, AudioContextLike as o, play as ot, types_d_exports$1 as p, stopSfx as pt, State$3 as q, UiApi as r, haptic as rt, Config$1 as s, sequence as st, Config as t, external as tt, SoundEntry as u, spawn as ut, types_d_exports$2 as v, types_d_exports$4 as vt, RevealRoundValue as w, FoldValue as x, DissolveValue as y, NoiseValue as z };
@@ -1,9 +1,9 @@
1
1
  import { Nr as Api$4, Or as Api$1, Z as Api, ni as Api$3, zr as Api$2 } from "./types-qCcSw8YI.mjs";
2
- import { P as AnimApi, r as UiApi } from "./types-Cffn9Rbm.mjs";
2
+ import { H as AnimApi, r as UiApi } from "./types-BsF8WS0c.mjs";
3
3
  import { L as InputApi } from "./types-L3E-YS4N.mjs";
4
4
  import { r as Repro } from "./headless-Co3SEFi5.mjs";
5
5
  import { i as ControlApp, o as InputOf } from "./types-BE6tcAFX.mjs";
6
- import { t as commands } from "./commands-DQXSQB_C.mjs";
6
+ import { t as commands } from "./commands-12Om5aNO.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-72OVwKM4.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-CzT4SRfd.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
@@ -28,7 +28,7 @@ Root exports:
28
28
  - Plugin instances: `timePlugin`, `lifecyclePlugin`, `modelPlugin`, `clockPlugin`, `flowPlugin`, `worldPlugin`, `rendererPlugin`, `inputPlugin`, `assetsPlugin`, `scenesPlugin`, `animPlugin`, `i18nPlugin`, `textPlugin`, `uiPlugin`, `audioPlugin`, `effectsPlugin`, `platformPlugin`; the list `screen` = `world`, `renderer`, `input`, `assets`, `scenes`, `anim`, `i18n`, `text`, `ui`. `effects`, `audio` and `platform` are opt-in: `plugins: [...screen, effectsPlugin, audioPlugin, platformPlugin]`, `platform` last.
29
29
  - Screen helpers from the root: `component`, `tag`, `resource`, `mut`, `system`, `projection`, `Layer`, `Order`, `Exiting`, `Tree`, `Now`, `Transform`, `Sprite`, `NineSlice`, `Shape`, `Parent`, `Display`, `Overlay`, `HudPart`, `sprite`, `Tappable`, `Pressable`, `Draggable`, `DropTarget`, `Swipeable`, `Traceable`, `Touchable`, `Held`, `Hovered`, `PointerOver`, `Pressed`, `Pointer`, `Traced`, `defineBundles`, `load`, `defineScene`.
30
30
  - Interface helpers from the root (V3): `defineAnimation`, `sequence`, `parallel`, `stagger`, `tween`, `set`, `wait`, `mark`, `frames`, `sfx`, `haptic`, `use`, `spawn`, `spawned`, `play`, `external`, `defineMotion`, `Animation`, `Frames`, the resource `AnimPlayer`; `tr`, `messageArgument`, `messageDuration`; `Text`, `label`, `defineTextStyles`, `defineTextFormats`, `bind`, `Countdown` and the types `BindOptions`, `CountdownValue`, `TextFormat`, `TextFormats`, `TextFormatAnswer`, `TextFormatFunction`, `FormattedNumber`; `defineComponent`, `popup`, `defineStyle`, `defineTokens`, `resolve`, `Box`, `LocalWrite`, `DebugTrigger`, `ScrollState`; `music`. Also `stopSfx(id, { fadeMs? })` (ends a named sound, see audio) and `cubicBezier(x1, y1, x2, y2)` (a CSS-style easing curve for `tween`'s `ease`).
31
- - Effects helpers from the root (V5): `defineEmitter`, `Emitter`, `defineFilter`, `Glow`, `Outline`, `Blur`, `ColorMatrix`, `Noise`, `Displacement`, `Alpha`.
31
+ - Effects helpers from the root (V5): `defineEmitter`, `Emitter`, `defineFilter`, `Glow`, `Outline`, `Blur`, `ColorMatrix`, `Noise`, `Displacement`, `Alpha`; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Fold` and their value types `FlashValue`, `GradeValue`, `VignetteValue`, `RevealLineValue`, `RevealRoundValue`, `DissolveValue`, `ShineValue`, `FoldValue`.
32
32
  - Platform from the root (V6): the types `PlatformProvider`, `BackResult`, `HapticKind` and the frozen list `HAPTIC_KINDS`.
33
33
  - `defineGame<Types>()` returns, typed by the game's `player`, `session`, `assets`, `bundles`, `scenes`, `strings`, `textStyles` and `textFormats`: `defineNode`, `defineFlow`, `defineFeature`, `projection`, `sprite`, `Sprite`, `NineSlice`, `defineBundles`, `load`, `defineScene`, `defineAnimation`, `frames`, `sfx`, `play`, `tr`, `label`, `bind`, `defineTextStyles`, `defineTextFormats`, `defineComponent`, `defineStyle`, `defineTokens`, `popup`, `music`, `Frames`, `defineEmitter`, `Emitter`, `Displacement`, and `system` (its `ctx.snapshot` typed by `player` and `session`), `volumes` (the `audio` config's reader of the typed player), `key` (string keys from data, below). `Types` is `{ player; session; assets: string; bundles?: string; scenes?: string; strings: Record<string, unknown>; textStyles?: string; textFormats?: string; emitters?: string }`.
34
34
  - `@moku-labs/game/assets`: `scanAssets(options)`, `emitKeys`, `emitManifest`, `compileStrings(root, out, options?)`, `checkStrings`, `packAssets(options)`, `exportStrings`, `importStrings`, `runCli(argv, strings)` with `strings: StringsTools` = `{ compile: compileStrings, exportStrings, importStrings }`. Audio files are `.mp3` or `.m4a`. Asset key = feature (or layer name) + "." + path inside `assets/`; a sub-feature's own name, `features/episodes/ep01/assets/ward/room.png` → `ep01.ward.room`. `runCli` (a game's `bun run assets:keys`) scans the assets and compiles the `strings/<locale>.json` of every feature and sub-feature, and the `strings/` of every layer, into `generated/strings.ts` (the `Strings` type for `defineGame`), one `generated/strings.<locale>.ts` per locale for the top-level features and the layers, and `generated/strings.<feature>.<locale>.ts` per sub-feature with string files, its keys only, each starting with `<feature>.` (it imports `messageArgument` and `messageDuration` from `@moku-labs/game` when a message needs them, no helper is copied in); `--check` fails when any output is out of date; `--pack <dir>` writes the production build. `--layer <folder>[=<name>]`, repeatable and good with every mode, scans `<root>/<folder>/` like one more feature under `<name>` (`<folder>` alone maps to itself): its `assets.ts`, `assets/` and `strings/<locale>.json`. A game on the layered layout passes `--layer shared=ui`, so `shared/assets/*` keeps the `ui.*` keys. A missing layer folder is a warning. `scanAssets`, `compileStrings`, `exportStrings` and `importStrings` take the same map as `layers: { shared: "ui" }`. `--pseudo` also writes the pseudo-locale `en-XA`. `--export <dir>` and `--import <dir>` exchange strings with translators; `--source <locale>` names the locale they read from, `"en"` by default. The package bin `moku-game-assets` is this CLI: a script is `"assets:keys": "moku-game-assets --root src --manifest public/assets/manifest.json --keys src/generated/assets.ts"`. A game with `config.ts` runs `moku-game keys` and `moku-game pack` instead: they pass its paths and its layers.
@@ -676,6 +676,7 @@ Cosmetic rendering extras as data, drawn by `effectsPlugin`: `plugins: [...scree
676
676
  - 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.
677
677
  - 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.
678
678
  - 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 })`.
679
+ - The effect set: ready filters a feature lists in `filters`, as a game's own (`filters: [Flash]`; two features may list the same one): `Flash({ amount: 0..1, color })` washes the view with a colour, `Grade({ brightness, contrast, saturation, tint })` grades it (each 1 for none, 0..2), `Vignette({ x, y, radius, soft, color, amount })` darkens it outside a disc in 0..1 of the view, `RevealLine({ progress: 0..1, angle, soft })` shows it up to a line that sweeps across at `angle` (0 hides all, 1 shows all), `RevealRound({ x, y, radius: 0..1.5, soft, wobble: 0..0.2 })` shows it inside a disc (radius 0 hides all), `Dissolve({ progress: 0..1, scale, edge, edgeColor })` eats it away by a fixed noise of `scale` cells with a rim in `edgeColor`, `Shine({ position: -0.5..1.5, width, angle, strength })` sweeps a band of light across it (light on the colour only, the alpha kept), `Fold({ angle, axis: 0 | 1, perspective: 0..1, shade: 0..1 })` turns it about its vertical (`axis: 0`) or horizontal (`axis: 1`) axis, padded by 8 px. Each is one pass and one sample, `cache: "local"`, and on WebGPU a tween draws on the view's own quad from its third frame: `view.tween(Flash, { amount: 0 }, { ms: 160 })`. A view that carries a filter no feature lists draws unfiltered; a dev build warns `effects:filter-unlisted` once per id.
679
680
  - API: `app.effects.stats()` returns `{ particles, emitters, filters, renderPasses }`; headless every number is 0.
680
681
  - `app.effects.diagnostics`: `kinds()` (built-ins, then feature filters, after start), `disable(kind)`, `enable(kind)`, `disabled()` (the off kinds in registration order). A switch acts on a dev or agent page only and answers `false` elsewhere or for an unknown kind (`effects:diagnostics-unknown`, once per id); an off kind keeps its instances and is left out of what the renderer draws from the next frame (`stats().filters` stays, `renderPasses` drops); a switch logs `effects:diagnostics` and writes a `switch` event to the performance log.
681
682
  - Config: `maxParticles: 3000` and `maxPasses: 24`, each warns once per crossing; `phone: "auto"`; `blur: { quality: 2, phoneResolution: 0.5 }`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.97",
3
+ "version": "0.15.99",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [