@moku-labs/game 0.15.5 → 0.15.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/page.d.mts +1 -1
- package/dist/app/system.d.mts +2 -2
- package/dist/app.d.mts +1 -1
- package/dist/app.mjs +1 -1
- package/dist/{commands-e_I5i8dK.d.mts → commands-CAEwtEAy.d.mts} +1 -1
- package/dist/control.d.mts +1 -1
- package/dist/{index-Bq_93oZv.d.mts → index-DytzVJFz.d.mts} +13 -6
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/inspect.d.mts +1 -1
- package/dist/{src-DnclBdeU.mjs → src-DWJabPi4.mjs} +136 -28
- package/dist/testing.d.mts +2 -2
- package/dist/testing.mjs +1 -1
- package/dist/{types-C2g2KYCN.d.mts → types-C2LZJIxH.d.mts} +23 -3
- package/dist/{types-6inPYTzE.d.mts → types-CRgEt4wq.d.mts} +2 -2
- package/dist/{visual-DalSHy9z.d.mts → visual-gTuXlmvH.d.mts} +2 -2
- package/dist/visual.d.mts +1 -1
- package/package.json +1 -1
package/dist/app/page.d.mts
CHANGED
package/dist/app/system.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dr as PlayerStateProvider } from "../types-DnttyLeu.mjs";
|
|
2
|
-
import { mt as PlatformProvider } from "../index-
|
|
3
|
-
import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-
|
|
2
|
+
import { mt as PlatformProvider } from "../index-DytzVJFz.mjs";
|
|
3
|
+
import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-CRgEt4wq.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 { Sr as Json } from "./types-DnttyLeu.mjs";
|
|
2
2
|
import { V as StringTable } from "./types-CWSMo70I.mjs";
|
|
3
|
-
import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-
|
|
3
|
+
import { a as GameHandle, c as MemoryProvider, d as SaveKind, f as Scenario, g as SystemName, i as GameDefinition, l as PageAgent, n as GameApp, o as GamePluginConfigs, p as ScreenSeams, r as GameConfig, s as HeadlessSeams, v as WithGameState } from "./types-CRgEt4wq.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 { Ot as effectsPlugin, i as screen, m as flattenFeatures, q as platformPlugin, t as createApp, zt as audioPlugin } from "./src-
|
|
1
|
+
import { Ot as effectsPlugin, i as screen, m as flattenFeatures, q as platformPlugin, t as createApp, zt as audioPlugin } from "./src-DWJabPi4.mjs";
|
|
2
2
|
import { t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { n as isFakeClock, t as fakeClock } from "./fake-6mazmHK3.mjs";
|
|
4
4
|
//#region src/app/define.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dt as DebugSwitches, I as Captured, Ir as Api, Jr as Time, Nr as StoreApi, S as ScenesApi, T as Api$1, Wr as FrameRate, Zn as Bookmark, Zt as Api$2, er as FlowState, jr as Snapshot } from "./types-DnttyLeu.mjs";
|
|
2
|
-
import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-
|
|
2
|
+
import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-C2LZJIxH.mjs";
|
|
3
3
|
import { j as InputApi } from "./types-CWSMo70I.mjs";
|
|
4
4
|
import { t as HeadlessApp } from "./headless-DDkRwLnJ.mjs";
|
|
5
5
|
import { n as Command, r as ControlApp } from "./types-DFoxDq-g.mjs";
|
package/dist/control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as HeadlessApp } from "./headless-DDkRwLnJ.mjs";
|
|
2
2
|
import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-DFoxDq-g.mjs";
|
|
3
|
-
import { t as commands } from "./commands-
|
|
3
|
+
import { t as commands } from "./commands-CAEwtEAy.mjs";
|
|
4
4
|
import { t as defineCommand } from "./define-CNctRrea.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/flow/doors/dev.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as PassKind, Bn as TextStylesOf, Br as State$4, Bt as OverlayValue, C as State$7, Cr as Root, Dn as ProjectionSpec, E as Config$6, En as ProjectionMotion, Er as Patch, Fn as EmitterIdOf, Gr as RateChange, Gt as SpriteOptions, H as FrameRecord, Hn as defineFlow, Hr as Api$5, In as GameTypes, Ir as Api$3, It as HudPartValue, Jn as FeaturePlugin, Jt as TransformValue, Kr as State$8, Kt as SpriteValue, Ln as HudKeysOf, Lr as Config$4, Mn as Api$2, Mt as ViewportSize, N as State$6, Nn as BundlesOf, Nr as StoreApi, On as ReducedMotion, Pn as Config$3, Pr as RngApi, Qn as DefineNode, Qr as Require, Qt as Config$8, Rr as Events, Rt as NineSliceValue, S as ScenesApi, Sr as Json, T as Api$4, Tn as NumericFields, U as FrameRing, Ur as Config$7, Ut as ShapeValue, Xr as Config$9, Yn as FeatureTree, Yt as sprite, Zr as Events$1, Zt as Api$6, _ as DefineScene, _n as SystemFor, _r as State$2, a as Config$1, an as ComponentHandle, b as SceneDefinition, bn as DescriptionNode, br as Config$5, c as LoadBundles, cn as ComponentValue, cr as EffectOptions, en as State$9, f as State$1, fn as Mut, fr as Answer, g as AnySceneProjection, gn as SystemDefinition, hn as ResourceType, hr as Config$2, i as BundleSpec, ir as SceneIdOf, l as LoadReason, lr as GuideOptions, mn as QueryTerm, o as DefineBundles, or as Descriptor, p as Tier, pn as Narrowed, pr as Api$1, qn as FeatureDescription, qr as ThermalReading, r as BundleMap, sn as ComponentType, sr as Effect, t as Api, u as LoadResult, ur as Hint, vn as TagType, wr as State$5, x as SceneSpec, xn as Ease, y as LayerMap, zn as State$3, zr as PauseReason } from "./types-DnttyLeu.mjs";
|
|
2
|
-
import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$10, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, ct as OverlayApi, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, m as Config$12, n as State$13, r as UiApi, s as Config$11, t as Config$13, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-
|
|
2
|
+
import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$10, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, ct as OverlayApi, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, m as Config$12, n as State$13, r as UiApi, s as Config$11, t as Config$13, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-C2LZJIxH.mjs";
|
|
3
3
|
import { A as Config$15, B as State$14, C as TextBind, D as TextValue, E as TextStyles, F as Config$14, G as IsFlags, H as TextKey, I as I18nApi, K as ResolvedStyle, L as IntlKit, M as State$15, P as Argument, R as Message, S as TextApi, T as TextStyleInput, U as TypedTr, Y as WhenFlags, _ as BindOptions, b as Point, g as BindField, j as InputApi, k as defineComponent, m as IntrinsicElementsFor, p as defineTokens, q as Style, s as PopupComponent, v as Config$16, x as State$16, y as CountdownValue, z as Part } from "./types-CWSMo70I.mjs";
|
|
4
4
|
import { Log } from "@moku-labs/common/browser";
|
|
5
5
|
import { PluginCtx } from "@moku-labs/core";
|
|
@@ -1607,11 +1607,16 @@ declare const Noise: ComponentType<NoiseValue>;
|
|
|
1607
1607
|
declare const Displacement: ComponentType<DisplacementValue>;
|
|
1608
1608
|
/**
|
|
1609
1609
|
* Pixi's alpha over a view and its subtree as one layer, so overlapping children do not show
|
|
1610
|
-
* through each other.
|
|
1610
|
+
* through each other. `resolution: 0` draws at the resolution of the canvas; a number draws the
|
|
1611
|
+
* subtree at that many texels per CSS px, at most 4, and every other filter of the view with it
|
|
1612
|
+
* (Pixi's smallest resolution wins). At `alpha: 1` and `resolution: 0` the filter is switched off
|
|
1613
|
+
* after 8 frames there: it would copy the subtree unchanged through a pass of its own, and a
|
|
1614
|
+
* keyframe that only touches 1 switches nothing. One render pass per apply.
|
|
1611
1615
|
*
|
|
1612
1616
|
* @example
|
|
1613
1617
|
* ```ts
|
|
1614
|
-
*
|
|
1618
|
+
* // The fog of a memory screen, drawn at half a texel per CSS px through one pass.
|
|
1619
|
+
* Alpha({ resolution: 0.5 }).value; // { alpha: 1, resolution: 0.5, enabled: true, order: 0 }
|
|
1615
1620
|
* ```
|
|
1616
1621
|
*/
|
|
1617
1622
|
declare const Alpha: ComponentType<AlphaValue>;
|
|
@@ -1630,18 +1635,20 @@ declare const Alpha: ComponentType<AlphaValue>;
|
|
|
1630
1635
|
* `enabled: true` and `order: 0`. An input `blur` gives the body `sampleBlur(uv)`: the last texture
|
|
1631
1636
|
* of its chain, read at the body's `uv`. A `fallback` draws instead when the filter is broken.
|
|
1632
1637
|
* An `area` answers, from the value, the rectangle in the entity's own units outside of which the
|
|
1633
|
-
* filter draws nothing: Pixi then renders and fills only that box, not the view's bounds.
|
|
1638
|
+
* filter draws nothing: Pixi then renders and fills only that box, not the view's bounds. A
|
|
1639
|
+
* `resolution` draws the view and its filters at that many texels per CSS px instead of the
|
|
1640
|
+
* canvas's.
|
|
1634
1641
|
* Register it through the `filters` key of a feature. The README shows a filter with a blur input
|
|
1635
1642
|
* and one with an `area`.
|
|
1636
1643
|
*
|
|
1637
1644
|
* @param id - The filter id, also the component name; unique, and not one of the built-ins.
|
|
1638
1645
|
* @param spec - Both bodies, the uniforms, the passes one apply costs, the padding, the inputs, the fallback, the
|
|
1639
|
-
* cache category and the
|
|
1646
|
+
* cache category, the area and the resolution.
|
|
1640
1647
|
* @returns The component type, with the frozen `filter` definition attached.
|
|
1641
1648
|
* @throws {Error} When the id is empty, the WGSL has no `mainFragment`, the GLSL no `void main(`,
|
|
1642
1649
|
* a uniform is reserved, badly named or of no known form, the passes or the padding break
|
|
1643
1650
|
* their rules, an input or the fallback breaks one of its rules, `passes` is given with inputs,
|
|
1644
|
-
* or `
|
|
1651
|
+
* `area` is not a function, or `resolution` is not a number from 0 to 4.
|
|
1645
1652
|
* @example
|
|
1646
1653
|
* ```ts
|
|
1647
1654
|
* // features/board/effects.ts: a gold tint a motion hook tweens on a merge, on WebGPU and WebGL.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as PassKind, Ar as SaveUnreadableError, B as FrameReadResult, Bt as OverlayValue, Ct as SHADER_WHATS, D as MonitorConfig, Et as WarmDetail, F as types_d_exports$12, Ft as HudPart, G as MONITOR_SECTIONS, Gn as to, H as FrameRecord, Ht as Shape, It as HudPartValue, J as OverlayWhat, K as MonitorSections, Kn as type, L as MonitorCounts, Lt as NineSlice, M as PoolTrim, Pt as Display, Q as PROBLEM_RULES, St as ProblemRule, Tr as types_d_exports$10, Tt as ShaderWhat, U as FrameRing, Un as exit, V as FrameReadout, Vn as types_d_exports$6, Vr as types_d_exports$9, Vt as Parent, W as LongFrameEntry, Wn as slot, Wt as Sprite, X as PERF_GAP_BUCKETS, Xt as DEMAND_REASONS, Y as PERF_CAUSES, Yr as types_d_exports$15, Yt as sprite, Z as PERF_LOG_VERSION, _t as PerfStartupLine, at as PerfCounts, bn as DescriptionNode, bt as PoolTrimDetail, ct as PerfEventName, dt as PerfLogLine, et as PassRecord, ft as PerfLongFrameLine, gt as PerfSpikeLine, h as types_d_exports$1, ht as PerfSampleLine, it as PerfCollectorLine, lt as PerfGapLine, mt as PerfMeasured, nt as PerfChange, ot as PerfDisplay, pt as PerfMarkLine, q as OverlayEventDetail, qt as Transform, rt as PerfChangeEntry, st as PerfEventLine, tn as types_d_exports$17, tt as PerfCause, ut as PerfHeaderLine, vr as types_d_exports$3, vt as PerfTelemetryLine, w as types_d_exports$13, wt as ShaderEventDetail, xt as ProblemEventDetail, yt as PerfThermalLine, z as FrameColumns, zt as Overlay } from "./types-DnttyLeu.mjs";
|
|
2
|
-
import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as tween, et as set, i as types_d_exports$16, it as stagger, lt as types_d_exports$4, nt as spawn, ot as use, p as types_d_exports$2, q as external, rt as spawned, st as wait, tt as sfx, v as types_d_exports$5 } from "./types-
|
|
2
|
+
import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as tween, et as set, i as types_d_exports$16, it as stagger, lt as types_d_exports$4, nt as spawn, ot as use, p as types_d_exports$2, q as external, rt as spawned, st as wait, tt as sfx, v as types_d_exports$5 } from "./types-C2LZJIxH.mjs";
|
|
3
3
|
import { N as types_d_exports$8, O as types_d_exports$14, W as types_d_exports$7, _ as BindOptions, d as LocalWrite, f as popup, k as defineComponent, l as Box, p as defineTokens, u as DebugTrigger, w as TextFormat, y as CountdownValue } from "./types-CWSMo70I.mjs";
|
|
4
|
-
import { $ as tag, A as DropTarget, At as bind, B as Traceable, C as AnimPlayer, Ct as clockPlugin, D as defineBundles, Dt as projection, E as defineScene, Et as animPlugin, F as Pressable, G as Layer, H as PASS_KINDS, I as Pressed, J as Tree, K as Now, L as Swipeable, M as Hovered, Mt as label, N as Pointer, O as load, Ot as Countdown, P as PointerOver, Q as system, R as Tappable, S as defineMotion, St as debugPlugin, T as Frames, Tt as assetsPlugin, U as frameAt, V as Traced, W as Exiting, X as mut, Y as component, Z as resource, _ as defineStyle, _t as lifecyclePlugin, a as defineEmitter, at as flattenFeatures, b as messageDuration, bt as flowPlugin, c as Alpha, ct as timePlugin, d as Displacement, dt as rendererPlugin, et as defineEffect, f as Glow, ft as platformPlugin, g as resolve, gt as modelPlugin, h as music, ht as types_d_exports$11, i as screen, it as defineFeature, j as Held, jt as defineTextStyles, k as Draggable, kt as Text, l as Blur, lt as textPlugin, m as Outline, mt as PlatformProvider, n as createPlugin, nt as hint, o as Emitter, ot as worldPlugin, p as Noise, pt as BackResult, q as Order, r as defineGame, rt as schedule, s as defineFilter, st as uiPlugin, t as createApp, tt as guide, u as ColorMatrix, ut as scenesPlugin, v as tr, vt as inputPlugin, w as Animation, wt as audioPlugin, x as cubicBezier, xt as effectsPlugin, y as messageArgument, yt as i18nPlugin, z as Touchable } from "./index-
|
|
4
|
+
import { $ as tag, A as DropTarget, At as bind, B as Traceable, C as AnimPlayer, Ct as clockPlugin, D as defineBundles, Dt as projection, E as defineScene, Et as animPlugin, F as Pressable, G as Layer, H as PASS_KINDS, I as Pressed, J as Tree, K as Now, L as Swipeable, M as Hovered, Mt as label, N as Pointer, O as load, Ot as Countdown, P as PointerOver, Q as system, R as Tappable, S as defineMotion, St as debugPlugin, T as Frames, Tt as assetsPlugin, U as frameAt, V as Traced, W as Exiting, X as mut, Y as component, Z as resource, _ as defineStyle, _t as lifecyclePlugin, a as defineEmitter, at as flattenFeatures, b as messageDuration, bt as flowPlugin, c as Alpha, ct as timePlugin, d as Displacement, dt as rendererPlugin, et as defineEffect, f as Glow, ft as platformPlugin, g as resolve, gt as modelPlugin, h as music, ht as types_d_exports$11, i as screen, it as defineFeature, j as Held, jt as defineTextStyles, k as Draggable, kt as Text, l as Blur, lt as textPlugin, m as Outline, mt as PlatformProvider, n as createPlugin, nt as hint, o as Emitter, ot as worldPlugin, p as Noise, pt as BackResult, q as Order, r as defineGame, rt as schedule, s as defineFilter, st as uiPlugin, t as createApp, tt as guide, u as ColorMatrix, ut as scenesPlugin, v as tr, vt as inputPlugin, w as Animation, wt as audioPlugin, x as cubicBezier, xt as effectsPlugin, y as messageArgument, yt as i18nPlugin, z as Touchable } from "./index-DytzVJFz.mjs";
|
|
5
5
|
export { Alpha, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, type BackResult, type BindOptions, Blur, Box, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, types_d_exports$6 as Flow, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_d_exports$13 as Scenes, type ShaderEventDetail, type ShaderWhat, Shape, Sprite, Swipeable, Tappable, Text, type TextFormat, types_d_exports$14 as TextTypes, types_d_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_d_exports$16 as Ui, type WarmDetail, types_d_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, 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, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as mark, $t as PROBLEM_RULES, A as types_exports$6, At as Alpha, B as Box, Bt as scenesPlugin, C as types_exports$13, Ct as Traceable, D as types_exports$9, Dt as messageDuration, E as types_exports$10, Et as messageArgument, F as types_exports$1, Ft as Noise, G as defineStyle, Gt as Frames, H as LocalWrite, Ht as animPlugin, I as types_exports, It as Outline, J as HAPTIC_KINDS, Jt as frameAt, K as textPlugin, Kt as rendererPlugin, L as uiPlugin, Lt as defineFilter, M as types_exports$4, Mt as ColorMatrix, N as types_exports$3, Nt as Displacement, O as types_exports$8, Ot as effectsPlugin, P as types_exports$2, Pt as Glow, Q as haptic, Qt as PERF_LOG_VERSION, R as resolve, Rt as debugPlugin, S as types_exports$14, St as Touchable, T as types_exports$11, Tt as i18nPlugin, U as popup, Ut as AnimPlayer, V as DebugTrigger, Vt as assetsPlugin, W as defineTokens, Wt as Animation, X as external, Xt as PERF_CAUSES, Y as defineAnimation, Yt as MONITOR_SECTIONS, Z as frames, Zt as PERF_GAP_BUCKETS, _ as defineBundles, _t as PointerOver, a as cubicBezier, an as exit, at as spawn, b as types_exports$16, bt as Swipeable, c as hint, cn as type, ct as tween, d as defineScene, dn as lifecyclePlugin, dt as inputPlugin, en as SHADER_WHATS, et as parallel, f as tr, fn as timePlugin, ft as Draggable, g as music, gt as Pointer, h as defineEmitter, ht as Hovered, i as screen, it as sfx, j as types_exports$5, jt as Blur, k as types_exports$7, kt as Emitter, l as schedule, ln as modelPlugin, lt as use, m as flattenFeatures, mt as Held, n as createPlugin, nn as worldPlugin, nt as sequence, o as defineEffect, on as slot, ot as spawned, p as defineFeature, pn as clockPlugin, pt as DropTarget, q as platformPlugin, qt as PASS_KINDS, r as defineGame, rn as flowPlugin, rt as set, s as guide, sn as to, st as stagger, t as createApp, tn as DEMAND_REASONS, tt as play, u as projection, un as SaveUnreadableError, ut as wait, v as load, vt as Pressable, w as types_exports$12, wt as Traced, x as types_exports$15, xt as Tappable, y as types_exports$17, yt as Pressed, z as defineMotion, zt as audioPlugin } from "./src-
|
|
1
|
+
import { $ as mark, $t as PROBLEM_RULES, A as types_exports$6, At as Alpha, B as Box, Bt as scenesPlugin, C as types_exports$13, Ct as Traceable, D as types_exports$9, Dt as messageDuration, E as types_exports$10, Et as messageArgument, F as types_exports$1, Ft as Noise, G as defineStyle, Gt as Frames, H as LocalWrite, Ht as animPlugin, I as types_exports, It as Outline, J as HAPTIC_KINDS, Jt as frameAt, K as textPlugin, Kt as rendererPlugin, L as uiPlugin, Lt as defineFilter, M as types_exports$4, Mt as ColorMatrix, N as types_exports$3, Nt as Displacement, O as types_exports$8, Ot as effectsPlugin, P as types_exports$2, Pt as Glow, Q as haptic, Qt as PERF_LOG_VERSION, R as resolve, Rt as debugPlugin, S as types_exports$14, St as Touchable, T as types_exports$11, Tt as i18nPlugin, U as popup, Ut as AnimPlayer, V as DebugTrigger, Vt as assetsPlugin, W as defineTokens, Wt as Animation, X as external, Xt as PERF_CAUSES, Y as defineAnimation, Yt as MONITOR_SECTIONS, Z as frames, Zt as PERF_GAP_BUCKETS, _ as defineBundles, _t as PointerOver, a as cubicBezier, an as exit, at as spawn, b as types_exports$16, bt as Swipeable, c as hint, cn as type, ct as tween, d as defineScene, dn as lifecyclePlugin, dt as inputPlugin, en as SHADER_WHATS, et as parallel, f as tr, fn as timePlugin, ft as Draggable, g as music, gt as Pointer, h as defineEmitter, ht as Hovered, i as screen, it as sfx, j as types_exports$5, jt as Blur, k as types_exports$7, kt as Emitter, l as schedule, ln as modelPlugin, lt as use, m as flattenFeatures, mt as Held, n as createPlugin, nn as worldPlugin, nt as sequence, o as defineEffect, on as slot, ot as spawned, p as defineFeature, pn as clockPlugin, pt as DropTarget, q as platformPlugin, qt as PASS_KINDS, r as defineGame, rn as flowPlugin, rt as set, s as guide, sn as to, st as stagger, t as createApp, tn as DEMAND_REASONS, tt as play, u as projection, un as SaveUnreadableError, ut as wait, v as load, vt as Pressable, w as types_exports$12, wt as Traced, x as types_exports$15, xt as Tappable, y as types_exports$17, yt as Pressed, z as defineMotion, zt as audioPlugin } from "./src-DWJabPi4.mjs";
|
|
2
2
|
import { A as Order, C as Sprite, D as Exiting, E as sprite, F as system, L as tag, M as component, N as mut, O as Layer, P as resource, S as Shape, _ as HudPart, c as Countdown, f as defineTextStyles, g as Display, j as Tree, k as Now, l as Text, p as label, u as bind, v as NineSlice, w as Transform, x as Parent, y as Overlay } from "./visual-2m4wJL_z.mjs";
|
|
3
3
|
import { r as defineComponent } from "./flatten-BkXuscAV.mjs";
|
|
4
4
|
export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, types_exports$6 as Flow, Frames, Glow, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, Shape, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, 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, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, 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 { $n as FlowGraph, $t as Explained, P as Under, R as RenderStats, Rn as Position, T as Api$2, Zt as Api$1, dn as FrameDiff, jr as Snapshot, m as Usage, on as ComponentSchema, t as Api$3, tr as JournalEntry, un as EntitySnapshot, yr as Api } from "./types-DnttyLeu.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-C2LZJIxH.mjs";
|
|
3
3
|
import { c as UiNode } from "./types-CWSMo70I.mjs";
|
|
4
4
|
import { t as HeadlessApp } from "./headless-DDkRwLnJ.mjs";
|
|
5
5
|
import { a as InputOf, c as Source, i as InputArguments, l as WatchApp, o as InputSchema, t as CheatEntry, u as WatchInput } from "./types-DFoxDq-g.mjs";
|
|
@@ -12317,7 +12317,7 @@ function withinRatio(differing, bytes) {
|
|
|
12317
12317
|
* @param host - The host module (`resolution()`).
|
|
12318
12318
|
* @returns Device pixels per CSS pixel; `undefined` for the half resolution of `host.pixels`.
|
|
12319
12319
|
*/
|
|
12320
|
-
function readResolution(ctx, host) {
|
|
12320
|
+
function readResolution$1(ctx, host) {
|
|
12321
12321
|
return hasPictures(ctx.state.kept) ? host.resolution() : void 0;
|
|
12322
12322
|
}
|
|
12323
12323
|
/**
|
|
@@ -12341,7 +12341,7 @@ function hasPictures(kept) {
|
|
|
12341
12341
|
* @param decided - The decision of this frame, changed in place when a missed frame is drawn.
|
|
12342
12342
|
*/
|
|
12343
12343
|
function verifyFrame(ctx, state, host, decided) {
|
|
12344
|
-
const resolution = readResolution(ctx, host);
|
|
12344
|
+
const resolution = readResolution$1(ctx, host);
|
|
12345
12345
|
if (decided.reason !== "none") {
|
|
12346
12346
|
state.verify.reference = host.pixels(resolution);
|
|
12347
12347
|
return;
|
|
@@ -15357,7 +15357,7 @@ const BEFORE = {
|
|
|
15357
15357
|
* @param resolution - The target's resolution.
|
|
15358
15358
|
* @returns Texels per CSS px.
|
|
15359
15359
|
*/
|
|
15360
|
-
function resolutionOf(filter, resolution) {
|
|
15360
|
+
function resolutionOf$1(filter, resolution) {
|
|
15361
15361
|
const own = filter.resolution;
|
|
15362
15362
|
return own === "inherit" ? resolution : own;
|
|
15363
15363
|
}
|
|
@@ -15377,7 +15377,7 @@ function readStack(slots, resolution, into) {
|
|
|
15377
15377
|
const filter = slots[index]?.filter;
|
|
15378
15378
|
if (filter === void 0 || !filter.enabled) continue;
|
|
15379
15379
|
enabled += 1;
|
|
15380
|
-
rs = Math.min(rs, resolutionOf(filter, resolution));
|
|
15380
|
+
rs = Math.min(rs, resolutionOf$1(filter, resolution));
|
|
15381
15381
|
padding += filter.padding;
|
|
15382
15382
|
}
|
|
15383
15383
|
into.enabled = enabled;
|
|
@@ -21697,7 +21697,7 @@ const NO_DETAIL = Object.freeze({});
|
|
|
21697
21697
|
/** The fewest device pixels per CSS pixel `setResolution` draws at. */
|
|
21698
21698
|
const MIN_RESOLUTION = .5;
|
|
21699
21699
|
/** The most device pixels per CSS pixel `setResolution` draws at. */
|
|
21700
|
-
const MAX_RESOLUTION = 4;
|
|
21700
|
+
const MAX_RESOLUTION$1 = 4;
|
|
21701
21701
|
/**
|
|
21702
21702
|
* Message of a resolution `setResolution` refuses.
|
|
21703
21703
|
*
|
|
@@ -21705,7 +21705,7 @@ const MAX_RESOLUTION = 4;
|
|
|
21705
21705
|
* @returns The message.
|
|
21706
21706
|
*/
|
|
21707
21707
|
function resolutionMessage(value) {
|
|
21708
|
-
return `[game] renderer.monitor.setResolution(${String(value)}) needs a number from ${MIN_RESOLUTION} to ${MAX_RESOLUTION}.\n Pass undefined to go back to maxResolution.`;
|
|
21708
|
+
return `[game] renderer.monitor.setResolution(${String(value)}) needs a number from ${MIN_RESOLUTION} to ${MAX_RESOLUTION$1}.\n Pass undefined to go back to maxResolution.`;
|
|
21709
21709
|
}
|
|
21710
21710
|
/**
|
|
21711
21711
|
* Tells whether `setResolution` takes a value: a number from `MIN_RESOLUTION` to `MAX_RESOLUTION`, or `undefined` to
|
|
@@ -21719,7 +21719,7 @@ function resolutionMessage(value) {
|
|
|
21719
21719
|
* ```
|
|
21720
21720
|
*/
|
|
21721
21721
|
function takesResolution(value) {
|
|
21722
|
-
return value === void 0 || typeof value === "number" && value >= MIN_RESOLUTION && value <= MAX_RESOLUTION;
|
|
21722
|
+
return value === void 0 || typeof value === "number" && value >= MIN_RESOLUTION && value <= MAX_RESOLUTION$1;
|
|
21723
21723
|
}
|
|
21724
21724
|
/**
|
|
21725
21725
|
* Creates the monitor module: the counters of the renderer, the capture of a frame, and the
|
|
@@ -38013,6 +38013,19 @@ function readArea(id, area) {
|
|
|
38013
38013
|
return area;
|
|
38014
38014
|
}
|
|
38015
38015
|
/**
|
|
38016
|
+
* Reads the declared resolution: texels per CSS px, or 0 for the canvas's. A JavaScript caller may pass anything.
|
|
38017
|
+
*
|
|
38018
|
+
* @param id - The filter id.
|
|
38019
|
+
* @param resolution - What the game declared.
|
|
38020
|
+
* @returns The resolution; 0 when it was left out.
|
|
38021
|
+
* @throws {Error} When it is given and is not a number from 0 to `MAX_RESOLUTION`.
|
|
38022
|
+
*/
|
|
38023
|
+
function readResolution(id, resolution) {
|
|
38024
|
+
if (resolution === void 0) return 0;
|
|
38025
|
+
if (typeof resolution === "number" && resolution >= 0 && resolution <= 4) return resolution;
|
|
38026
|
+
throw new Error(`[game] Filter "${id}": resolution must be from 0 to 4, 0 for the resolution of the canvas.\n Got ${String(resolution)}.`);
|
|
38027
|
+
}
|
|
38028
|
+
/**
|
|
38016
38029
|
* Tells whether a value is a list of 2 to 4 finite numbers.
|
|
38017
38030
|
*
|
|
38018
38031
|
* @param value - A uniform declaration.
|
|
@@ -38303,18 +38316,20 @@ function cacheWithInputs(cache, inputs) {
|
|
|
38303
38316
|
* `enabled: true` and `order: 0`. An input `blur` gives the body `sampleBlur(uv)`: the last texture
|
|
38304
38317
|
* of its chain, read at the body's `uv`. A `fallback` draws instead when the filter is broken.
|
|
38305
38318
|
* An `area` answers, from the value, the rectangle in the entity's own units outside of which the
|
|
38306
|
-
* filter draws nothing: Pixi then renders and fills only that box, not the view's bounds.
|
|
38319
|
+
* filter draws nothing: Pixi then renders and fills only that box, not the view's bounds. A
|
|
38320
|
+
* `resolution` draws the view and its filters at that many texels per CSS px instead of the
|
|
38321
|
+
* canvas's.
|
|
38307
38322
|
* Register it through the `filters` key of a feature. The README shows a filter with a blur input
|
|
38308
38323
|
* and one with an `area`.
|
|
38309
38324
|
*
|
|
38310
38325
|
* @param id - The filter id, also the component name; unique, and not one of the built-ins.
|
|
38311
38326
|
* @param spec - Both bodies, the uniforms, the passes one apply costs, the padding, the inputs, the fallback, the
|
|
38312
|
-
* cache category and the
|
|
38327
|
+
* cache category, the area and the resolution.
|
|
38313
38328
|
* @returns The component type, with the frozen `filter` definition attached.
|
|
38314
38329
|
* @throws {Error} When the id is empty, the WGSL has no `mainFragment`, the GLSL no `void main(`,
|
|
38315
38330
|
* a uniform is reserved, badly named or of no known form, the passes or the padding break
|
|
38316
38331
|
* their rules, an input or the fallback breaks one of its rules, `passes` is given with inputs,
|
|
38317
|
-
* or `
|
|
38332
|
+
* `area` is not a function, or `resolution` is not a number from 0 to 4.
|
|
38318
38333
|
* @example
|
|
38319
38334
|
* ```ts
|
|
38320
38335
|
* // features/board/effects.ts: a gold tint a motion hook tweens on a merge, on WebGPU and WebGL.
|
|
@@ -38336,6 +38351,7 @@ function defineFilter(id, spec) {
|
|
|
38336
38351
|
checkCost(id, passes, padding, uniforms);
|
|
38337
38352
|
checkCache(id, spec.cache);
|
|
38338
38353
|
const area = readArea(id, spec.area);
|
|
38354
|
+
const resolution = readResolution(id, spec.resolution);
|
|
38339
38355
|
const origin = callsCanvasPixel(spec.wgsl, spec.glsl) ? KEPT_ORIGIN : void 0;
|
|
38340
38356
|
const cache = cacheWithInputs(cacheOf(spec.wgsl, spec.glsl, spec.cache), inputs);
|
|
38341
38357
|
const filter = Object.freeze({
|
|
@@ -38349,6 +38365,7 @@ function defineFilter(id, spec) {
|
|
|
38349
38365
|
fallback,
|
|
38350
38366
|
cache,
|
|
38351
38367
|
origin,
|
|
38368
|
+
resolution,
|
|
38352
38369
|
...area === void 0 ? {} : { area }
|
|
38353
38370
|
});
|
|
38354
38371
|
if (spec.cache !== false && (readsScreenIn(spec.wgsl) || readsScreenIn(spec.glsl))) screenReaders.add(filter);
|
|
@@ -38569,6 +38586,7 @@ const displacementDefaults = {
|
|
|
38569
38586
|
};
|
|
38570
38587
|
const alphaDefaults = {
|
|
38571
38588
|
alpha: 1,
|
|
38589
|
+
resolution: 0,
|
|
38572
38590
|
enabled: true,
|
|
38573
38591
|
order: 0
|
|
38574
38592
|
};
|
|
@@ -38665,11 +38683,16 @@ const Noise = /*#__PURE__*/ component("effects.noise", noiseDefaults);
|
|
|
38665
38683
|
const Displacement = /*#__PURE__*/ component("effects.displacement", displacementDefaults);
|
|
38666
38684
|
/**
|
|
38667
38685
|
* Pixi's alpha over a view and its subtree as one layer, so overlapping children do not show
|
|
38668
|
-
* through each other.
|
|
38686
|
+
* through each other. `resolution: 0` draws at the resolution of the canvas; a number draws the
|
|
38687
|
+
* subtree at that many texels per CSS px, at most 4, and every other filter of the view with it
|
|
38688
|
+
* (Pixi's smallest resolution wins). At `alpha: 1` and `resolution: 0` the filter is switched off
|
|
38689
|
+
* after 8 frames there: it would copy the subtree unchanged through a pass of its own, and a
|
|
38690
|
+
* keyframe that only touches 1 switches nothing. One render pass per apply.
|
|
38669
38691
|
*
|
|
38670
38692
|
* @example
|
|
38671
38693
|
* ```ts
|
|
38672
|
-
*
|
|
38694
|
+
* // The fog of a memory screen, drawn at half a texel per CSS px through one pass.
|
|
38695
|
+
* Alpha({ resolution: 0.5 }).value; // { alpha: 1, resolution: 0.5, enabled: true, order: 0 }
|
|
38673
38696
|
* ```
|
|
38674
38697
|
*/
|
|
38675
38698
|
const Alpha = /*#__PURE__*/ component("effects.alpha", alphaDefaults);
|
|
@@ -38794,6 +38817,20 @@ function brokenMark() {
|
|
|
38794
38817
|
//#endregion
|
|
38795
38818
|
//#region src/plugins/effects/filters/instance.ts
|
|
38796
38819
|
/**
|
|
38820
|
+
* @file effects/filters — the only file that builds, writes and destroys Pixi filters. Ours: a
|
|
38821
|
+
* `Filter` over a `GpuProgram` of the assembled WGSL and a `GlProgram` of the assembled GLSL, with
|
|
38822
|
+
* one `UniformGroup` both read. The Pixi-core kinds: their own class, written through their setters
|
|
38823
|
+
* when a field differs from what they were last given. Every kind but `Blur` renders at
|
|
38824
|
+
* `resolution: "inherit"`, the resolution of the canvas, so a filtered view stays sharp on DPR 2-3
|
|
38825
|
+
* (decision 32), unless its value (`Alpha`) or its definition (`defineFilter`) gives a resolution of
|
|
38826
|
+
* its own. An `Alpha` at 1 drawn at the canvas's is switched off once it rested there: it would copy
|
|
38827
|
+
* the view unchanged through a pass. Every write compares first: a value the filter holds already writes nothing and
|
|
38828
|
+
* asks the renderer for no frame. A destroy frees the uniform buffers first: `Filter.destroy()`
|
|
38829
|
+
* leaves them to a GC that runs after a minute (P10). A filter with inputs draws each place of its
|
|
38830
|
+
* chains through Pixi's public `applyFilter` from inside its own `apply`, into pooled textures given
|
|
38831
|
+
* back in a `finally`; a stand-in draws in place of a broken kind or instance.
|
|
38832
|
+
*/
|
|
38833
|
+
/**
|
|
38797
38834
|
* The resolution of every filter but `Blur`: the render target's, so a filter draws at the
|
|
38798
38835
|
* resolution of the canvas. Pixi's default of 1 would draw it at half the pixels on DPR 2.
|
|
38799
38836
|
*/
|
|
@@ -38808,6 +38845,20 @@ const PROBE_VALUE = Object.freeze({
|
|
|
38808
38845
|
/** The numbers of a vector field that holds none. */
|
|
38809
38846
|
const NO_NUMBERS = Object.freeze([]);
|
|
38810
38847
|
/**
|
|
38848
|
+
* The resolution Pixi is given for a resolution of a value or a definition: the number, at most `MAX_RESOLUTION`, or
|
|
38849
|
+
* the canvas's for 0 (or less, or not a number).
|
|
38850
|
+
*
|
|
38851
|
+
* @param resolution - Texels per CSS px; 0 for the canvas's.
|
|
38852
|
+
* @returns What a filter's `resolution` takes.
|
|
38853
|
+
* @example
|
|
38854
|
+
* ```ts
|
|
38855
|
+
* resolutionOf(50); // 4
|
|
38856
|
+
* ```
|
|
38857
|
+
*/
|
|
38858
|
+
function resolutionOf(resolution) {
|
|
38859
|
+
return resolution > 0 ? Math.min(resolution, 4) : CANVAS_RESOLUTION;
|
|
38860
|
+
}
|
|
38861
|
+
/**
|
|
38811
38862
|
* Tells whether two numbers are the same value for the GPU: equal, or both NaN.
|
|
38812
38863
|
*
|
|
38813
38864
|
* @param a - One number.
|
|
@@ -38968,7 +39019,7 @@ function createOurs(pixi, definition, value) {
|
|
|
38968
39019
|
glProgram,
|
|
38969
39020
|
resources,
|
|
38970
39021
|
padding: paddingOf$1(definition, value),
|
|
38971
|
-
resolution:
|
|
39022
|
+
resolution: resolutionOf(definition.resolution)
|
|
38972
39023
|
}),
|
|
38973
39024
|
group,
|
|
38974
39025
|
definition,
|
|
@@ -39010,6 +39061,43 @@ function blurResolution(ectx, value) {
|
|
|
39010
39061
|
return ectx.state.phone ? ectx.config.blur.phoneResolution : 1;
|
|
39011
39062
|
}
|
|
39012
39063
|
/**
|
|
39064
|
+
* Tells whether an `Alpha` value draws its view unchanged: switched on, at alpha 1, at the canvas's resolution. Its
|
|
39065
|
+
* filter would copy the view through a pass of its own. The fields are read by name: a fade reads them every frame.
|
|
39066
|
+
*
|
|
39067
|
+
* @param value - The stored `Alpha` value.
|
|
39068
|
+
* @returns True when the filter may be switched off.
|
|
39069
|
+
* @example
|
|
39070
|
+
* ```ts
|
|
39071
|
+
* drawsUnchanged({ enabled: true, order: 0, alpha: 1, resolution: 0 }); // true
|
|
39072
|
+
* ```
|
|
39073
|
+
*/
|
|
39074
|
+
function drawsUnchanged(value) {
|
|
39075
|
+
const { alpha, resolution } = value;
|
|
39076
|
+
return value.enabled && alpha === 1 && !(typeof resolution === "number" && resolution > 0);
|
|
39077
|
+
}
|
|
39078
|
+
/**
|
|
39079
|
+
* The `enabled` switch of an instance for the stored value of this sync: the value's own, at once, but an `Alpha` that
|
|
39080
|
+
* draws its view unchanged is switched off only at its `CALM_AFTER`-th sync in a row so while its filter is on, counted
|
|
39081
|
+
* in `calm`: keyframes that touch 1 keep the pass and switch nothing, a fade that ends at 1 lets it go. The filter
|
|
39082
|
+
* sync syncs the view again while `calm` counts.
|
|
39083
|
+
*
|
|
39084
|
+
* @param instance - The instance.
|
|
39085
|
+
* @param value - The stored filter value.
|
|
39086
|
+
* @returns True when Pixi is to draw the filter.
|
|
39087
|
+
*/
|
|
39088
|
+
function switchOf(instance, value) {
|
|
39089
|
+
if (instance.kind !== "alpha") return value.enabled;
|
|
39090
|
+
if (!drawsUnchanged(value)) {
|
|
39091
|
+
instance.calm = 0;
|
|
39092
|
+
return value.enabled;
|
|
39093
|
+
}
|
|
39094
|
+
if (!instance.filter.enabled) return false;
|
|
39095
|
+
instance.calm += 1;
|
|
39096
|
+
if (instance.calm < 8) return true;
|
|
39097
|
+
instance.calm = 0;
|
|
39098
|
+
return false;
|
|
39099
|
+
}
|
|
39100
|
+
/**
|
|
39013
39101
|
* Composes a colour matrix from the identity: brightness, saturation, contrast, hue, and the
|
|
39014
39102
|
* grayscale as a negative saturation. `ColorMatrixFilter` multiplies, so it starts from `reset()`.
|
|
39015
39103
|
*
|
|
@@ -39151,10 +39239,11 @@ function createCore(ectx, pixi, core, value, probeMap) {
|
|
|
39151
39239
|
kind: "alpha",
|
|
39152
39240
|
filter: new pixi.AlphaFilter({
|
|
39153
39241
|
alpha: numberOf$1(value, "alpha"),
|
|
39154
|
-
resolution:
|
|
39242
|
+
resolution: resolutionOf(numberOf$1(value, "resolution"))
|
|
39155
39243
|
}),
|
|
39156
39244
|
...appliedOf(value),
|
|
39157
|
-
passes: 1
|
|
39245
|
+
passes: 1,
|
|
39246
|
+
calm: 0
|
|
39158
39247
|
};
|
|
39159
39248
|
}
|
|
39160
39249
|
}
|
|
@@ -39176,7 +39265,7 @@ function createCore(ectx, pixi, core, value, probeMap) {
|
|
|
39176
39265
|
function createFilter(ectx, pixi, kind, value, probeMap) {
|
|
39177
39266
|
const body = kind.source === "wgsl" ? createOurs(pixi, kind.definition, value) : createCore(ectx, pixi, kind.core, value, probeMap);
|
|
39178
39267
|
if (body === void 0) return void 0;
|
|
39179
|
-
body.filter.enabled = value.enabled;
|
|
39268
|
+
body.filter.enabled = value.enabled && !(body.kind === "alpha" && drawsUnchanged(value));
|
|
39180
39269
|
if (body.kind === "wgsl") body.areaStale = body.definition.area !== void 0;
|
|
39181
39270
|
const instance = Object.assign(body, {
|
|
39182
39271
|
order: value.order,
|
|
@@ -39401,7 +39490,8 @@ function wireInputs(ectx, pixi, instance) {
|
|
|
39401
39490
|
};
|
|
39402
39491
|
instance.inputs = inputs;
|
|
39403
39492
|
instance.filter.apply = (manager, input, output, clearMode) => applyInputs(ectx, pixi, instance, inputs, manager, input, output, clearMode);
|
|
39404
|
-
|
|
39493
|
+
const { resolution } = instance.definition;
|
|
39494
|
+
evaluate(ectx, pixi, instance, inputs, resolution > 0 ? resolution : ectx.deps.renderer.host.resolution());
|
|
39405
39495
|
}
|
|
39406
39496
|
/**
|
|
39407
39497
|
* Reads one property of a value a chain returned, whatever its type.
|
|
@@ -39876,6 +39966,7 @@ function sameField(a, b) {
|
|
|
39876
39966
|
*/
|
|
39877
39967
|
function coreDiffers(instance, value) {
|
|
39878
39968
|
const { fields, applied } = instance;
|
|
39969
|
+
if (instance.kind === "alpha") return !sameField(applied.alpha, value.alpha) || !sameField(applied.resolution, value.resolution);
|
|
39879
39970
|
for (const field of fields) if (instance.kind === "displacement" && field === "map") {
|
|
39880
39971
|
if (mapOf(value) !== instance.map) return true;
|
|
39881
39972
|
} else if (!sameField(applied[field], value[field])) return true;
|
|
@@ -39905,6 +39996,12 @@ function mapOf(value) {
|
|
|
39905
39996
|
function writeCore(ectx, instance, value) {
|
|
39906
39997
|
setCore(ectx, instance, value);
|
|
39907
39998
|
const { fields, applied } = instance;
|
|
39999
|
+
if (instance.kind === "alpha") {
|
|
40000
|
+
const { alpha, resolution } = value;
|
|
40001
|
+
if (alpha !== void 0) applied.alpha = alpha;
|
|
40002
|
+
if (resolution !== void 0 && resolution !== applied.resolution) applied.resolution = resolution;
|
|
40003
|
+
return;
|
|
40004
|
+
}
|
|
39908
40005
|
for (const field of fields) {
|
|
39909
40006
|
const next = value[field];
|
|
39910
40007
|
if (next !== void 0) applied[field] = next;
|
|
@@ -39946,7 +40043,11 @@ function setCore(ectx, instance, value) {
|
|
|
39946
40043
|
instance.map = map;
|
|
39947
40044
|
return;
|
|
39948
40045
|
}
|
|
39949
|
-
default:
|
|
40046
|
+
default: {
|
|
40047
|
+
const { alpha, resolution } = value;
|
|
40048
|
+
instance.filter.alpha = typeof alpha === "number" ? alpha : 0;
|
|
40049
|
+
if (resolution !== instance.applied.resolution) instance.filter.resolution = resolutionOf(typeof resolution === "number" ? resolution : 0);
|
|
40050
|
+
}
|
|
39950
40051
|
}
|
|
39951
40052
|
}
|
|
39952
40053
|
/**
|
|
@@ -39972,8 +40073,9 @@ function switchOffBroken(instance, before) {
|
|
|
39972
40073
|
}
|
|
39973
40074
|
/**
|
|
39974
40075
|
* Brings one instance up to the stored value for a frame, comparing before anything is written.
|
|
39975
|
-
* A broken instance stays off whatever its component says
|
|
39976
|
-
*
|
|
40076
|
+
* A broken instance stays off whatever its component says, and an `Alpha` at 1 drawn at the
|
|
40077
|
+
* canvas's resolution is switched off at its `CALM_AFTER`-th sync there. Switching on or off is a
|
|
40078
|
+
* visible change; so is a new value of a filter that is on. A filter that is off and stays off still gets
|
|
39977
40079
|
* its new values written, so it is current when it comes back on, but asks for nothing: an off
|
|
39978
40080
|
* filter draws no pixel. Ours compare on every sync of their view (a view syncs when something of it changed); a core
|
|
39979
40081
|
* kind only when its component changed.
|
|
@@ -39990,13 +40092,14 @@ function writeFilter(ectx, instance, value, changed, before) {
|
|
|
39990
40092
|
switchOffBroken(instance, before);
|
|
39991
40093
|
return false;
|
|
39992
40094
|
}
|
|
39993
|
-
const
|
|
40095
|
+
const on = switchOf(instance, value);
|
|
40096
|
+
const toggled = instance.filter.enabled !== on;
|
|
39994
40097
|
const differs = instance.kind === "wgsl" ? oursDiffer(instance, instance.definition, value) : changed && coreDiffers(instance, value);
|
|
39995
40098
|
if (!toggled && !differs) return false;
|
|
39996
40099
|
staleArea(instance);
|
|
39997
|
-
const visible = toggled ||
|
|
40100
|
+
const visible = toggled || on;
|
|
39998
40101
|
if (visible) before();
|
|
39999
|
-
if (toggled) instance.filter.enabled =
|
|
40102
|
+
if (toggled) instance.filter.enabled = on;
|
|
40000
40103
|
if (differs) {
|
|
40001
40104
|
if (instance.kind === "wgsl") {
|
|
40002
40105
|
writeOurs(instance, instance.definition, value);
|
|
@@ -40741,8 +40844,10 @@ function judgeArea(ectx, instance) {
|
|
|
40741
40844
|
}
|
|
40742
40845
|
/**
|
|
40743
40846
|
* The union of the areas of a view's enabled filters, into the scratch box: none while no filter is enabled, and none
|
|
40744
|
-
* when an enabled filter has no area (every built-in kind, or a definition that answered `undefined`) — it draws
|
|
40745
|
-
* the view's bounds.
|
|
40847
|
+
* when an enabled filter has no area (every other built-in kind, or a definition that answered `undefined`) — it draws
|
|
40848
|
+
* over the view's bounds. An `Alpha` does not count: it only scales the pixels the others draw, and makes none where
|
|
40849
|
+
* they draw nothing; alone it leaves the view without an area. A disabled filter, and a kind a debug switch turned off
|
|
40850
|
+
* (it is not placed), do not count either.
|
|
40746
40851
|
*
|
|
40747
40852
|
* @param view - The view's record, its instances placed.
|
|
40748
40853
|
*/
|
|
@@ -40753,7 +40858,7 @@ function unionOf(view) {
|
|
|
40753
40858
|
let bottom = Number.NEGATIVE_INFINITY;
|
|
40754
40859
|
union.some = false;
|
|
40755
40860
|
for (const instance of view.placed) {
|
|
40756
|
-
if (!instance.filter.enabled) continue;
|
|
40861
|
+
if (!instance.filter.enabled || instance.kind === "alpha") continue;
|
|
40757
40862
|
if (instance.kind !== "wgsl" || !instance.area.some) {
|
|
40758
40863
|
union.some = false;
|
|
40759
40864
|
return;
|
|
@@ -40765,6 +40870,7 @@ function unionOf(view) {
|
|
|
40765
40870
|
right = Math.max(right, area.x + area.width);
|
|
40766
40871
|
bottom = Math.max(bottom, area.y + area.height);
|
|
40767
40872
|
}
|
|
40873
|
+
if (!union.some) return;
|
|
40768
40874
|
union.x = left;
|
|
40769
40875
|
union.y = top;
|
|
40770
40876
|
union.width = right - left;
|
|
@@ -40980,7 +41086,7 @@ function syncKind(ectx, pixi, entity, view, kind, changed, off) {
|
|
|
40980
41086
|
writeFilter(ectx, instance, value, changed, off ? NO_SIGNAL : view.signal);
|
|
40981
41087
|
instance.order = value.order;
|
|
40982
41088
|
refreshInputs(ectx, pixi, instance, off);
|
|
40983
|
-
if (instance.kind === "wgsl" && (instance.inputs?.retired.length ?? 0) > 0) markDirty$1(ectx, view);
|
|
41089
|
+
if (instance.kind === "wgsl" && (instance.inputs?.retired.length ?? 0) > 0 || instance.kind === "alpha" && instance.calm > 0) markDirty$1(ectx, view);
|
|
40984
41090
|
return installReplacement(view, kind, instance);
|
|
40985
41091
|
}
|
|
40986
41092
|
instance = firstInstance(ectx, pixi, kind, value);
|
|
@@ -41247,7 +41353,8 @@ function dropProbe(ectx, probe) {
|
|
|
41247
41353
|
}
|
|
41248
41354
|
/**
|
|
41249
41355
|
* A probe of one Pixi-core kind at the frozen defaults of its component; a `Displacement` draws over Pixi's white
|
|
41250
|
-
* texture, since its program does not depend on the map.
|
|
41356
|
+
* texture, since its program does not depend on the map. A probe is switched on whatever its defaults: an `Alpha` at 1
|
|
41357
|
+
* would be off, and Pixi would warm nothing. Its `apply` is guarded like any instance's.
|
|
41251
41358
|
*
|
|
41252
41359
|
* @param ectx - Domain context of the effects plugin.
|
|
41253
41360
|
* @param pixi - The module the renderer loaded.
|
|
@@ -41258,6 +41365,7 @@ function coreProbe(ectx, pixi, id) {
|
|
|
41258
41365
|
const kind = ectx.state.kinds.get(id);
|
|
41259
41366
|
const instance = kind === void 0 ? void 0 : createFilter(ectx, pixi, kind, kind.component.defaults, pixi.Texture.WHITE);
|
|
41260
41367
|
if (instance === void 0) return void 0;
|
|
41368
|
+
instance.filter.enabled = true;
|
|
41261
41369
|
return {
|
|
41262
41370
|
filter: instance.filter,
|
|
41263
41371
|
destroy: () => destroyFilter(instance)
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Jn as FeaturePlugin, Sr as Json, Xn as AnyFlow, dr as NodeFx, gr as FakeClock, mr as ClockSource, nr as NodeTable, or as Descriptor, ur as Hint } from "./types-DnttyLeu.mjs";
|
|
2
|
-
import { t as createApp } from "./index-
|
|
3
|
-
import { b as saveOf, v as WithGameState, y as memory } from "./types-
|
|
2
|
+
import { t as createApp } from "./index-DytzVJFz.mjs";
|
|
3
|
+
import { b as saveOf, v as WithGameState, y as memory } from "./types-CRgEt4wq.mjs";
|
|
4
4
|
import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-DDkRwLnJ.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
package/dist/testing.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { an as exit, cn as type, in as refuseStart, m as flattenFeatures, t as createApp } from "./src-
|
|
1
|
+
import { an as exit, cn as type, in as refuseStart, m as flattenFeatures, t as createApp } from "./src-DWJabPi4.mjs";
|
|
2
2
|
import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
|
|
3
3
|
import { t as fakeClock } from "./fake-6mazmHK3.mjs";
|
|
4
4
|
import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-BA6ffzqD.mjs";
|
|
@@ -1408,6 +1408,13 @@ type FilterSpec<Uniforms extends Record<string, UniformDeclaration>> = {
|
|
|
1408
1408
|
* only when the value changed.
|
|
1409
1409
|
*/
|
|
1410
1410
|
readonly area?: (value: Readonly<FilterValueOf<Uniforms>>) => FilterArea | undefined;
|
|
1411
|
+
/**
|
|
1412
|
+
* The texels per CSS px the view and its filters are drawn at under this filter, from 0 to 4; `0` (the default) for
|
|
1413
|
+
* the resolution of the canvas. Pixi draws all the filters of a view at the smallest resolution among them, so a
|
|
1414
|
+
* resolution below the canvas's lowers the others on the same view too. A stage of an input ignores it: its step's
|
|
1415
|
+
* `scale` sizes it.
|
|
1416
|
+
*/
|
|
1417
|
+
readonly resolution?: number;
|
|
1411
1418
|
};
|
|
1412
1419
|
/**
|
|
1413
1420
|
* How one uniform travels to the GPU: its name, its WGSL type and the form it was declared in.
|
|
@@ -1452,7 +1459,8 @@ type FilterDefinition = {
|
|
|
1452
1459
|
* `undefined` for any other body.
|
|
1453
1460
|
*/
|
|
1454
1461
|
readonly origin: UniformSpec | undefined; /** The rectangle outside of which the filter draws nothing, from the value; present only when the spec gave one. */
|
|
1455
|
-
readonly area?: (value: Readonly<FilterFields>) => FilterArea | undefined;
|
|
1462
|
+
readonly area?: (value: Readonly<FilterFields>) => FilterArea | undefined; /** The texels per CSS px it draws at; 0 for the resolution of the canvas. */
|
|
1463
|
+
readonly resolution: number;
|
|
1456
1464
|
};
|
|
1457
1465
|
/**
|
|
1458
1466
|
* A filter a chain may draw: any component `defineFilter` made. Listed in an input's `stages` and named by its steps.
|
|
@@ -1685,15 +1693,22 @@ type DisplacementValue = {
|
|
|
1685
1693
|
order: number;
|
|
1686
1694
|
};
|
|
1687
1695
|
/**
|
|
1688
|
-
* `Alpha`: Pixi's alpha over the whole subtree, as one layer.
|
|
1696
|
+
* `Alpha`: Pixi's alpha over the whole subtree, as one layer. `resolution` is the texels per CSS px the subtree is drawn
|
|
1697
|
+
* at, at most 4, `0` for the resolution of the canvas; Pixi draws all the filters of a view at the smallest resolution
|
|
1698
|
+
* among them, so `Alpha({ resolution: 0.5 })` beside a `Glow` draws the glow at 0.5 too. At `alpha: 1` and
|
|
1699
|
+
* `resolution: 0` the filter would copy the subtree unchanged through a pass of its own: it is switched off, at once
|
|
1700
|
+
* when it is built so, otherwise after 8 frames at rest there (a keyframe that touches 1 switches nothing), and the
|
|
1701
|
+
* subtree draws as if the Alpha were not there.
|
|
1689
1702
|
*
|
|
1690
1703
|
* @example
|
|
1691
1704
|
* ```ts
|
|
1692
|
-
*
|
|
1705
|
+
* // The fog of a memory screen, opaque, drawn at half a texel per CSS px through the Alpha's one pass.
|
|
1706
|
+
* const value: AlphaValue = { alpha: 1, resolution: 0.5, enabled: true, order: 0 };
|
|
1693
1707
|
* ```
|
|
1694
1708
|
*/
|
|
1695
1709
|
type AlphaValue = {
|
|
1696
1710
|
alpha: number;
|
|
1711
|
+
resolution: number;
|
|
1697
1712
|
enabled: boolean;
|
|
1698
1713
|
order: number;
|
|
1699
1714
|
};
|
|
@@ -1789,6 +1804,11 @@ type FilterBody = {
|
|
|
1789
1804
|
readonly applied: Record<string, FilterField>; /** The keys of `applied`, listed once: a compare walks them by index, with no `Object.keys` per frame. */
|
|
1790
1805
|
readonly fields: readonly string[];
|
|
1791
1806
|
passes: number;
|
|
1807
|
+
/**
|
|
1808
|
+
* Syncs in a row its value drew the view unchanged (at 1, at the canvas's resolution) while its filter was on;
|
|
1809
|
+
* the filter is switched off at `CALM_AFTER` and the count starts over.
|
|
1810
|
+
*/
|
|
1811
|
+
calm: number;
|
|
1792
1812
|
};
|
|
1793
1813
|
/**
|
|
1794
1814
|
* A probe of the warm-up (spec 27 F4): the Pixi filter handed to `renderer.sync.filters.warm`, and its teardown.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { At as Orientation, Dr as PlayerStateProvider, E as Config$2, Jn as FeaturePlugin, Mr as SnapshotOf, Or as ProviderCall, Pn as Config$1, Sr as Json, Xn as AnyFlow, a as Config$3, ar as TypeTag, br as Config, d as Manifest, gr as FakeClock, k as PixiModule, kr as SaveDoc, mr as ClockSource, n as AssetsIo } from "./types-DnttyLeu.mjs";
|
|
2
|
-
import { o as AudioContextLike, s as Config$4 } from "./types-
|
|
2
|
+
import { o as AudioContextLike, s as Config$4 } from "./types-C2LZJIxH.mjs";
|
|
3
3
|
import { H as TextKey, I as I18nApi, V as StringTable } from "./types-CWSMo70I.mjs";
|
|
4
|
-
import { ft as platformPlugin, i as screen, mt as PlatformProvider, t as createApp, wt as audioPlugin, xt as effectsPlugin } from "./index-
|
|
4
|
+
import { ft as platformPlugin, i as screen, mt as PlatformProvider, t as createApp, wt as audioPlugin, xt as effectsPlugin } from "./index-DytzVJFz.mjs";
|
|
5
5
|
import { AnyPluginInstance } from "@moku-labs/core";
|
|
6
6
|
|
|
7
7
|
//#region src/plugins/model/store/providers/memory.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Ir as Api$3, T as Api, Zt as Api$1, yr as Api$2 } from "./types-DnttyLeu.mjs";
|
|
2
|
-
import { P as AnimApi, r as UiApi } from "./types-
|
|
2
|
+
import { P as AnimApi, r as UiApi } from "./types-C2LZJIxH.mjs";
|
|
3
3
|
import { j as InputApi } from "./types-CWSMo70I.mjs";
|
|
4
4
|
import { r as Repro } from "./headless-DDkRwLnJ.mjs";
|
|
5
5
|
import { a as InputOf, r as ControlApp } from "./types-DFoxDq-g.mjs";
|
|
6
|
-
import { t as commands } from "./commands-
|
|
6
|
+
import { t as commands } from "./commands-CAEwtEAy.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/visual/types.d.ts
|
|
9
9
|
/** The base commands of the `/control` door, keyed by their short names. */
|
package/dist/visual.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-
|
|
1
|
+
import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-gTuXlmvH.mjs";
|
|
2
2
|
export { type CheckpointResult, type VisualApp, type VisualOptions, type VisualPage, type VisualRenderer, type VisualReport, type VisualSetup, type VisualStart, type VisualStep, type VisualTest, type VisualTestResult, type VisualTolerance, defineVisualTest, parseVisualArgv, runVisualTests };
|