@moku-labs/game 0.15.151 → 0.15.153

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.
@@ -1,6 +1,6 @@
1
1
  import { Bn as NodeTable, Ir as ClockSource, Jn as Hint, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Wn as Descriptor, Wr as Json, Yn as NodeFx } from "./types-VJcIdmHU.mjs";
2
- import { t as createApp } from "./index-Dgwheaoi.mjs";
3
- import { b as memory, x as saveOf, y as WithGameState } from "./types-C2-KGQGt.mjs";
2
+ import { t as createApp } from "./index-DiZomBIu.mjs";
3
+ import { b as memory, x as saveOf, y as WithGameState } from "./types-TjhiJIZ4.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-CO19o31k.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
package/dist/testing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-CpV819p3.mjs";
1
+ import { gn as refuseStart, k as flattenFeatures, t as createApp, vn as exit, xn as type } from "./src-Dd04I2Us.mjs";
2
2
  import { n as saveOf, t as memory } from "./memory-DeD9wis6.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-yi2XmYWC.mjs";
@@ -125,7 +125,8 @@ type Track = {
125
125
  * Per slot, the numbers of the write that runs: first what the slot contributes, then what the
126
126
  * field reads, the base plus every offset. Kept here so no number crosses a call boxed.
127
127
  */
128
- readonly values: Float64Array;
128
+ readonly values: Float64Array; /** `1` for a slot that is a colour field (`isColorField`): it mixes per channel and rounds (F219). */
129
+ readonly colors: Uint8Array;
129
130
  /**
130
131
  * Per slot, the value this track last left in the field or found there, `NaN` while unknown: at
131
132
  * the start and while another writer holds the field. A frame whose value moved off it writes
@@ -2560,8 +2561,88 @@ type BloomValue = {
2560
2561
  enabled: boolean;
2561
2562
  order: number;
2562
2563
  };
2564
+ /**
2565
+ * `Pixelate`: the view drawn in square blocks `size` CSS px wide, from its top-left; 1 or less draws it as it is.
2566
+ *
2567
+ * @example
2568
+ * ```ts
2569
+ * const value: PixelateValue = { size: 8, enabled: true, order: 0 };
2570
+ * ```
2571
+ */
2572
+ type PixelateValue = {
2573
+ size: number;
2574
+ enabled: boolean;
2575
+ order: number;
2576
+ };
2577
+ /**
2578
+ * `GradientMap`: the view's light mapped from `dark` through `middle` to `light`, mixed in by `amount` (0..1).
2579
+ *
2580
+ * @example
2581
+ * ```ts
2582
+ * const value: GradientMapValue = { dark: 0x2b1a0e, middle: 0x9c6b3c, light: 0xf5e6c8, amount: 1, enabled: true, order: 0 };
2583
+ * ```
2584
+ */
2585
+ type GradientMapValue = {
2586
+ dark: number;
2587
+ middle: number;
2588
+ light: number;
2589
+ amount: number;
2590
+ enabled: boolean;
2591
+ order: number;
2592
+ };
2593
+ /**
2594
+ * `Wave`: the view swaying by `amplitude` CSS px, one wave every `wavelength` CSS px, shifted by `phase` (radians);
2595
+ * at `angle` 0 its rows sway left and right, at `π / 2` its columns up and down.
2596
+ *
2597
+ * @example
2598
+ * ```ts
2599
+ * const value: WaveValue = { amplitude: 4, wavelength: 48, phase: Math.PI, angle: 0, enabled: true, order: 0 };
2600
+ * ```
2601
+ */
2602
+ type WaveValue = {
2603
+ amplitude: number;
2604
+ wavelength: number;
2605
+ phase: number;
2606
+ angle: number;
2607
+ enabled: boolean;
2608
+ order: number;
2609
+ };
2610
+ /**
2611
+ * `Mirror`: the view flipped top to bottom (`axis: 1`) or left to right (`axis: 0`), at `alpha` (0..1), fading out to
2612
+ * nothing at `fade` of its size from the mirror line; `fade: 0` keeps it whole.
2613
+ *
2614
+ * @example
2615
+ * ```ts
2616
+ * const value: MirrorValue = { axis: 1, alpha: 0.4, fade: 0.5, enabled: true, order: 0 };
2617
+ * ```
2618
+ */
2619
+ type MirrorValue = {
2620
+ axis: number;
2621
+ alpha: number;
2622
+ fade: number;
2623
+ enabled: boolean;
2624
+ order: number;
2625
+ };
2626
+ /**
2627
+ * `Shadow`: a shadow of `color` at `alpha` (0..1) under the view, moved by `x`, `y` CSS px and `soft` CSS px wide;
2628
+ * `|x| + soft` and `|y| + soft` are held within the padding of 16.
2629
+ *
2630
+ * @example
2631
+ * ```ts
2632
+ * const value: ShadowValue = { x: 0, y: 4, soft: 4, color: 0x000000, alpha: 0.5, enabled: true, order: 0 };
2633
+ * ```
2634
+ */
2635
+ type ShadowValue = {
2636
+ x: number;
2637
+ y: number;
2638
+ soft: number;
2639
+ color: number;
2640
+ alpha: number;
2641
+ enabled: boolean;
2642
+ order: number;
2643
+ };
2563
2644
  declare namespace types_d_exports$2 {
2564
- export { AlphaValue, AssetsReplaced$1 as AssetsReplaced, AuraValue, BloomValue, 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 };
2645
+ export { AlphaValue, AssetsReplaced$1 as AssetsReplaced, AuraValue, BloomValue, 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, GradientMapValue, HotSwap, KernelSlice$2 as KernelSlice, MirrorValue, NoiseValue, OutlineValue, PixelateValue, Range, ResolvedEmitterConfig, RevealLineValue, RevealRoundValue, ShadowValue, Shape, ShineValue, State$2 as State, UniformDeclaration, UniformSpec, UniformValue, VignetteValue, WaveValue };
2565
2646
  }
2566
2647
  /**
2567
2648
  * effects plugin config. `maxParticles` here is the global warning line; the `maxParticles` of an
@@ -3548,4 +3629,4 @@ type UiApi = {
3548
3629
  }> | undefined;
3549
3630
  };
3550
3631
  //#endregion
3551
- export { HapticKind as $, EmitterDefinition as A, GlowValue as B, FoldValue as C, ShineValue as D, RevealRoundValue as E, DisplacementValue as F, AnimPlayerValue as G, OutlineValue as H, FilterArea as I, MotionKeyframe as J, Config$3 as K, FilterComponent as L, AlphaValue as M, BlurValue as N, VignetteValue as O, ColorMatrixValue as P, types_d_exports$3 as Q, FilterSpec as R, FlashValue as S, RevealLineValue as T, UniformDeclaration as U, NoiseValue as V, AnimApi as W, Target as X, State$3 as Y, TimelinesSnapshot as Z, State$2 as _, tween as _t, AudioApi as a, frames as at, BloomValue as b, OverlayApi as bt, MusicDescriptor as c, parallel as ct, State$1 as d, set as dt, SfxDescriptor as et, VolumesFor as f, sfx as ft, EffectsStats as g, stopSfx as gt, EffectsApi as h, stagger as ht, types_d_exports as i, external as it, EmitterValue as j, EmitterConfig as k, MusicOptions as l, play as lt, Config$2 as m, spawned as mt, State as n, HAPTIC_KINDS as nt, AudioContextLike as o, haptic as ot, types_d_exports$1 as p, spawn as pt, FramesValue as q, UiApi as r, defineAnimation as rt, Config$1 as s, mark as st, Config as t, Step as tt, SoundEntry as u, sequence as ut, types_d_exports$2 as v, use as vt, GradeValue as w, DissolveValue as x, types_d_exports$4 as xt, AuraValue as y, wait as yt, FilterValueOf as z };
3632
+ export { MotionKeyframe as $, ShadowValue as A, DisplacementValue as B, FoldValue as C, use as Ct, PixelateValue as D, MirrorValue as E, types_d_exports$4 as Et, EmitterDefinition as F, GlowValue as G, FilterComponent as H, EmitterValue as I, UniformDeclaration as J, NoiseValue as K, AlphaValue as L, VignetteValue as M, WaveValue as N, RevealLineValue as O, EmitterConfig as P, FramesValue as Q, BlurValue as R, FlashValue as S, tween as St, GradientMapValue as T, OverlayApi as Tt, FilterSpec as U, FilterArea as V, FilterValueOf as W, AnimPlayerValue as X, AnimApi as Y, Config$3 as Z, State$2 as _, sfx as _t, AudioApi as a, SfxDescriptor as at, BloomValue as b, stagger as bt, MusicDescriptor as c, defineAnimation as ct, State$1 as d, haptic as dt, State$3 as et, VolumesFor as f, mark as ft, EffectsStats as g, set as gt, EffectsApi as h, sequence as ht, types_d_exports as i, HapticKind as it, ShineValue as j, RevealRoundValue as k, MusicOptions as l, external as lt, Config$2 as m, play as mt, State as n, TimelinesSnapshot as nt, AudioContextLike as o, Step as ot, types_d_exports$1 as p, parallel as pt, OutlineValue as q, UiApi as r, types_d_exports$3 as rt, Config$1 as s, HAPTIC_KINDS as st, Config as t, Target as tt, SoundEntry as u, frames as ut, types_d_exports$2 as v, spawn as vt, GradeValue as w, wait as wt, DissolveValue as x, stopSfx as xt, AuraValue as y, spawned as yt, ColorMatrixValue as z };
@@ -1,7 +1,7 @@
1
1
  import { $ as Config$2, Hr as Config, Ir as ClockSource, Mn as FeaturePlugin, Pn as AnyFlow, Rr as FakeClock, Un as TypeTag, Wr as Json, Xr as ProviderCall, Yr as PlayerStateProvider, Zr as SaveDoc, _t as Orientation, a as Config$3, d as Manifest, ei as SnapshotOf, gn as Config$1, it as PixiModule, n as AssetsIo } from "./types-VJcIdmHU.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-BpmdVJso.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-D_eHSpKN.mjs";
3
3
  import { J as StringTable, U as I18nApi, Y as TextKey } from "./types-BaarAgv8.mjs";
4
- import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-Dgwheaoi.mjs";
4
+ import { Rt as effectsPlugin, Vt as audioPlugin, i as screen, jt as PlatformProvider, kt as platformPlugin, t as createApp } from "./index-DiZomBIu.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/model/store/providers/memory.d.ts
@@ -1,9 +1,9 @@
1
1
  import { Ar as Api$1, Fr as Api$4, Q as Api, Vr as Api$2, ii as Api$3 } from "./types-VJcIdmHU.mjs";
2
- import { W as AnimApi, r as UiApi } from "./types-BpmdVJso.mjs";
2
+ import { Y as AnimApi, r as UiApi } from "./types-D_eHSpKN.mjs";
3
3
  import { R as InputApi } from "./types-BaarAgv8.mjs";
4
4
  import { r as Repro } from "./headless-CO19o31k.mjs";
5
5
  import { i as ControlApp, o as InputOf } from "./types-CbSTnp8T.mjs";
6
- import { t as commands } from "./commands-DXSaq2AP.mjs";
6
+ import { t as commands } from "./commands-CBxAIuzU.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-Dw4QXpgC.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-ACZOnh3-.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` and the type `TextTagStyle`, `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`; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Aura`, `Fold`, `Bloom` and their value types `FlashValue`, `GradeValue`, `VignetteValue`, `RevealLineValue`, `RevealRoundValue`, `DissolveValue`, `ShineValue`, `AuraValue`, `FoldValue`, `BloomValue`.
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`, `Aura`, `Fold`, `Bloom`, `Pixelate`, `GradientMap`, `Wave`, `Mirror`, `Shadow` and their value types `FlashValue`, `GradeValue`, `VignetteValue`, `RevealLineValue`, `RevealRoundValue`, `DissolveValue`, `ShineValue`, `AuraValue`, `FoldValue`, `BloomValue`, `PixelateValue`, `GradientMapValue`, `WaveValue`, `MirrorValue`, `ShadowValue`.
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.
@@ -679,7 +679,7 @@ Cosmetic rendering extras as data, drawn by `effectsPlugin`: `plugins: [...scree
679
679
  - 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.
680
680
  - 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.
681
681
  - 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 })`.
682
- - 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), `Aura({ color, strength: 0..2, spread })` puts a halo `spread` px wide around its shape (padded by `spread`, 13 samples), `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 (`Aura` 13), `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 })`. `Bloom({ strength: 0..2, threshold: 0..1, radius })` adds light around what is above `threshold`, blurred `radius` CSS px wide: it reads a chain of two engine stages (cut and boxed down, then blurred), 3 passes with its body at any radius and resolution (`Bloom.filter.inputs[0]?.chain({ ...Bloom().value }, { resolution: 2 }).length` is 2 steps), so it is for an object, not the screen; it is kept as a picture at rest and never draws on the quad: a tween of it runs its chain and redraws its picture's filter in every frame, 3 passes a frame for `strength`. A view that carries a filter no feature lists draws unfiltered; a dev build warns `effects:filter-unlisted` once per id.
682
+ - 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), `Aura({ color, strength: 0..2, spread })` puts a halo `spread` px wide around its shape (padded by `spread`, 13 samples), `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. `Pixelate({ size })` draws it in blocks of `size` CSS px (1 or less: unchanged), `GradientMap({ dark, middle, light, amount: 0..1 })` maps its luma onto three colours, `Wave({ amplitude, wavelength, phase, angle })` sways its rows (angle 0) or columns (angle π/2) by a sine in CSS px (loop it with `view.tween(Wave, { phase: Math.PI * 2 }, { ms: 1200, ease: "linear", repeat: "forever" })`), `Mirror({ axis: 0 | 1, alpha: 0..1, fade: 0..1 })` flips it in place (for a reflection on a copy view; `fade` is where it is gone, from the mirror line), `Shadow({ x, y, soft, color, alpha })` draws a soft drop shadow under it (padded by 8 px; `|x| + soft` and `|y| + soft` held to 8; 10 samples). Each is one pass and one sample (`Aura` 13, `Shadow` 10), `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 })`. `Bloom({ strength: 0..2, threshold: 0..1, radius })` adds light around what is above `threshold`, blurred `radius` CSS px wide: it reads a chain of two engine stages (cut and boxed down, then blurred), 3 passes with its body at any radius and resolution (`Bloom.filter.inputs[0]?.chain({ ...Bloom().value }, { resolution: 2 }).length` is 2 steps), so it is for an object, not the screen; it is kept as a picture at rest and never draws on the quad: a tween of it runs its chain and redraws its picture's filter in every frame, 3 passes a frame for `strength`. A view that carries a filter no feature lists draws unfiltered; a dev build warns `effects:filter-unlisted` once per id.
683
683
  - API: `app.effects.stats()` returns `{ particles, emitters, filters, renderPasses }`; headless every number is 0.
684
684
  - `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.
685
685
  - 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.151",
3
+ "version": "0.15.153",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [