@moku-labs/game 0.15.102 → 0.15.103
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 +1 -1
- package/dist/app/page.d.mts +1 -1
- package/dist/app/system.d.mts +2 -2
- package/dist/app.d.mts +1 -1
- package/dist/app.mjs +1 -1
- package/dist/{commands-C2JXDkUV.d.mts → commands-TSyhs2-E.d.mts} +1 -1
- package/dist/control.d.mts +1 -1
- package/dist/{index-DtbI1op8.d.mts → index-DDZ9K9qO.d.mts} +22 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/inspect.d.mts +1 -1
- package/dist/{src-CilP057R.mjs → src-DVJ0d04R.mjs} +344 -27
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +1 -1
- package/dist/{types-Cdzw3as5.d.mts → types-BvgY7Ncf.d.mts} +21 -3
- package/dist/{types-IJXSUFJa.d.mts → types-CMag4vDu.d.mts} +2 -2
- package/dist/{visual-BoSpJLWP.d.mts → visual-PsEr2KD-.d.mts} +2 -2
- package/dist/visual.d.mts +1 -1
- package/llms.txt +2 -2
- package/package.json +1 -1
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; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Aura`, `Fold` ready to list ([set](./src/plugins/effects/set/README.md)) |
|
|
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`, `Aura`, `Fold`, `Bloom` 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
|
|
package/dist/app/page.d.mts
CHANGED
package/dist/app/system.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { qr as PlayerStateProvider } from "../types-Ce5W0gZe.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-
|
|
2
|
+
import { Et as PlatformProvider } from "../index-DDZ9K9qO.mjs";
|
|
3
|
+
import { _ as SystemName, g as SystemModules, v as SystemShellFactory } from "../types-CMag4vDu.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-Ce5W0gZe.mjs";
|
|
2
2
|
import { q as StringTable } from "./types-C1B7-x7p.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-
|
|
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-CMag4vDu.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 {
|
|
1
|
+
import { Gt as audioPlugin, Pt as effectsPlugin, Q as platformPlugin, i as screen, t as createApp, w as flattenFeatures } from "./src-DVJ0d04R.mjs";
|
|
2
2
|
import { t as memory } from "./memory-DeD9wis6.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, Nr as Api, Or as Api$3, Z as Api$2, Zr as Snapshot, ft as Captured, mi as Time, ni as Api$1, ui as FrameRate, w as ScenesApi } from "./types-Ce5W0gZe.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { W as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-BvgY7Ncf.mjs";
|
|
3
3
|
import { L as InputApi } from "./types-C1B7-x7p.mjs";
|
|
4
4
|
import { t as HeadlessApp } from "./headless-CEG1oR5D.mjs";
|
|
5
5
|
import { i as ControlApp, r as Command } from "./types-C612npUH.mjs";
|
package/dist/control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as HeadlessApp } from "./headless-CEG1oR5D.mjs";
|
|
2
2
|
import { a as InputArguments, c as Ran, n as ChoiceInput, r as Command, s as InputSchema, u as ToggleInput } from "./types-C612npUH.mjs";
|
|
3
|
-
import { t as commands } from "./commands-
|
|
3
|
+
import { t as commands } from "./commands-TSyhs2-E.mjs";
|
|
4
4
|
import { t as defineCommand } from "./define-DNF9A0ce.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-Ce5W0gZe.mjs";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as SfxDescriptor, A as EmitterDefinition, B as GlowValue, C as FoldValue, D as ShineValue, E as RevealRoundValue, F as DisplacementValue, G as AnimPlayerValue, H as OutlineValue, J as MotionKeyframe, K as Config$11, L as FilterComponent, M as AlphaValue, N as BlurValue, O as VignetteValue, P as ColorMatrixValue, Q as HapticKind, R as FilterSpec, S as FlashValue, T as RevealLineValue, U as UniformDeclaration, V as NoiseValue, W as AnimApi, X as Target, Y as State$10, _ as State$12, a as AudioApi, b as BloomValue, c as MusicDescriptor, ct as play, d as State$11, et as Step, f as VolumesFor, h as EffectsApi, j as EmitterValue, k as EmitterConfig, l as MusicOptions, m as Config$13, n as State$13, nt as defineAnimation, q as FramesValue, r as UiApi, s as Config$12, t as Config$14, w as GradeValue, x as DissolveValue, y as AuraValue, yt as OverlayApi, z as FilterValueOf } from "./types-BvgY7Ncf.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-C1B7-x7p.mjs";
|
|
4
4
|
import { Log } from "@moku-labs/common/browser";
|
|
5
5
|
import { PluginCtx } from "@moku-labs/core";
|
|
@@ -1776,6 +1776,26 @@ declare function defineFilter<Uniforms extends Record<string, UniformDeclaration
|
|
|
1776
1776
|
*/
|
|
1777
1777
|
declare const Aura: FilterComponent<AuraValue>;
|
|
1778
1778
|
//#endregion
|
|
1779
|
+
//#region src/plugins/effects/set/bloom.d.ts
|
|
1780
|
+
/**
|
|
1781
|
+
* Light around the bright parts of a view and its subtree: what is above `threshold` (0..1) of its light, blurred
|
|
1782
|
+
* `radius` CSS px wide, added back by `strength` (0..2). For a reward, a gem, a lit lamp: an object, not the screen
|
|
1783
|
+
* (over the A26's screen its passes fill 1.9 Mpx a frame at 2.625). List it in a feature's `filters`, as a game's own
|
|
1784
|
+
* filter. It reads a second texture drawn by a chain of two stages, the light cut and boxed down to ¼ (⅛ when the
|
|
1785
|
+
* radius is over 8 texels at ¼: radius 16 at the phone's 2.625, 32 at 2) and blurred there: 3 passes at any radius.
|
|
1786
|
+
* A still view is kept as a picture; a tween of any field runs the chain again and redraws the picture's filter, 3
|
|
1787
|
+
* passes, in every frame it moves: it never draws on the view's quad. Past a sigma of 8 texels at ⅛ the bloom stops
|
|
1788
|
+
* widening.
|
|
1789
|
+
*
|
|
1790
|
+
* @example
|
|
1791
|
+
* ```ts
|
|
1792
|
+
* // features/shop/feature.ts lists it: filters: [Bloom]. A reward card blooms gold, then a motion fades it out.
|
|
1793
|
+
* Bloom.filter.inputs[0]?.chain({ ...Bloom().value }, { resolution: 2 }).length; // 2
|
|
1794
|
+
* view.tween(Bloom, { strength: 0 }, { ms: 400 });
|
|
1795
|
+
* ```
|
|
1796
|
+
*/
|
|
1797
|
+
declare const Bloom: FilterComponent<BloomValue>;
|
|
1798
|
+
//#endregion
|
|
1779
1799
|
//#region src/plugins/effects/set/dissolve.d.ts
|
|
1780
1800
|
/**
|
|
1781
1801
|
* 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
|
|
@@ -2229,4 +2249,4 @@ declare const screen: readonly [import("@moku-labs/core").PluginInstance<"world"
|
|
|
2229
2249
|
};
|
|
2230
2250
|
}> & 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>];
|
|
2231
2251
|
//#endregion
|
|
2232
|
-
export {
|
|
2252
|
+
export { Traced as $, messageDuration as A, inputPlugin as At, Draggable as B, Countdown as Bt, Noise as C, rendererPlugin as Ct, defineStyle as D, types_d_exports as Dt, resolve as E, PlatformProvider as Et, Frames as F, clockPlugin as Ft, PointerOver as G, label as Gt, Held as H, bind as Ht, defineScene as I, audioPlugin as It, Swipeable as J, Pressable as K, defineBundles as L, assetsPlugin as Lt, defineMotion as M, flowPlugin as Mt, AnimPlayer as N, effectsPlugin as Nt, tr as O, modelPlugin as Ot, Animation as P, debugPlugin as Pt, Traceable as Q, load as R, animPlugin as Rt, Glow as S, scenesPlugin as St, music as T, BackResult as Tt, Hovered as U, defineTextFormats as Ut, DropTarget as V, Text as Vt, Pointer as W, defineTextStyles as Wt, Tappable as X, TapValue as Y, Touchable as Z, defineFilter as _, flattenFeatures as _t, defineEmitter as a, Order as at, ColorMatrix as b, timePlugin as bt, Shine as c, mut as ct, Grade as d, tag as dt, PASS_KINDS as et, Fold as f, defineEffect as ft, Aura as g, defineFeature as gt, Bloom as h, schedule as ht, screen as i, Now as it, cubicBezier as j, i18nPlugin as jt, messageArgument as k, lifecyclePlugin as kt, RevealRound as l, resource as lt, Dissolve as m, hint as mt, createPlugin as n, Exiting as nt, Emitter as o, Tree as ot, Flash as p, guide as pt, Pressed as q, defineGame as r, Layer as rt, Vignette as s, component as st, createApp as t, frameAt as tt, RevealLine as u, system as ut, Alpha as v, worldPlugin as vt, Outline as w, platformPlugin as wt, Displacement as x, textPlugin as xt, Blur as y, uiPlugin as yt, ready as z, projection 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-Ce5W0gZe.mjs";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as FoldValue, D as ShineValue, E as RevealRoundValue, I as FilterArea, O as VignetteValue, Q as HapticKind, S as FlashValue, T as RevealLineValue, Z as types_d_exports, _t as use, at as haptic, b as BloomValue, bt as types_d_exports$4, ct as play, dt as sfx, ft as spawn, gt as tween, ht as stopSfx, i as types_d_exports$16, it as frames, lt as sequence, mt as stagger, nt as defineAnimation, ot as mark, p as types_d_exports$2, pt as spawned, rt as external, st as parallel, tt as HAPTIC_KINDS, ut as set, v as types_d_exports$5, vt as wait, w as GradeValue, x as DissolveValue, y as AuraValue } from "./types-BvgY7Ncf.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-C1B7-x7p.mjs";
|
|
4
|
-
import { $ as
|
|
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, Aura, type AuraValue, 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 };
|
|
4
|
+
import { $ as Traced, A as messageDuration, At as inputPlugin, B as Draggable, Bt as Countdown, C as Noise, Ct as rendererPlugin, D as defineStyle, Dt as types_d_exports$11, E as resolve, Et as PlatformProvider, F as Frames, Ft as clockPlugin, G as PointerOver, Gt as label, H as Held, Ht as bind, I as defineScene, It as audioPlugin, J as Swipeable, K as Pressable, L as defineBundles, Lt as assetsPlugin, M as defineMotion, Mt as flowPlugin, N as AnimPlayer, Nt as effectsPlugin, O as tr, Ot as modelPlugin, P as Animation, Pt as debugPlugin, Q as Traceable, R as load, Rt as animPlugin, S as Glow, St as scenesPlugin, T as music, Tt as BackResult, U as Hovered, Ut as defineTextFormats, V as DropTarget, Vt as Text, W as Pointer, Wt as defineTextStyles, X as Tappable, Y as TapValue, Z as Touchable, _ as defineFilter, _t as flattenFeatures, a as defineEmitter, at as Order, b as ColorMatrix, bt as timePlugin, c as Shine, ct as mut, d as Grade, dt as tag, et as PASS_KINDS, f as Fold, ft as defineEffect, g as Aura, gt as defineFeature, h as Bloom, ht as schedule, i as screen, it as Now, j as cubicBezier, jt as i18nPlugin, k as messageArgument, kt as lifecyclePlugin, l as RevealRound, lt as resource, m as Dissolve, mt as hint, n as createPlugin, nt as Exiting, o as Emitter, ot as Tree, p as Flash, pt as guide, q as Pressed, r as defineGame, rt as Layer, s as Vignette, st as component, t as createApp, tt as frameAt, u as RevealLine, ut as system, v as Alpha, vt as worldPlugin, w as Outline, wt as platformPlugin, x as Displacement, xt as textPlugin, y as Blur, yt as uiPlugin, z as ready, zt as projection } from "./index-DDZ9K9qO.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, Aura, type AuraValue, type BackResult, type BindOptions, Bloom, type BloomValue, 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
|
|
1
|
+
import { $ as HAPTIC_KINDS, $t as PASS_KINDS, A as types_exports$17, At as Traced, B as types_exports$7, Bt as Glow, C as defineFeature, Ct as PointerOver, D as defineBundles, Dt as Tappable, E as music, Et as Swipeable, F as types_exports$12, Ft as Emitter, G as types_exports$2, Gt as audioPlugin, H as types_exports$5, Ht as Outline, I as types_exports$11, It as Alpha, J as uiPlugin, Jt as animPlugin, K as types_exports$1, Kt as scenesPlugin, L as types_exports$10, Lt as Blur, M as types_exports$15, Mt as messageArgument, N as types_exports$14, Nt as messageDuration, O as load, Ot as Touchable, P as types_exports$13, Pt as effectsPlugin, Q as platformPlugin, Qt as rendererPlugin, R as types_exports$9, Rt as ColorMatrix, S as tr, St as Pointer, T as defineEmitter, Tt as Pressed, U as types_exports$4, Ut as defineFilter, V as types_exports$6, Vt as Noise, W as types_exports$3, Wt as debugPlugin, X as defineMotion, Xt as Animation, Y as resolve, Yt as AnimPlayer, Z as textPlugin, Zt as Frames, _ as guide, _n as modelPlugin, _t as inputPlugin, a as Vignette, an as PROBLEM_RULES, at as parallel, b as projection, bn as timePlugin, bt as Held, c as RevealLine, cn as DEMAND_REASONS, ct as set, d as Flash, dt as spawned, en as frameAt, et as defineAnimation, f as Dissolve, fn as contribution, ft as stagger, g as defineEffect, gn as type, gt as wait, h as cubicBezier, hn as to, ht as use, i as screen, in as PERF_LOG_VERSION, it as mark, j as types_exports$16, jt as i18nPlugin, k as ready, kt as Traceable, l as Grade, ln as worldPlugin, lt as sfx, m as Aura, mn as slot, mt as tween, n as createPlugin, nn as PERF_CAUSES, nt as frames, o as Shine, on as SHADER_WHATS, ot as play, p as Bloom, pn as exit, pt as stopSfx, q as types_exports, qt as assetsPlugin, r as defineGame, rn as PERF_GAP_BUCKETS, rt as haptic, s as RevealRound, sn as CANVAS_RESTARTS, st as sequence, t as createApp, tn as MONITOR_SECTIONS, tt as external, u as Fold, un as flowPlugin, ut as spawn, v as hint, vn as SaveUnreadableError, vt as Draggable, w as flattenFeatures, wt as Pressable, x as defineScene, xn as clockPlugin, xt as Hovered, y as schedule, yn as lifecyclePlugin, yt as DropTarget, z as types_exports$8, zt as Displacement } from "./src-DVJ0d04R.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, Aura, 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 };
|
|
4
|
+
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Aura, Bloom, 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 };
|
package/dist/inspect.d.mts
CHANGED
|
@@ -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-Ce5W0gZe.mjs";
|
|
2
|
-
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-
|
|
2
|
+
import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-BvgY7Ncf.mjs";
|
|
3
3
|
import { c as UiNode } from "./types-C1B7-x7p.mjs";
|
|
4
4
|
import { t as HeadlessApp } from "./headless-CEG1oR5D.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-C612npUH.mjs";
|
|
@@ -27052,7 +27052,7 @@ const MAX_RADIUS = 30;
|
|
|
27052
27052
|
/** The radius of a kernel, in sigmas. */
|
|
27053
27053
|
const RADIUS_SIGMAS = 3;
|
|
27054
27054
|
/** The widest blur, in texels of the shot: its radius is the widest the uniform holds. */
|
|
27055
|
-
const MAX_SIGMA = MAX_RADIUS / RADIUS_SIGMAS;
|
|
27055
|
+
const MAX_SIGMA$1 = MAX_RADIUS / RADIUS_SIGMAS;
|
|
27056
27056
|
/** Taps a side of an exact box: each averages two source pixels, at 2 texels from the next. */
|
|
27057
27057
|
const BOX_TAPS = 2;
|
|
27058
27058
|
/** Taps a side of any other hop, spread evenly over it. */
|
|
@@ -27142,7 +27142,7 @@ function gaussianTaps(sigma) {
|
|
|
27142
27142
|
* ```
|
|
27143
27143
|
*/
|
|
27144
27144
|
function sigmaOf(blur, width, frameWidth) {
|
|
27145
|
-
return frameWidth > 0 ? Math.min(blur * width / frameWidth, MAX_SIGMA) : 0;
|
|
27145
|
+
return frameWidth > 0 ? Math.min(blur * width / frameWidth, MAX_SIGMA$1) : 0;
|
|
27146
27146
|
}
|
|
27147
27147
|
/**
|
|
27148
27148
|
* The uniform of a hop. A hop of a factor of 4 takes two taps a side at +-1 source pixel: an exact box of 4 x 4. The
|
|
@@ -50278,7 +50278,11 @@ function propertyOf(target, name) {
|
|
|
50278
50278
|
*/
|
|
50279
50279
|
function listedDefinition(input, stage) {
|
|
50280
50280
|
const candidate = propertyOf(stage, "filter");
|
|
50281
|
-
|
|
50281
|
+
const { stages } = input;
|
|
50282
|
+
for (let index = 0; index < stages.length; index += 1) {
|
|
50283
|
+
const listed = stages[index];
|
|
50284
|
+
if (listed !== void 0 && listed.filter === candidate) return listed.filter;
|
|
50285
|
+
}
|
|
50282
50286
|
}
|
|
50283
50287
|
/**
|
|
50284
50288
|
* The uniform of a definition by its name.
|
|
@@ -50288,7 +50292,11 @@ function listedDefinition(input, stage) {
|
|
|
50288
50292
|
* @returns The uniform, or `undefined`.
|
|
50289
50293
|
*/
|
|
50290
50294
|
function uniformNamed(definition, name) {
|
|
50291
|
-
|
|
50295
|
+
const { uniforms } = definition;
|
|
50296
|
+
for (let index = 0; index < uniforms.length; index += 1) {
|
|
50297
|
+
const uniform = uniforms[index];
|
|
50298
|
+
if (uniform?.name === name) return uniform;
|
|
50299
|
+
}
|
|
50292
50300
|
}
|
|
50293
50301
|
/**
|
|
50294
50302
|
* Tells whether a step's value fits the form of a uniform: a number for a number or a colour, a
|
|
@@ -50305,7 +50313,11 @@ function uniformNamed(definition, name) {
|
|
|
50305
50313
|
function fitsForm(uniform, value) {
|
|
50306
50314
|
if (uniform.form !== "vector") return typeof value === "number";
|
|
50307
50315
|
if (!Array.isArray(value) || value.length !== uniform.size) return false;
|
|
50308
|
-
|
|
50316
|
+
const entries = value;
|
|
50317
|
+
for (let index = 0; index < entries.length; index += 1) {
|
|
50318
|
+
const entry = entries[index];
|
|
50319
|
+
if (typeof entry !== "number" || !Number.isFinite(entry)) return false;
|
|
50320
|
+
}
|
|
50309
50321
|
return true;
|
|
50310
50322
|
}
|
|
50311
50323
|
/**
|
|
@@ -50324,11 +50336,12 @@ function stepProblem(input, step, index) {
|
|
|
50324
50336
|
const id = propertyOf(propertyOf(stage, "filter"), "id") ?? propertyOf(stage, "componentName");
|
|
50325
50337
|
return `input "${name}" names stage "${String(id)}", which is not in its stages: only listed stages are checked and warmed up before they draw.`;
|
|
50326
50338
|
}
|
|
50327
|
-
const scale = propertyOf(step, "scale");
|
|
50339
|
+
const scale = typeof step === "object" && step !== null && "scale" in step ? step.scale : propertyOf(step, "scale");
|
|
50328
50340
|
if (typeof scale !== "number" || !Number.isFinite(scale) || scale <= 0 || scale > 1) return `input "${name}": step ${index} has scale ${String(scale)}; a scale is a share of the input's resolution above 0 and at most 1.`;
|
|
50329
50341
|
const uniforms = propertyOf(step, "uniforms");
|
|
50330
50342
|
if (typeof uniforms !== "object" || uniforms === null) return void 0;
|
|
50331
|
-
for (const key
|
|
50343
|
+
for (const key in uniforms) {
|
|
50344
|
+
if (!Object.hasOwn(uniforms, key)) continue;
|
|
50332
50345
|
const uniform = uniformNamed(definition, key);
|
|
50333
50346
|
if (uniform === void 0) return `input "${name}": step ${index} gives "${key}", which stage "${definition.id}" does not declare.`;
|
|
50334
50347
|
if (!fitsForm(uniform, Reflect.get(uniforms, key))) return `input "${name}": step ${index} gives "${key}" a value of another form.`;
|
|
@@ -50346,8 +50359,8 @@ function stepsProblem(input, steps) {
|
|
|
50346
50359
|
if (!Array.isArray(steps)) return `input "${input.name}": chain must return an array of steps.`;
|
|
50347
50360
|
const list = steps;
|
|
50348
50361
|
if (list.length > MAX_STEPS) return `input "${input.name}": chain returned ${list.length} steps; at most ${MAX_STEPS}.`;
|
|
50349
|
-
for (
|
|
50350
|
-
const problem = stepProblem(input,
|
|
50362
|
+
for (let index = 0; index < list.length; index += 1) {
|
|
50363
|
+
const problem = stepProblem(input, list[index], index);
|
|
50351
50364
|
if (problem !== void 0) return problem;
|
|
50352
50365
|
}
|
|
50353
50366
|
}
|
|
@@ -50391,14 +50404,11 @@ function writeStep(place, step) {
|
|
|
50391
50404
|
* @param places - The places of the input, changed in place.
|
|
50392
50405
|
* @param at - The slot of the step.
|
|
50393
50406
|
* @param step - The step.
|
|
50394
|
-
* @returns The place,
|
|
50407
|
+
* @returns The place: the one at the slot when kept, a new one, put in the slot, when built for this step.
|
|
50395
50408
|
*/
|
|
50396
50409
|
function placeFor(pixi, retired, places, at, step) {
|
|
50397
50410
|
const kept = places[at];
|
|
50398
|
-
if (kept?.definition === step.stage.filter) return
|
|
50399
|
-
place: kept,
|
|
50400
|
-
built: false
|
|
50401
|
-
};
|
|
50411
|
+
if (kept?.definition === step.stage.filter) return kept;
|
|
50402
50412
|
if (kept !== void 0) retired.push(kept.body);
|
|
50403
50413
|
const place = {
|
|
50404
50414
|
definition: step.stage.filter,
|
|
@@ -50406,10 +50416,25 @@ function placeFor(pixi, retired, places, at, step) {
|
|
|
50406
50416
|
scale: step.scale
|
|
50407
50417
|
};
|
|
50408
50418
|
places[at] = place;
|
|
50409
|
-
return
|
|
50410
|
-
|
|
50411
|
-
|
|
50412
|
-
|
|
50419
|
+
return place;
|
|
50420
|
+
}
|
|
50421
|
+
/**
|
|
50422
|
+
* Retires the places of an input past its steps, by index, and cuts them off: `splice` would answer an array of them
|
|
50423
|
+
* in every frame.
|
|
50424
|
+
*
|
|
50425
|
+
* @param retired - The bodies to destroy after the frame.
|
|
50426
|
+
* @param places - The places of the input, changed in place.
|
|
50427
|
+
* @param count - How many steps the chain returned.
|
|
50428
|
+
* @returns True when a place was retired.
|
|
50429
|
+
*/
|
|
50430
|
+
function retireLeft(retired, places, count) {
|
|
50431
|
+
if (places.length <= count) return false;
|
|
50432
|
+
for (let at = count; at < places.length; at += 1) {
|
|
50433
|
+
const left = places[at];
|
|
50434
|
+
if (left !== void 0) retired.push(left.body);
|
|
50435
|
+
}
|
|
50436
|
+
places.length = count;
|
|
50437
|
+
return true;
|
|
50413
50438
|
}
|
|
50414
50439
|
/**
|
|
50415
50440
|
* Walks the steps of one input with its places: a place that draws the step's stage is kept and
|
|
@@ -50427,19 +50452,19 @@ function placeSteps(pixi, inputs, index, steps) {
|
|
|
50427
50452
|
const places = inputs.places[index] ?? [];
|
|
50428
50453
|
let changed = false;
|
|
50429
50454
|
let rebuilt = false;
|
|
50430
|
-
for (
|
|
50431
|
-
const
|
|
50432
|
-
if (
|
|
50455
|
+
for (let at = 0; at < steps.length; at += 1) {
|
|
50456
|
+
const step = steps[at];
|
|
50457
|
+
if (step === void 0) continue;
|
|
50458
|
+
const before = places[at];
|
|
50459
|
+
const place = placeFor(pixi, inputs.retired, places, at, step);
|
|
50460
|
+
if (place !== before) rebuilt = true;
|
|
50433
50461
|
if (writeStep(place, step)) changed = true;
|
|
50434
50462
|
if (place.scale !== step.scale) {
|
|
50435
50463
|
place.scale = step.scale;
|
|
50436
50464
|
changed = true;
|
|
50437
50465
|
}
|
|
50438
50466
|
}
|
|
50439
|
-
|
|
50440
|
-
inputs.retired.push(left.body);
|
|
50441
|
-
rebuilt = true;
|
|
50442
|
-
}
|
|
50467
|
+
if (retireLeft(inputs.retired, places, steps.length)) rebuilt = true;
|
|
50443
50468
|
if (rebuilt) inputs.slot = Object.freeze({
|
|
50444
50469
|
...inputs.slot,
|
|
50445
50470
|
stages: stagesOf(inputs)
|
|
@@ -50464,7 +50489,10 @@ function evaluate(ectx, pixi, instance, inputs, resolution, backResolution) {
|
|
|
50464
50489
|
const kind = ectx.state.kinds.get(instance.kindId);
|
|
50465
50490
|
let changed = resolution !== inputs.resolution || backResolution !== inputs.backResolution;
|
|
50466
50491
|
let passes = 1;
|
|
50467
|
-
|
|
50492
|
+
const declared = instance.definition.inputs;
|
|
50493
|
+
for (let index = 0; index < declared.length; index += 1) {
|
|
50494
|
+
const input = declared[index];
|
|
50495
|
+
if (input === void 0) continue;
|
|
50468
50496
|
let steps;
|
|
50469
50497
|
inputs.context.resolution = input.from === "back" ? backResolution : resolution;
|
|
50470
50498
|
try {
|
|
@@ -74567,6 +74595,295 @@ void main() {
|
|
|
74567
74595
|
},
|
|
74568
74596
|
padding: "spread"
|
|
74569
74597
|
});
|
|
74598
|
+
//#endregion
|
|
74599
|
+
//#region src/plugins/effects/set/stages.ts
|
|
74600
|
+
/**
|
|
74601
|
+
* @file effects/set — the shared stages a chain member of the set draws its second texture with: `BloomDown` (what is
|
|
74602
|
+
* above a threshold, boxed down in one pass) and `BloomBlur` (a 13-tap blur in two dimensions, one pass). Each is a
|
|
74603
|
+
* `defineFilter` that draws alone, listed in a member's `inputs` and named by its chain's steps; none is a root
|
|
74604
|
+
* export (a game that wants a chain writes its own stages). Before each body the set head and `inputTexel()`.
|
|
74605
|
+
*/
|
|
74606
|
+
/**
|
|
74607
|
+
* The WGSL the stages put between the set head and their bodies: `inputTexel()`, one texel of the input in the 0..1 of
|
|
74608
|
+
* `inputPlace`. Live a stage's input is a share of a pooled texture, its clamp half a texel in from the frame, so one
|
|
74609
|
+
* texel of uv (`uInputPixel.zw`) over the clamp's span is one texel of the frame on both axes.
|
|
74610
|
+
*/
|
|
74611
|
+
const STAGE_WGSL = `fn inputTexel() -> vec2<f32> {
|
|
74612
|
+
return gfu.uInputPixel.zw / (gfu.uInputClamp.zw - gfu.uInputClamp.xy);
|
|
74613
|
+
}
|
|
74614
|
+
|
|
74615
|
+
`;
|
|
74616
|
+
/** The GLSL twin of `STAGE_WGSL`. */
|
|
74617
|
+
const STAGE_GLSL = `vec2 inputTexel() {
|
|
74618
|
+
return uInputPixel.zw / (uInputClamp.zw - uInputClamp.xy);
|
|
74619
|
+
}
|
|
74620
|
+
|
|
74621
|
+
`;
|
|
74622
|
+
/**
|
|
74623
|
+
* A stage's WGSL body with the set head and `inputTexel()` before it. A call, so a bundle that drops the stage drops
|
|
74624
|
+
* the text too.
|
|
74625
|
+
*
|
|
74626
|
+
* @param body - The stage's WGSL body.
|
|
74627
|
+
* @returns The head, the helper, then the body.
|
|
74628
|
+
* @example
|
|
74629
|
+
* ```ts
|
|
74630
|
+
* withStageWgsl("@fragment fn mainFragment").includes("fn inputTexel()"); // true
|
|
74631
|
+
* ```
|
|
74632
|
+
*/
|
|
74633
|
+
function withStageWgsl(body) {
|
|
74634
|
+
return withSetWgsl(STAGE_WGSL + body);
|
|
74635
|
+
}
|
|
74636
|
+
/**
|
|
74637
|
+
* A stage's GLSL body with the set head and `inputTexel()` before it, for the same reason as `withStageWgsl`.
|
|
74638
|
+
*
|
|
74639
|
+
* @param body - The stage's GLSL body.
|
|
74640
|
+
* @returns The head, the helper, then the body.
|
|
74641
|
+
* @example
|
|
74642
|
+
* ```ts
|
|
74643
|
+
* withStageGlsl("void main() {}").includes("vec2 inputTexel()"); // true
|
|
74644
|
+
* ```
|
|
74645
|
+
*/
|
|
74646
|
+
function withStageGlsl(body) {
|
|
74647
|
+
return withSetGlsl(STAGE_GLSL + body);
|
|
74648
|
+
}
|
|
74649
|
+
/**
|
|
74650
|
+
* The WGSL body of `BloomDown`: drawn at ¼ or ⅛ of the view's input, it reads that input with 4 taps on the diagonals
|
|
74651
|
+
* of its pixel, `reach` texels out on each axis (1 at ¼, 2 at ⅛: the centres of the four quarters of its footprint).
|
|
74652
|
+
* Each tap stands on the corner of 4 texels, so the linear sampler reads a 2 × 2 block. Each tap is cut by
|
|
74653
|
+
* `threshold` of its own alpha, premultiplied, `max(c.rgb − threshold × c.a, 0)`, so a half-transparent edge is cut at
|
|
74654
|
+
* its share of the threshold, and its alpha is its brightest channel: light covers as much as it shines, and where
|
|
74655
|
+
* nothing is bright the cut is transparent black. The four cuts are averaged. The corner turns a quarter each tap.
|
|
74656
|
+
*/
|
|
74657
|
+
const BLOOM_DOWN_WGSL = `@fragment
|
|
74658
|
+
fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
|
|
74659
|
+
let n = inputPlace(uv);
|
|
74660
|
+
let d = fu.reach * inputTexel();
|
|
74661
|
+
var sum = vec4<f32>(0.0);
|
|
74662
|
+
var corner = vec2<f32>(1.0);
|
|
74663
|
+
|
|
74664
|
+
for (var k = 0; k < 4; k++) {
|
|
74665
|
+
let c = sampleInput(n + corner * d);
|
|
74666
|
+
let cut = max(c.rgb - fu.threshold * c.a, vec3<f32>(0.0));
|
|
74667
|
+
let light = max(max(cut.r, cut.g), cut.b);
|
|
74668
|
+
sum += vec4<f32>(cut, light);
|
|
74669
|
+
corner = vec2<f32>(-corner.y, corner.x);
|
|
74670
|
+
}
|
|
74671
|
+
|
|
74672
|
+
return sum * 0.25;
|
|
74673
|
+
}
|
|
74674
|
+
`;
|
|
74675
|
+
/** The GLSL twin of `BLOOM_DOWN_WGSL`. */
|
|
74676
|
+
const BLOOM_DOWN_GLSL = `void main() {
|
|
74677
|
+
vec2 n = inputPlace(vTextureCoord);
|
|
74678
|
+
vec2 d = reach * inputTexel();
|
|
74679
|
+
vec4 sum = vec4(0.0);
|
|
74680
|
+
vec2 corner = vec2(1.0);
|
|
74681
|
+
|
|
74682
|
+
for (int k = 0; k < 4; k++) {
|
|
74683
|
+
vec4 c = sampleInput(n + corner * d);
|
|
74684
|
+
vec3 cut = max(c.rgb - threshold * c.a, vec3(0.0));
|
|
74685
|
+
float light = max(max(cut.r, cut.g), cut.b);
|
|
74686
|
+
sum += vec4(cut, light);
|
|
74687
|
+
corner = vec2(-corner.y, corner.x);
|
|
74688
|
+
}
|
|
74689
|
+
|
|
74690
|
+
finalColor = sum * 0.25;
|
|
74691
|
+
}
|
|
74692
|
+
`;
|
|
74693
|
+
/**
|
|
74694
|
+
* The WGSL body of `BloomBlur`, a blur in two dimensions, in one pass at the scale of its input: the centre and two
|
|
74695
|
+
* rings of 6 taps, the inner one at `0.5 × sigma` texels, the outer one at `sigma`. A tap `d` texels out weighs
|
|
74696
|
+
* `exp(−d² / (2 × sigma²))`: `exp(−1 / 8)` on the inner ring, `exp(−1 / 2)` on the outer, 1 at the centre, and the sum
|
|
74697
|
+
* is divided by the 13 weights' sum. The outer ring stands at 15° + 60° × k, the inner one 30° further, turned 60° a
|
|
74698
|
+
* tap: at the chain's sigmas (8, 5.25 at the phone's 2.625) no tap stands on a texel's row or column, so the linear
|
|
74699
|
+
* sampler reads the 4 texels around each. The chain caps sigma at 8.
|
|
74700
|
+
*/
|
|
74701
|
+
const BLOOM_BLUR_WGSL = `@fragment
|
|
74702
|
+
fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
|
|
74703
|
+
let n = inputPlace(uv);
|
|
74704
|
+
let far = fu.sigma * inputTexel();
|
|
74705
|
+
let near = far * 0.5;
|
|
74706
|
+
let nearWeight = exp(-0.125);
|
|
74707
|
+
let farWeight = exp(-0.5);
|
|
74708
|
+
var sum = sampleInput(n);
|
|
74709
|
+
var outer = vec2<f32>(0.9659258, 0.258819);
|
|
74710
|
+
|
|
74711
|
+
for (var k = 0; k < 6; k++) {
|
|
74712
|
+
let inner = vec2<f32>(0.8660254 * outer.x - 0.5 * outer.y, 0.5 * outer.x + 0.8660254 * outer.y);
|
|
74713
|
+
sum += sampleInput(n + inner * near) * nearWeight + sampleInput(n + outer * far) * farWeight;
|
|
74714
|
+
outer = vec2<f32>(0.5 * outer.x - 0.8660254 * outer.y, 0.8660254 * outer.x + 0.5 * outer.y);
|
|
74715
|
+
}
|
|
74716
|
+
|
|
74717
|
+
return sum / (1.0 + 6.0 * (nearWeight + farWeight));
|
|
74718
|
+
}
|
|
74719
|
+
`;
|
|
74720
|
+
/** The GLSL twin of `BLOOM_BLUR_WGSL`. */
|
|
74721
|
+
const BLOOM_BLUR_GLSL = `void main() {
|
|
74722
|
+
vec2 n = inputPlace(vTextureCoord);
|
|
74723
|
+
vec2 far = sigma * inputTexel();
|
|
74724
|
+
vec2 near = far * 0.5;
|
|
74725
|
+
float nearWeight = exp(-0.125);
|
|
74726
|
+
float farWeight = exp(-0.5);
|
|
74727
|
+
vec4 sum = sampleInput(n);
|
|
74728
|
+
vec2 outer = vec2(0.9659258, 0.258819);
|
|
74729
|
+
|
|
74730
|
+
for (int k = 0; k < 6; k++) {
|
|
74731
|
+
vec2 inner = vec2(0.8660254 * outer.x - 0.5 * outer.y, 0.5 * outer.x + 0.8660254 * outer.y);
|
|
74732
|
+
sum += sampleInput(n + inner * near) * nearWeight + sampleInput(n + outer * far) * farWeight;
|
|
74733
|
+
outer = vec2(0.5 * outer.x - 0.8660254 * outer.y, 0.8660254 * outer.x + 0.5 * outer.y);
|
|
74734
|
+
}
|
|
74735
|
+
|
|
74736
|
+
finalColor = sum / (1.0 + 6.0 * (nearWeight + farWeight));
|
|
74737
|
+
}
|
|
74738
|
+
`;
|
|
74739
|
+
/** The whole WGSL `BloomDown` is defined with: the set head, the stages' helper, then the body. */
|
|
74740
|
+
const BLOOM_DOWN_SOURCE = /*#__PURE__*/ withStageWgsl(BLOOM_DOWN_WGSL);
|
|
74741
|
+
/** The whole GLSL `BloomDown` is defined with. */
|
|
74742
|
+
const BLOOM_DOWN_GLSL_SOURCE = /*#__PURE__*/ withStageGlsl(BLOOM_DOWN_GLSL);
|
|
74743
|
+
/** The whole WGSL `BloomBlur` is defined with. */
|
|
74744
|
+
const BLOOM_BLUR_SOURCE = /*#__PURE__*/ withStageWgsl(BLOOM_BLUR_WGSL);
|
|
74745
|
+
/** The whole GLSL `BloomBlur` is defined with. */
|
|
74746
|
+
const BLOOM_BLUR_GLSL_SOURCE = /*#__PURE__*/ withStageGlsl(BLOOM_BLUR_GLSL);
|
|
74747
|
+
/**
|
|
74748
|
+
* The first stage of `Bloom`: what is above `threshold` of the view's input, premultiplied, boxed down to the step's
|
|
74749
|
+
* scale in one pass. 4 samples, `reach` texels out.
|
|
74750
|
+
*/
|
|
74751
|
+
const BloomDown = /*#__PURE__*/ defineFilter("effects.bloomDown", {
|
|
74752
|
+
wgsl: BLOOM_DOWN_SOURCE,
|
|
74753
|
+
glsl: BLOOM_DOWN_GLSL_SOURCE,
|
|
74754
|
+
uniforms: {
|
|
74755
|
+
threshold: .7,
|
|
74756
|
+
reach: 1
|
|
74757
|
+
}
|
|
74758
|
+
});
|
|
74759
|
+
/** The second stage of `Bloom`: a blur of `sigma` texels in both dimensions at once, 13 samples. */
|
|
74760
|
+
const BloomBlur = /*#__PURE__*/ defineFilter("effects.bloomBlur", {
|
|
74761
|
+
wgsl: BLOOM_BLUR_SOURCE,
|
|
74762
|
+
glsl: BLOOM_BLUR_GLSL_SOURCE,
|
|
74763
|
+
uniforms: { sigma: 0 }
|
|
74764
|
+
});
|
|
74765
|
+
//#endregion
|
|
74766
|
+
//#region src/plugins/effects/set/bloom.ts
|
|
74767
|
+
/**
|
|
74768
|
+
* @file effects/set — `Bloom`: light around the bright parts of a view. The one member with a chain: its input `bright`
|
|
74769
|
+
* is the view's light above `threshold`, cut and boxed down to ¼ (⅛ for a wide radius) in one pass and blurred there in
|
|
74770
|
+
* one more; the body adds it back by `strength`. 3 passes at any radius and resolution. A chain member never rides the
|
|
74771
|
+
* quad: a value change runs the chain again and redraws the kept picture's filter (stage 3).
|
|
74772
|
+
*/
|
|
74773
|
+
/** The most texels the blur's sigma may reach: past it the rings stand too far apart on the boxed-down light. */
|
|
74774
|
+
const MAX_SIGMA = 8;
|
|
74775
|
+
/** The scale of the ladder for a radius of at most `MAX_SIGMA` texels at it. */
|
|
74776
|
+
const QUARTER = 1 / 4;
|
|
74777
|
+
/** The scale of the ladder for a wider radius: one more halving, so sigma stays under its cap longer. */
|
|
74778
|
+
const EIGHTH = 1 / 8;
|
|
74779
|
+
/**
|
|
74780
|
+
* The WGSL body of `Bloom`: the view's own pixel, plus the blurred light of `bright` at the same place times
|
|
74781
|
+
* `strength`, at least 0. Both are premultiplied, so the sum is too; over an opaque pixel the light adds to its colour.
|
|
74782
|
+
*/
|
|
74783
|
+
const BLOOM_WGSL = `@fragment
|
|
74784
|
+
fn mainFragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
|
|
74785
|
+
let c = sampleInput(inputPlace(uv));
|
|
74786
|
+
|
|
74787
|
+
return c + sampleBright(uv) * max(fu.strength, 0.0);
|
|
74788
|
+
}
|
|
74789
|
+
`;
|
|
74790
|
+
/** The GLSL twin of `BLOOM_WGSL`. */
|
|
74791
|
+
const BLOOM_GLSL = `void main() {
|
|
74792
|
+
vec4 c = sampleInput(inputPlace(vTextureCoord));
|
|
74793
|
+
|
|
74794
|
+
finalColor = c + sampleBright(vTextureCoord) * max(strength, 0.0);
|
|
74795
|
+
}
|
|
74796
|
+
`;
|
|
74797
|
+
/**
|
|
74798
|
+
* Makes one ladder: the cut boxed down to `scale`, then the blur at the same scale.
|
|
74799
|
+
*
|
|
74800
|
+
* @param scale - The scale both steps draw at.
|
|
74801
|
+
* @param reach - How far out the down step's taps stand, in texels of the view's input: a quarter of its footprint,
|
|
74802
|
+
* `1 / (4 × scale)`. A whole number, written as one: a fraction in a uniform comes back boxed at each read of a frame.
|
|
74803
|
+
* @returns The ladder, its steps frozen, its uniform objects open to the chain.
|
|
74804
|
+
*/
|
|
74805
|
+
function ladderAt(scale, reach) {
|
|
74806
|
+
const down = {
|
|
74807
|
+
threshold: 0,
|
|
74808
|
+
reach
|
|
74809
|
+
};
|
|
74810
|
+
const blur = { sigma: 0 };
|
|
74811
|
+
return {
|
|
74812
|
+
steps: Object.freeze([Object.freeze({
|
|
74813
|
+
stage: BloomDown,
|
|
74814
|
+
scale,
|
|
74815
|
+
uniforms: down
|
|
74816
|
+
}), Object.freeze({
|
|
74817
|
+
stage: BloomBlur,
|
|
74818
|
+
scale,
|
|
74819
|
+
uniforms: blur
|
|
74820
|
+
})]),
|
|
74821
|
+
scale,
|
|
74822
|
+
down,
|
|
74823
|
+
blur
|
|
74824
|
+
};
|
|
74825
|
+
}
|
|
74826
|
+
/**
|
|
74827
|
+
* Makes the two ladders of the chain, once. A function: the module-scope rule sees no collection literal, and a bundle
|
|
74828
|
+
* that drops `Bloom` drops the call and the stages with it.
|
|
74829
|
+
*
|
|
74830
|
+
* @returns The ladder at ¼ and the one at ⅛.
|
|
74831
|
+
*/
|
|
74832
|
+
function bloomLadders() {
|
|
74833
|
+
return {
|
|
74834
|
+
quarter: ladderAt(QUARTER, 1),
|
|
74835
|
+
eighth: ladderAt(EIGHTH, 2)
|
|
74836
|
+
};
|
|
74837
|
+
}
|
|
74838
|
+
/** The two ladders, made at module scope once: the chain answers one of them, written in place, on every call. */
|
|
74839
|
+
const LADDERS = /*#__PURE__*/ bloomLadders();
|
|
74840
|
+
/**
|
|
74841
|
+
* The chain of `bright`: the ladder at ⅛ when the radius in texels at ¼ is over `MAX_SIGMA`, otherwise the one at ¼;
|
|
74842
|
+
* sigma is the radius in texels at the ladder's scale, capped at `MAX_SIGMA`, so past it the bloom stops widening.
|
|
74843
|
+
* The answer is one of two arrays made once, its threshold and sigma written in place: the engine copies what it
|
|
74844
|
+
* reads, and a strength tween, which runs the chain in every frame, allocates nothing here.
|
|
74845
|
+
*
|
|
74846
|
+
* @param value - The stored value of the `Bloom`.
|
|
74847
|
+
* @param context - The resolution of the view's input.
|
|
74848
|
+
* @returns The two steps, the same array for every call of a ladder.
|
|
74849
|
+
*/
|
|
74850
|
+
function bloomChain(value, context) {
|
|
74851
|
+
const texels = value.radius * context.resolution;
|
|
74852
|
+
const ladder = texels * QUARTER > MAX_SIGMA ? LADDERS.eighth : LADDERS.quarter;
|
|
74853
|
+
ladder.down.threshold = value.threshold;
|
|
74854
|
+
ladder.blur.sigma = Math.min(Math.max(texels * ladder.scale, 0), MAX_SIGMA);
|
|
74855
|
+
return ladder.steps;
|
|
74856
|
+
}
|
|
74857
|
+
/**
|
|
74858
|
+
* Light around the bright parts of a view and its subtree: what is above `threshold` (0..1) of its light, blurred
|
|
74859
|
+
* `radius` CSS px wide, added back by `strength` (0..2). For a reward, a gem, a lit lamp: an object, not the screen
|
|
74860
|
+
* (over the A26's screen its passes fill 1.9 Mpx a frame at 2.625). List it in a feature's `filters`, as a game's own
|
|
74861
|
+
* filter. It reads a second texture drawn by a chain of two stages, the light cut and boxed down to ¼ (⅛ when the
|
|
74862
|
+
* radius is over 8 texels at ¼: radius 16 at the phone's 2.625, 32 at 2) and blurred there: 3 passes at any radius.
|
|
74863
|
+
* A still view is kept as a picture; a tween of any field runs the chain again and redraws the picture's filter, 3
|
|
74864
|
+
* passes, in every frame it moves: it never draws on the view's quad. Past a sigma of 8 texels at ⅛ the bloom stops
|
|
74865
|
+
* widening.
|
|
74866
|
+
*
|
|
74867
|
+
* @example
|
|
74868
|
+
* ```ts
|
|
74869
|
+
* // features/shop/feature.ts lists it: filters: [Bloom]. A reward card blooms gold, then a motion fades it out.
|
|
74870
|
+
* Bloom.filter.inputs[0]?.chain({ ...Bloom().value }, { resolution: 2 }).length; // 2
|
|
74871
|
+
* view.tween(Bloom, { strength: 0 }, { ms: 400 });
|
|
74872
|
+
* ```
|
|
74873
|
+
*/
|
|
74874
|
+
const Bloom = /*#__PURE__*/ defineFilter("effects.bloom", {
|
|
74875
|
+
wgsl: /* @__PURE__ */ withSetWgsl(BLOOM_WGSL),
|
|
74876
|
+
glsl: /* @__PURE__ */ withSetGlsl(BLOOM_GLSL),
|
|
74877
|
+
uniforms: {
|
|
74878
|
+
strength: .6,
|
|
74879
|
+
threshold: .7,
|
|
74880
|
+
radius: 16
|
|
74881
|
+
},
|
|
74882
|
+
inputs: { bright: {
|
|
74883
|
+
stages: [BloomDown, BloomBlur],
|
|
74884
|
+
chain: bloomChain
|
|
74885
|
+
} }
|
|
74886
|
+
});
|
|
74570
74887
|
/**
|
|
74571
74888
|
* 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
|
|
74572
74889
|
* left glows in `edgeColor` over `edge` (0..1 of the noise). The noise has no time: the same cells go first at every
|
|
@@ -75168,4 +75485,4 @@ const screen = [
|
|
|
75168
75485
|
uiPlugin
|
|
75169
75486
|
];
|
|
75170
75487
|
//#endregion
|
|
75171
|
-
export {
|
|
75488
|
+
export { HAPTIC_KINDS as $, PASS_KINDS as $t, types_exports as A, Traced as At, types_exports$10 as B, Glow as Bt, defineFeature as C, PointerOver as Ct, defineBundles as D, Tappable as Dt, music as E, Swipeable as Et, types_exports$5 as F, Emitter as Ft, types_exports$15 as G, audioPlugin as Gt, types_exports$12 as H, Outline as Ht, types_exports$6 as I, Alpha as It, uiPlugin as J, animPlugin as Jt, types_exports$16 as K, scenesPlugin as Kt, types_exports$7 as L, Blur as Lt, types_exports$2 as M, messageArgument as Mt, types_exports$3 as N, messageDuration as Nt, load as O, Touchable as Ot, types_exports$4 as P, effectsPlugin as Pt, platformPlugin as Q, rendererPlugin as Qt, types_exports$8 as R, ColorMatrix as Rt, tr as S, Pointer as St, defineEmitter as T, Pressed as Tt, types_exports$13 as U, defineFilter as Ut, types_exports$11 as V, Noise as Vt, types_exports$14 as W, debugPlugin as Wt, defineMotion as X, Animation as Xt, resolve as Y, AnimPlayer as Yt, textPlugin as Z, Frames as Zt, guide as _, modelPlugin as _n, inputPlugin as _t, Vignette as a, PROBLEM_RULES as an, parallel as at, projection as b, timePlugin as bn, Held as bt, RevealLine as c, DEMAND_REASONS as cn, set as ct, Flash as d, refuseStart as dn, spawned as dt, frameAt as en, defineAnimation as et, Dissolve as f, contribution as fn, stagger as ft, defineEffect as g, type as gn, wait as gt, cubicBezier as h, to as hn, use as ht, screen as i, PERF_LOG_VERSION as in, mark as it, types_exports$1 as j, i18nPlugin as jt, ready as k, Traceable as kt, Grade as l, worldPlugin as ln, sfx as lt, Aura as m, slot as mn, tween as mt, createPlugin as n, PERF_CAUSES as nn, frames as nt, Shine as o, SHADER_WHATS as on, play$1 as ot, Bloom as p, exit as pn, stopSfx as pt, types_exports$17 as q, assetsPlugin as qt, defineGame as r, PERF_GAP_BUCKETS as rn, haptic as rt, RevealRound as s, CANVAS_RESTARTS as sn, sequence as st, createApp as t, MONITOR_SECTIONS as tn, external as tt, Fold as u, flowPlugin as un, spawn as ut, hint as v, SaveUnreadableError as vn, Draggable as vt, flattenFeatures as w, Pressable as wt, defineScene as x, clockPlugin as xn, Hovered as xt, schedule as y, lifecyclePlugin as yn, DropTarget as yt, types_exports$9 as z, Displacement as zt };
|
package/dist/testing.d.mts
CHANGED
|
@@ -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-Ce5W0gZe.mjs";
|
|
2
|
-
import { t as createApp } from "./index-
|
|
3
|
-
import { b as memory, x as saveOf, y as WithGameState } from "./types-
|
|
2
|
+
import { t as createApp } from "./index-DDZ9K9qO.mjs";
|
|
3
|
+
import { b as memory, x as saveOf, y as WithGameState } from "./types-CMag4vDu.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-CEG1oR5D.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
package/dist/testing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dn as refuseStart, gn as type, pn as exit, t as createApp, w as flattenFeatures } from "./src-DVJ0d04R.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-CCiUwvlp.mjs";
|
|
@@ -1634,7 +1634,9 @@ type FilterInput<Value> = {
|
|
|
1634
1634
|
readonly stages: readonly FilterStage[];
|
|
1635
1635
|
/**
|
|
1636
1636
|
* The steps of the second texture for this value and resolution. Pure: no state, no randomness; the context object
|
|
1637
|
-
* is the engine's and valid during the call only.
|
|
1637
|
+
* is the engine's and valid during the call only. The engine reads the steps during the call and copies the uniform
|
|
1638
|
+
* values it needs, so a chain may answer the same array on every call, its uniform objects written in place (what
|
|
1639
|
+
* `Bloom` does, so a tween allocates nothing in the chain).
|
|
1638
1640
|
*
|
|
1639
1641
|
* @param value - The stored value of the filter component.
|
|
1640
1642
|
* @param context - The resolution of the texture the view is drawn into.
|
|
@@ -2398,8 +2400,24 @@ type FoldValue = {
|
|
|
2398
2400
|
enabled: boolean;
|
|
2399
2401
|
order: number;
|
|
2400
2402
|
};
|
|
2403
|
+
/**
|
|
2404
|
+
* `Bloom`: light around the bright parts of the view: what is above `threshold` (0..1) of its light, blurred `radius`
|
|
2405
|
+
* CSS px wide and added back by `strength` (0..2).
|
|
2406
|
+
*
|
|
2407
|
+
* @example
|
|
2408
|
+
* ```ts
|
|
2409
|
+
* const value: BloomValue = { strength: 0.6, threshold: 0.7, radius: 16, enabled: true, order: 0 };
|
|
2410
|
+
* ```
|
|
2411
|
+
*/
|
|
2412
|
+
type BloomValue = {
|
|
2413
|
+
strength: number;
|
|
2414
|
+
threshold: number;
|
|
2415
|
+
radius: number;
|
|
2416
|
+
enabled: boolean;
|
|
2417
|
+
order: number;
|
|
2418
|
+
};
|
|
2401
2419
|
declare namespace types_d_exports$2 {
|
|
2402
|
-
export { AlphaValue, AssetsReplaced$1 as AssetsReplaced, AuraValue, 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 };
|
|
2420
|
+
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 };
|
|
2403
2421
|
}
|
|
2404
2422
|
/**
|
|
2405
2423
|
* effects plugin config. `maxParticles` here is the global warning line; the `maxParticles` of an
|
|
@@ -3386,4 +3404,4 @@ type UiApi = {
|
|
|
3386
3404
|
}> | undefined;
|
|
3387
3405
|
};
|
|
3388
3406
|
//#endregion
|
|
3389
|
-
export {
|
|
3407
|
+
export { SfxDescriptor 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, HapticKind 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, types_d_exports$3 as Z, State$2 as _, use as _t, AudioApi as a, haptic as at, BloomValue as b, types_d_exports$4 as bt, MusicDescriptor as c, play as ct, State$1 as d, sfx as dt, Step as et, VolumesFor as f, spawn as ft, EffectsStats as g, tween as gt, EffectsApi as h, stopSfx as ht, types_d_exports as i, frames as it, EmitterValue as j, EmitterConfig as k, MusicOptions as l, sequence as lt, Config$2 as m, stagger as mt, State as n, defineAnimation as nt, AudioContextLike as o, mark as ot, types_d_exports$1 as p, spawned as pt, FramesValue as q, UiApi as r, external as rt, Config$1 as s, parallel as st, Config as t, HAPTIC_KINDS as tt, SoundEntry as u, set as ut, types_d_exports$2 as v, wait as vt, GradeValue as w, DissolveValue as x, AuraValue as y, OverlayApi as yt, FilterValueOf as z };
|
|
@@ -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-Ce5W0gZe.mjs";
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-BvgY7Ncf.mjs";
|
|
3
3
|
import { H as I18nApi, J as TextKey, q as StringTable } from "./types-C1B7-x7p.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { Et as PlatformProvider, It as audioPlugin, Nt as effectsPlugin, i as screen, t as createApp, wt as platformPlugin } from "./index-DDZ9K9qO.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 { Nr as Api$4, Or as Api$1, Z as Api, ni as Api$3, zr as Api$2 } from "./types-Ce5W0gZe.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { W as AnimApi, r as UiApi } from "./types-BvgY7Ncf.mjs";
|
|
3
3
|
import { L as InputApi } from "./types-C1B7-x7p.mjs";
|
|
4
4
|
import { r as Repro } from "./headless-CEG1oR5D.mjs";
|
|
5
5
|
import { i as ControlApp, o as InputOf } from "./types-C612npUH.mjs";
|
|
6
|
-
import { t as commands } from "./commands-
|
|
6
|
+
import { t as commands } from "./commands-TSyhs2-E.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/visual/types.d.ts
|
|
9
9
|
/** The base commands of the `/control` door, keyed by their short names. */
|
package/dist/visual.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-
|
|
1
|
+
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-PsEr2KD-.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`; the effect set `Flash`, `Grade`, `Vignette`, `RevealLine`, `RevealRound`, `Dissolve`, `Shine`, `Aura`, `Fold` and their value types `FlashValue`, `GradeValue`, `VignetteValue`, `RevealLineValue`, `RevealRoundValue`, `DissolveValue`, `ShineValue`, `AuraValue`, `FoldValue`.
|
|
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`.
|
|
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,7 +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), `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 })`. A view that carries a filter no feature lists draws unfiltered; a dev build warns `effects:filter-unlisted` once per id.
|
|
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), `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.
|
|
680
680
|
- API: `app.effects.stats()` returns `{ particles, emitters, filters, renderPasses }`; headless every number is 0.
|
|
681
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.
|
|
682
682
|
- Config: `maxParticles: 3000` and `maxPasses: 24`, each warns once per crossing; `phone: "auto"`; `blur: { quality: 2, phoneResolution: 0.5 }`.
|