@moku-labs/game 0.15.78 → 0.15.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-CD25TfIM.mjs";
1
+ import { m as StartedPage, r as GameConfig, t as AnyGameApp, u as PageOptions } from "../types-CYSXO-4b.mjs";
2
2
 
3
3
  //#region src/app/page.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { Br as PlayerStateProvider } from "../types-JrYEbbeJ.mjs";
2
- import { ht as PlatformProvider } from "../index-CDOJKnNB.mjs";
3
- import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-CD25TfIM.mjs";
1
+ import { Br as PlayerStateProvider } from "../types-Dhc7xlyk.mjs";
2
+ import { ht as PlatformProvider } from "../index-cktcVt-3.mjs";
3
+ import { _ as SystemShellFactory, g as SystemName, h as SystemModules } from "../types-CYSXO-4b.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
- import { Fr as Json } from "./types-JrYEbbeJ.mjs";
2
- import { U as StringTable } from "./types-DvAtKyJ3.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-CD25TfIM.mjs";
1
+ import { Fr as Json } from "./types-Dhc7xlyk.mjs";
2
+ import { U as StringTable } from "./types-CQ_B2CbW.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-CYSXO-4b.mjs";
4
4
  import { AnyPluginInstance } from "@moku-labs/core";
5
5
 
6
6
  //#region src/app/define.d.ts
package/dist/app.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-C3rvV0rG.mjs";
1
+ import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-CeeW4Mct.mjs";
2
2
  import { t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock, r as isFakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  //#region src/app/define.ts
package/dist/assets.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { d as Manifest } from "./types-JrYEbbeJ.mjs";
1
+ import { d as Manifest } from "./types-Dhc7xlyk.mjs";
2
2
 
3
3
  //#region src/plugins/assets/scan/cli.d.ts
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { An as FlowState, D as DebugSwitches, Dn as Bookmark, Kr as StoreApi, Wr as Snapshot, X as Api$1, Yr as Api, ri as FrameRate, si as Time, st as Captured, w as ScenesApi, xr as Api$2 } from "./types-JrYEbbeJ.mjs";
2
- import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-G9hpd34F.mjs";
3
- import { N as InputApi } from "./types-DvAtKyJ3.mjs";
4
- import { t as HeadlessApp } from "./headless-CFlHYKpY.mjs";
5
- import { n as Command, r as ControlApp } from "./types-B9dzviB6.mjs";
1
+ import { An as FlowState, D as DebugSwitches, Dn as Bookmark, Kr as StoreApi, Wr as Snapshot, X as Api$1, Yr as Api, ri as FrameRate, si as Time, st as Captured, w as ScenesApi, xr as Api$2 } from "./types-Dhc7xlyk.mjs";
2
+ import { P as AnimApi, a as AudioApi, h as EffectsApi, r as UiApi } from "./types-BaMaybxt.mjs";
3
+ import { N as InputApi } from "./types-CQ_B2CbW.mjs";
4
+ import { t as HeadlessApp } from "./headless-CdFTpj8K.mjs";
5
+ import { n as Command, r as ControlApp } from "./types-C-X_2Nrp.mjs";
6
6
 
7
7
  //#region src/plugins/flow/doors/commands.d.ts
8
8
  /**
@@ -1,7 +1,7 @@
1
- import { t as HeadlessApp } from "./headless-CFlHYKpY.mjs";
2
- import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-B9dzviB6.mjs";
3
- import { t as commands } from "./commands-BICMk0d0.mjs";
4
- import { t as defineCommand } from "./define-BrGCWhuG.mjs";
1
+ import { t as HeadlessApp } from "./headless-CdFTpj8K.mjs";
2
+ import { i as InputArguments, n as Command, o as InputSchema, s as Ran } from "./types-C-X_2Nrp.mjs";
3
+ import { t as commands } from "./commands-DU1w0Rsf.mjs";
4
+ import { t as defineCommand } from "./define-LTU9cqPG.mjs";
5
5
 
6
6
  //#region src/plugins/flow/doors/dev.d.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
- import { t as HeadlessApp } from "./headless-CFlHYKpY.mjs";
2
- import { c as Source, n as Command, o as InputSchema } from "./types-B9dzviB6.mjs";
1
+ import { t as HeadlessApp } from "./headless-CdFTpj8K.mjs";
2
+ import { c as Source, n as Command, o as InputSchema } from "./types-C-X_2Nrp.mjs";
3
3
 
4
4
  //#region src/plugins/flow/doors/define.d.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { An as FlowState, Fr as Json, Hn as Answer, Jr as RngState, Nn as RouteStep, jn as JournalEntry, sn as Api$1, ti as Api } from "./types-JrYEbbeJ.mjs";
1
+ import { An as FlowState, Fr as Json, Hn as Answer, Jr as RngState, Nn as RouteStep, jn as JournalEntry, sn as Api$1, ti as Api } from "./types-Dhc7xlyk.mjs";
2
2
 
3
3
  //#region src/plugins/flow/headless.d.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
- import { $n as ReducedMotion, $r as State$4, Ar as State$2, At as PassKind, Bn as Hint, C as SceneSpec, Cn as FeatureDescription, Er as Api$1, Fr as Json, G as SpriteValue, Gn as DescriptionNode, Hn as Answer, I as NineSliceValue, In as Descriptor, Ir as Root, J as sprite, Kn as Ease, Kr as StoreApi, Ln as Effect, Lr as State$5, Nr as Config$5, On as DefineNode, Or as Config$2, P as HudPartValue, Pn as SceneIdOf, Qn as ProjectionSpec, Qr as PauseReason, R as OverlayValue, Rn as EffectOptions, S as SceneDefinition, Sr as Config$9, T as State$7, Tn as FeatureTree, V as ShapeValue, W as SpriteOptions, X as Api$4, Xn as NumericFields, Xr as Config$4, Yr as Api$3, Z as Config$6, Zn as ProjectionMotion, Zr as Events, _ as AnySceneProjection, _r as ResourceType, a as Config$1, ai as State$8, br as TagType, bt as FrameRing, c as LoadBundles, cn as BundlesOf, di as Require, dn as GameTypes, f as ReadyBundles, fn as HudKeysOf, ft as ViewportSize, gr as QueryTerm, hn as TextStylesOf, hr as Narrowed, i as BundleSpec, ii as RateChange, it as State$6, l as LoadReason, li as Config$10, ln as Config$3, lr as ComponentType, m as Tier, mn as State$3, mr as Mut, ni as Config$8, o as DefineBundles, oi as ThermalReading, p as State$1, q as TransformValue, qr as RngApi, r as BundleMap, sn as Api$2, sr as ComponentHandle, t as Api, ti as Api$5, u as LoadResult, ui as Events$1, un as EmitterIdOf, ur as ComponentValue, v as Config$7, vn as defineFlow, vr as SystemDefinition, w as ScenesApi, wn as FeaturePlugin, wr as State$9, x as LayerMap, xr as Api$6, y as DefineScene, yr as SystemFor, yt as FrameRecord, zn as GuideOptions, zr as Patch } from "./types-JrYEbbeJ.mjs";
2
- import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$11, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, lt as OverlayApi, m as Config$13, n as State$13, r as UiApi, s as Config$12, t as Config$14, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-G9hpd34F.mjs";
3
- import { B as Message, C as State$16, D as TextStyleInput, G as TypedTr, H as State$14, I as Argument, J as ResolvedStyle, L as Config$15, M as Config$16, N as InputApi, O as TextStyles, P as State$15, R as I18nApi, S as Point, T as TextBind, V as Part, W as TextKey, Y as Style, Z as WhenFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as defineComponent, k as TextValue, q as IsFlags, s as PopupComponent, v as BindField, w as TextApi, x as CountdownValue, y as BindOptions, z as IntlKit } from "./types-DvAtKyJ3.mjs";
1
+ import { $n as ReducedMotion, $r as State$4, Ar as State$2, At as PassKind, Bn as Hint, C as SceneSpec, Cn as FeatureDescription, Er as Api$1, Fr as Json, G as SpriteValue, Gn as DescriptionNode, Hn as Answer, I as NineSliceValue, In as Descriptor, Ir as Root, J as sprite, Kn as Ease, Kr as StoreApi, Ln as Effect, Lr as State$5, Nr as Config$5, On as DefineNode, Or as Config$2, P as HudPartValue, Pn as SceneIdOf, Qn as ProjectionSpec, Qr as PauseReason, R as OverlayValue, Rn as EffectOptions, S as SceneDefinition, Sr as Config$9, T as State$7, Tn as FeatureTree, V as ShapeValue, W as SpriteOptions, X as Api$4, Xn as NumericFields, Xr as Config$4, Yr as Api$3, Z as Config$6, Zn as ProjectionMotion, Zr as Events, _ as AnySceneProjection, _r as ResourceType, a as Config$1, ai as State$8, br as TagType, bt as FrameRing, c as LoadBundles, cn as BundlesOf, di as Require, dn as GameTypes, f as ReadyBundles, fn as HudKeysOf, ft as ViewportSize, gr as QueryTerm, hn as TextStylesOf, hr as Narrowed, i as BundleSpec, ii as RateChange, it as State$6, l as LoadReason, li as Config$10, ln as Config$3, lr as ComponentType, m as Tier, mn as State$3, mr as Mut, ni as Config$8, o as DefineBundles, oi as ThermalReading, p as State$1, q as TransformValue, qr as RngApi, r as BundleMap, sn as Api$2, sr as ComponentHandle, t as Api, ti as Api$5, u as LoadResult, ui as Events$1, un as EmitterIdOf, ur as ComponentValue, v as Config$7, vn as defineFlow, vr as SystemDefinition, w as ScenesApi, wn as FeaturePlugin, wr as State$9, x as LayerMap, xr as Api$6, y as DefineScene, yr as SystemFor, yt as FrameRecord, zn as GuideOptions, zr as Patch } from "./types-Dhc7xlyk.mjs";
2
+ import { A as GlowValue, B as Target, C as BlurValue, D as FilterComponent, F as AnimPlayerValue, H as HapticKind, I as Config$11, K as defineAnimation, L as FramesValue, M as OutlineValue, N as UniformDeclaration, O as FilterSpec, P as AnimApi, Q as play, R as MotionKeyframe, S as AlphaValue, T as DisplacementValue, U as SfxDescriptor, W as Step, _ as State$12, a as AudioApi, b as EmitterDefinition, c as MusicDescriptor, d as State$11, f as VolumesFor, h as EffectsApi, j as NoiseValue, k as FilterValueOf, l as MusicOptions, lt as OverlayApi, m as Config$13, n as State$13, r as UiApi, s as Config$12, t as Config$14, w as ColorMatrixValue, x as EmitterValue, y as EmitterConfig, z as State$10 } from "./types-BaMaybxt.mjs";
3
+ import { B as Message, C as State$16, D as TextStyleInput, G as TypedTr, H as State$14, I as Argument, J as ResolvedStyle, L as Config$15, M as Config$16, N as InputApi, O as TextStyles, P as State$15, R as I18nApi, S as Point, T as TextBind, V as Part, W as TextKey, Y as Style, Z as WhenFlags, b as Config$17, g as IntrinsicElementsFor, h as defineTokens, j as defineComponent, k as TextValue, q as IsFlags, s as PopupComponent, v as BindField, w as TextApi, x as CountdownValue, y as BindOptions, z as IntlKit } from "./types-CQ_B2CbW.mjs";
4
4
  import { Log } from "@moku-labs/common/browser";
5
5
  import { PluginCtx } from "@moku-labs/core";
6
6
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $t as ProblemRule, At as PassKind, B as Shape, Bt as PerfGapLine, Ct as MonitorSections, Dt as PERF_GAP_BUCKETS, E as types_d_exports$13, Et as PERF_CAUSES, F as NineSlice, Ft as PerfCollectorLine, Gn as DescriptionNode, Gt as PerfMeasured, H as Sprite, Ht as PerfLogLine, It as PerfCounts, J as sprite, Jt as PerfStartupLine, K as Transform, Kt as PerfSampleLine, L as Overlay, Lt as PerfDisplay, M as Display, Mt as PerfCause, N as HudPart, Nt as PerfChange, Ot as PERF_LOG_VERSION, P as HudPartValue, Pt as PerfChangeEntry, Q as MonitorConfig, Qt as ProblemEventDetail, R as OverlayValue, Rr as types_d_exports$10, Rt as PerfEventLine, Sn as type, St as MONITOR_SECTIONS, Tr as types_d_exports$17, Tt as OverlayWhat, U as SpriteBlend, Un as AnchorTarget, Ur as SaveUnreadableError, Ut as PerfLongFrameLine, Vt as PerfHeaderLine, Wt as PerfMarkLine, Xt as PerfThermalLine, Y as AdaptiveScale, Yt as PerfTelemetryLine, Zt as PoolTrimDetail, _n as contribution, _t as FrameReadResult, an as CanvasRestart, bn as slot, bt as FrameRing, ci as types_d_exports$15, ct as MonitorCounts, ei as types_d_exports$9, en as SHADER_WHATS, er as SceneSwitch, g as types_d_exports$1, gn as types_d_exports$6, gt as FrameColumns, ht as WhyLive, in as CANVAS_RESTARTS, j as WhyEntry, jr as types_d_exports$3, jt as PassRecord, kt as PROBLEM_RULES, mt as RetakeWhy, nn as ShaderWhat, on as DEMAND_REASONS, ot as types_d_exports$12, qt as PerfSpikeLine, rn as WarmDetail, rt as PoolTrim, tn as ShaderEventDetail, vt as FrameReadout, wt as OverlayEventDetail, xn as to, xt as LongFrameEntry, yn as exit, yt as FrameRecord, z as Parent, zt as PerfEventName } from "./types-JrYEbbeJ.mjs";
2
- import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as stopSfx, ct as wait, et as set, i as types_d_exports$16, it as stagger, nt as spawn, ot as tween, p as types_d_exports$2, q as external, rt as spawned, st as use, tt as sfx, ut as types_d_exports$4, v as types_d_exports$5 } from "./types-G9hpd34F.mjs";
3
- import { A as types_d_exports$14, E as TextFormat, F as types_d_exports$8, K as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as defineComponent, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-DvAtKyJ3.mjs";
4
- import { $ as system, A as Draggable, At as Text, B as Touchable, C as AnimPlayer, Ct as debugPlugin, D as defineBundles, Dt as animPlugin, E as defineScene, Et as assetsPlugin, F as PointerOver, G as Exiting, H as Traced, I as Pressable, J as Order, K as Layer, L as Pressed, M as Held, Mt as defineTextStyles, N as Hovered, Nt as label, O as load, Ot as projection, P as Pointer, Q as resource, R as Swipeable, S as defineMotion, St as effectsPlugin, T as Frames, Tt as audioPlugin, U as PASS_KINDS, V as Traceable, W as frameAt, X as component, Y as Tree, Z as mut, _ as defineStyle, _t as modelPlugin, a as defineEmitter, at as defineFeature, b as messageDuration, bt as i18nPlugin, c as Alpha, ct as uiPlugin, d as Displacement, dt as scenesPlugin, et as tag, f as Glow, ft as rendererPlugin, g as resolve, gt as types_d_exports$11, h as music, ht as PlatformProvider, i as screen, it as schedule, j as DropTarget, jt as bind, k as ready, kt as Countdown, l as Blur, lt as timePlugin, m as Outline, mt as BackResult, n as createPlugin, nt as guide, o as Emitter, ot as flattenFeatures, p as Noise, pt as platformPlugin, q as Now, r as defineGame, rt as hint, s as defineFilter, st as worldPlugin, t as createApp, tt as defineEffect, u as ColorMatrix, ut as textPlugin, v as tr, vt as lifecyclePlugin, w as Animation, wt as clockPlugin, x as cubicBezier, xt as flowPlugin, y as messageArgument, yt as inputPlugin, z as Tappable } from "./index-CDOJKnNB.mjs";
1
+ import { $t as ProblemRule, At as PassKind, B as Shape, Bt as PerfGapLine, Ct as MonitorSections, Dt as PERF_GAP_BUCKETS, E as types_d_exports$13, Et as PERF_CAUSES, F as NineSlice, Ft as PerfCollectorLine, Gn as DescriptionNode, Gt as PerfMeasured, H as Sprite, Ht as PerfLogLine, It as PerfCounts, J as sprite, Jt as PerfStartupLine, K as Transform, Kt as PerfSampleLine, L as Overlay, Lt as PerfDisplay, M as Display, Mt as PerfCause, N as HudPart, Nt as PerfChange, Ot as PERF_LOG_VERSION, P as HudPartValue, Pt as PerfChangeEntry, Q as MonitorConfig, Qt as ProblemEventDetail, R as OverlayValue, Rr as types_d_exports$10, Rt as PerfEventLine, Sn as type, St as MONITOR_SECTIONS, Tr as types_d_exports$17, Tt as OverlayWhat, U as SpriteBlend, Un as AnchorTarget, Ur as SaveUnreadableError, Ut as PerfLongFrameLine, Vt as PerfHeaderLine, Wt as PerfMarkLine, Xt as PerfThermalLine, Y as AdaptiveScale, Yt as PerfTelemetryLine, Zt as PoolTrimDetail, _n as contribution, _t as FrameReadResult, an as CanvasRestart, bn as slot, bt as FrameRing, ci as types_d_exports$15, ct as MonitorCounts, ei as types_d_exports$9, en as SHADER_WHATS, er as SceneSwitch, g as types_d_exports$1, gn as types_d_exports$6, gt as FrameColumns, ht as WhyLive, in as CANVAS_RESTARTS, j as WhyEntry, jr as types_d_exports$3, jt as PassRecord, kt as PROBLEM_RULES, mt as RetakeWhy, nn as ShaderWhat, on as DEMAND_REASONS, ot as types_d_exports$12, qt as PerfSpikeLine, rn as WarmDetail, rt as PoolTrim, tn as ShaderEventDetail, vt as FrameReadout, wt as OverlayEventDetail, xn as to, xt as LongFrameEntry, yn as exit, yt as FrameRecord, z as Parent, zt as PerfEventName } from "./types-Dhc7xlyk.mjs";
2
+ import { $ as sequence, E as FilterArea, G as HAPTIC_KINDS, H as HapticKind, J as frames, K as defineAnimation, Q as play, V as types_d_exports, X as mark, Y as haptic, Z as parallel, at as stopSfx, ct as wait, et as set, i as types_d_exports$16, it as stagger, nt as spawn, ot as tween, p as types_d_exports$2, q as external, rt as spawned, st as use, tt as sfx, ut as types_d_exports$4, v as types_d_exports$5 } from "./types-BaMaybxt.mjs";
3
+ import { A as types_d_exports$14, E as TextFormat, F as types_d_exports$8, K as types_d_exports$7, d as DebugTrigger, f as LocalWrite, h as defineTokens, j as defineComponent, m as popup, p as ScrollState, u as Box, x as CountdownValue, y as BindOptions } from "./types-CQ_B2CbW.mjs";
4
+ import { $ as system, A as Draggable, At as Text, B as Touchable, C as AnimPlayer, Ct as debugPlugin, D as defineBundles, Dt as animPlugin, E as defineScene, Et as assetsPlugin, F as PointerOver, G as Exiting, H as Traced, I as Pressable, J as Order, K as Layer, L as Pressed, M as Held, Mt as defineTextStyles, N as Hovered, Nt as label, O as load, Ot as projection, P as Pointer, Q as resource, R as Swipeable, S as defineMotion, St as effectsPlugin, T as Frames, Tt as audioPlugin, U as PASS_KINDS, V as Traceable, W as frameAt, X as component, Y as Tree, Z as mut, _ as defineStyle, _t as modelPlugin, a as defineEmitter, at as defineFeature, b as messageDuration, bt as i18nPlugin, c as Alpha, ct as uiPlugin, d as Displacement, dt as scenesPlugin, et as tag, f as Glow, ft as rendererPlugin, g as resolve, gt as types_d_exports$11, h as music, ht as PlatformProvider, i as screen, it as schedule, j as DropTarget, jt as bind, k as ready, kt as Countdown, l as Blur, lt as timePlugin, m as Outline, mt as BackResult, n as createPlugin, nt as guide, o as Emitter, ot as flattenFeatures, p as Noise, pt as platformPlugin, q as Now, r as defineGame, rt as hint, s as defineFilter, st as worldPlugin, t as createApp, tt as defineEffect, u as ColorMatrix, ut as textPlugin, v as tr, vt as lifecyclePlugin, w as Animation, wt as clockPlugin, x as cubicBezier, xt as flowPlugin, y as messageArgument, yt as inputPlugin, z as Tappable } from "./index-cktcVt-3.mjs";
5
5
  export { type AdaptiveScale, Alpha, type AnchorTarget, types_d_exports as Anim, AnimPlayer, Animation, types_d_exports$1 as Assets, types_d_exports$2 as Audio, type BackResult, type BindOptions, Blur, Box, CANVAS_RESTARTS, type CanvasRestart, types_d_exports$3 as Clock, ColorMatrix, Countdown, type CountdownValue, DEMAND_REASONS, types_d_exports$4 as Debug, DebugTrigger, type DescriptionNode, Displacement, Display, Draggable, DropTarget, types_d_exports$5 as Effects, Emitter, Exiting, type FilterArea, types_d_exports$6 as Flow, type FrameColumns, type FrameReadResult, type FrameReadout, type FrameRecord, type FrameRing, Frames, Glow, HAPTIC_KINDS, type HapticKind, Held, Hovered, HudPart, type HudPartValue, types_d_exports$7 as I18n, types_d_exports$8 as Input, Layer, types_d_exports$9 as Lifecycle, LocalWrite, type LongFrameEntry, MONITOR_SECTIONS, types_d_exports$10 as Model, type MonitorConfig, type MonitorCounts, type MonitorSections, NineSlice, Noise, Now, Order, Outline, Overlay, type OverlayEventDetail, type OverlayValue, type OverlayWhat, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, type PassKind, type PassRecord, type PerfCause, type PerfChange, type PerfChangeEntry, type PerfCollectorLine, type PerfCounts, type PerfDisplay, type PerfEventLine, type PerfEventName, type PerfGapLine, type PerfHeaderLine, type PerfLogLine, type PerfLongFrameLine, type PerfMarkLine, type PerfMeasured, type PerfSampleLine, type PerfSpikeLine, type PerfStartupLine, type PerfTelemetryLine, type PerfThermalLine, types_d_exports$11 as Platform, type PlatformProvider, Pointer, PointerOver, type PoolTrim, type PoolTrimDetail, Pressable, Pressed, type ProblemEventDetail, type ProblemRule, types_d_exports$12 as Renderer, type RetakeWhy, SHADER_WHATS, SaveUnreadableError, type SceneSwitch, types_d_exports$13 as Scenes, ScrollState, type ShaderEventDetail, type ShaderWhat, Shape, Sprite, type SpriteBlend, 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, 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, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as sfx, $t as worldPlugin, A as types_exports$7, At as Glow, B as defineMotion, Bt as Animation, C as types_exports$14, Ct as messageDuration, D as types_exports$10, Dt as Blur, E as types_exports$11, Et as Alpha, F as types_exports$2, Ft as audioPlugin, G as external, Gt as MONITOR_SECTIONS, H as platformPlugin, Ht as rendererPlugin, I as types_exports$1, It as scenesPlugin, J as mark, Jt as PERF_LOG_VERSION, K as frames, Kt as PERF_CAUSES, L as types_exports, Lt as assetsPlugin, M as types_exports$5, Mt as Outline, N as types_exports$4, Nt as defineFilter, O as types_exports$9, Ot as ColorMatrix, P as types_exports$3, Pt as debugPlugin, Q as set, Qt as DEMAND_REASONS, R as uiPlugin, Rt as animPlugin, S as types_exports$15, St as messageArgument, T as types_exports$12, Tt as Emitter, U as HAPTIC_KINDS, Ut as PASS_KINDS, V as textPlugin, Vt as Frames, W as defineAnimation, Wt as frameAt, X as play, Xt as SHADER_WHATS, Y as parallel, Yt as PROBLEM_RULES, Z as sequence, Zt as CANVAS_RESTARTS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as to, at as use, b as types_exports$17, bt as Traced, c as hint, cn as SaveUnreadableError, ct as Draggable, d as defineScene, dn as clockPlugin, dt as Hovered, en as flowPlugin, et as spawn, f as tr, ft as Pointer, g as music, gt as Swipeable, h as defineEmitter, ht as Pressed, i as screen, in as slot, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as lifecyclePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as contribution, nt as stagger, o as defineEffect, on as type, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as exit, rt as stopSfx, s as guide, sn as modelPlugin, st as inputPlugin, t as createApp, tt as spawned, u as projection, un as timePlugin, ut as Held, v as load, vt as Touchable, w as types_exports$13, wt as effectsPlugin, x as types_exports$16, xt as i18nPlugin, y as ready, yt as Traceable, z as resolve, zt as AnimPlayer } from "./src-C3rvV0rG.mjs";
1
+ import { $ as sfx, $t as worldPlugin, A as types_exports$7, At as Glow, B as defineMotion, Bt as Animation, C as types_exports$14, Ct as messageDuration, D as types_exports$10, Dt as Blur, E as types_exports$11, Et as Alpha, F as types_exports$2, Ft as audioPlugin, G as external, Gt as MONITOR_SECTIONS, H as platformPlugin, Ht as rendererPlugin, I as types_exports$1, It as scenesPlugin, J as mark, Jt as PERF_LOG_VERSION, K as frames, Kt as PERF_CAUSES, L as types_exports, Lt as assetsPlugin, M as types_exports$5, Mt as Outline, N as types_exports$4, Nt as defineFilter, O as types_exports$9, Ot as ColorMatrix, P as types_exports$3, Pt as debugPlugin, Q as set, Qt as DEMAND_REASONS, R as uiPlugin, Rt as animPlugin, S as types_exports$15, St as messageArgument, T as types_exports$12, Tt as Emitter, U as HAPTIC_KINDS, Ut as PASS_KINDS, V as textPlugin, Vt as Frames, W as defineAnimation, Wt as frameAt, X as play, Xt as SHADER_WHATS, Y as parallel, Yt as PROBLEM_RULES, Z as sequence, Zt as CANVAS_RESTARTS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as to, at as use, b as types_exports$17, bt as Traced, c as hint, cn as SaveUnreadableError, ct as Draggable, d as defineScene, dn as clockPlugin, dt as Hovered, en as flowPlugin, et as spawn, f as tr, ft as Pointer, g as music, gt as Swipeable, h as defineEmitter, ht as Pressed, i as screen, in as slot, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as lifecyclePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as contribution, nt as stagger, o as defineEffect, on as type, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as exit, rt as stopSfx, s as guide, sn as modelPlugin, st as inputPlugin, t as createApp, tt as spawned, u as projection, un as timePlugin, ut as Held, v as load, vt as Touchable, w as types_exports$13, wt as effectsPlugin, x as types_exports$16, xt as i18nPlugin, y as ready, yt as Traceable, z as resolve, zt as AnimPlayer } from "./src-CeeW4Mct.mjs";
2
2
  import { $ as Layer, B as Display, C as defineStyle, E as bind, G as Parent, H as NineSlice, J as Transform, K as Shape, O as defineTextStyles, Q as Exiting, S as defineTokens, T as Text, U as Overlay, V as HudPart, Z as sprite, _ as ScrollState, at as resource, b as popup, ct as tag, d as Box, et as Now, h as LocalWrite, it as mut, k as label, nt as Tree, ot as system, p as DebugTrigger, q as Sprite, rt as component, tt as Order, w as Countdown } from "./visual-B7TxMv1J.mjs";
3
3
  import { t as defineComponent } from "./component-DGg5DqKK.mjs";
4
4
  export { Alpha, types_exports as Anim, AnimPlayer, Animation, types_exports$1 as Assets, types_exports$2 as Audio, Blur, Box, CANVAS_RESTARTS, types_exports$3 as Clock, ColorMatrix, Countdown, DEMAND_REASONS, types_exports$4 as Debug, DebugTrigger, Displacement, Display, Draggable, DropTarget, types_exports$5 as Effects, Emitter, Exiting, types_exports$6 as Flow, Frames, Glow, HAPTIC_KINDS, Held, Hovered, HudPart, types_exports$7 as I18n, types_exports$8 as Input, Layer, types_exports$9 as Lifecycle, LocalWrite, MONITOR_SECTIONS, types_exports$10 as Model, NineSlice, Noise, Now, Order, Outline, Overlay, PASS_KINDS, PERF_CAUSES, PERF_GAP_BUCKETS, PERF_LOG_VERSION, PROBLEM_RULES, Parent, types_exports$11 as Platform, Pointer, PointerOver, Pressable, Pressed, types_exports$12 as Renderer, SHADER_WHATS, SaveUnreadableError, types_exports$13 as Scenes, ScrollState, Shape, Sprite, Swipeable, Tappable, Text, types_exports$14 as TextTypes, types_exports$15 as Time, Touchable, Traceable, Traced, Transform, Tree, types_exports$16 as Ui, types_exports$17 as World, animPlugin, assetsPlugin, audioPlugin, bind, clockPlugin, component, contribution, createApp, createPlugin, cubicBezier, debugPlugin, defineAnimation, defineBundles, defineComponent, defineEffect, defineEmitter, defineFeature, defineFilter, defineGame, defineMotion, defineScene, defineStyle, defineTextStyles, defineTokens, effectsPlugin, exit, external, flattenFeatures, flowPlugin, frameAt, frames, guide, haptic, hint, i18nPlugin, inputPlugin, label, lifecyclePlugin, load, mark, messageArgument, messageDuration, modelPlugin, music, mut, parallel, platformPlugin, play, popup, projection, ready, rendererPlugin, resolve, resource, scenesPlugin, schedule, screen, sequence, set, sfx, slot, spawn, spawned, sprite, stagger, stopSfx, system, tag, textPlugin, timePlugin, to, tr, tween, type, uiPlugin, use, wait, worldPlugin };
@@ -1,9 +1,9 @@
1
- import { Cr as Explained, Mr as Api, Wr as Snapshot, X as Api$2, at as Under, cr as ComponentSchema, fr as EntitySnapshot, h as Usage, jn as JournalEntry, kn as FlowGraph, lt as RenderStats, pn as Position, pr as FrameDiff, t as Api$3, xr as Api$1 } from "./types-JrYEbbeJ.mjs";
2
- import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-G9hpd34F.mjs";
3
- import { c as UiNode } from "./types-DvAtKyJ3.mjs";
4
- import { t as HeadlessApp } from "./headless-CFlHYKpY.mjs";
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-B9dzviB6.mjs";
6
- import { n as defineSource } from "./define-BrGCWhuG.mjs";
1
+ import { Cr as Explained, Mr as Api, Wr as Snapshot, X as Api$2, at as Under, cr as ComponentSchema, fr as EntitySnapshot, h as Usage, jn as JournalEntry, kn as FlowGraph, lt as RenderStats, pn as Position, pr as FrameDiff, t as Api$3, xr as Api$1 } from "./types-Dhc7xlyk.mjs";
2
+ import { a as AudioApi, g as EffectsStats, h as EffectsApi, r as UiApi, u as SoundEntry } from "./types-BaMaybxt.mjs";
3
+ import { c as UiNode } from "./types-CQ_B2CbW.mjs";
4
+ import { t as HeadlessApp } from "./headless-CdFTpj8K.mjs";
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-C-X_2Nrp.mjs";
6
+ import { n as defineSource } from "./define-LTU9cqPG.mjs";
7
7
 
8
8
  //#region src/plugins/flow/doors/read.d.ts
9
9
  /**
@@ -1,2 +1,2 @@
1
- import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-lHRyrkCb.mjs";
1
+ import { a as jsxs, i as jsxDEV, n as JSX, r as jsx, t as Fragment } from "./runtime-CglxMAXj.mjs";
2
2
  export { Fragment, type JSX, jsx, jsxDEV, jsxs };
@@ -1,2 +1,2 @@
1
- import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-lHRyrkCb.mjs";
1
+ import { a as jsxs, n as JSX, r as jsx, t as Fragment } from "./runtime-CglxMAXj.mjs";
2
2
  export { Fragment, type JSX, jsx, jsxs };
@@ -1,4 +1,4 @@
1
- import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-DvAtKyJ3.mjs";
1
+ import { _ as UiIntrinsicElements, a as JsxChild, t as DescriptionNode } from "./types-CQ_B2CbW.mjs";
2
2
 
3
3
  //#region src/plugins/ui/jsx/runtime.d.ts
4
4
  /** What the compiler passes as props: the children plus whatever the tag declared. */
@@ -17419,6 +17419,21 @@ function onGrid(delta, stackResolution, resolution) {
17419
17419
  return nearWhole(delta * stackResolution) && nearWhole(delta * resolution);
17420
17420
  }
17421
17421
  /**
17422
+ * The resolution a kept picture was drawn at: its filter output's, or the subtree picture's for a stack drawn direct,
17423
+ * which has no stage 3, so its key `r` is stale.
17424
+ *
17425
+ * @param key - The record's key.
17426
+ * @param direct - The quad draws the subtree picture itself.
17427
+ * @returns Texels per CSS px.
17428
+ * @example
17429
+ * ```ts
17430
+ * drawnResolution(Float64Array.of(1, 0, 0, 1, 1.5, 0, 0, 0, 0, 0, 0, 0, 2), true); // 1.5
17431
+ * ```
17432
+ */
17433
+ function drawnResolution(key, direct) {
17434
+ return (direct ? key[KEY.rs] : key[KEY.r]) ?? 1;
17435
+ }
17436
+ /**
17422
17437
  * Tells whether a picture can be taken at this size: not empty, and at most 4096 device pixels on a side.
17423
17438
  *
17424
17439
  * @param width - CSS px.
@@ -18527,6 +18542,7 @@ function createKeptState(config) {
18527
18542
  flushPasses: 0,
18528
18543
  calm: false,
18529
18544
  firstTakes: 0,
18545
+ frameRefines: 0,
18530
18546
  alphaDue: false,
18531
18547
  liveWaiting: 0
18532
18548
  };
@@ -18623,6 +18639,7 @@ function stopKept(state) {
18623
18639
  state.flushPasses = 0;
18624
18640
  state.drawnPictures = 0;
18625
18641
  state.firstTakes = 0;
18642
+ state.frameRefines = 0;
18626
18643
  state.alphaDue = false;
18627
18644
  state.liveWaiting = 0;
18628
18645
  state.warnedBudget = false;
@@ -18718,7 +18735,13 @@ const NOW = {
18718
18735
  tx: 0,
18719
18736
  ty: 0
18720
18737
  };
18721
- /** The stack of a record looked at before the step (F114). One object: the look allocates nothing. */
18738
+ /** What a kept record owes `refresh`: nothing, the filter output, or the pre-pass results and the filter output. */
18739
+ const OWED = {
18740
+ none: 0,
18741
+ output: 1,
18742
+ chain: 2
18743
+ };
18744
+ /** The stack of a record looked at before the step (F114), or above it (F126). One object: the look allocates nothing. */
18722
18745
  const DUE = {
18723
18746
  enabled: 0,
18724
18747
  rs: 1,
@@ -19095,6 +19118,8 @@ function createRecord$1(kctx, pixi, entity, view, slots, category) {
19095
19118
  depth: 0,
19096
19119
  bytes: 0,
19097
19120
  settle: false,
19121
+ coarse: false,
19122
+ refined: false,
19098
19123
  refused: 0,
19099
19124
  cut: false,
19100
19125
  direct: false,
@@ -19212,6 +19237,17 @@ function writeSeen(record, now) {
19212
19237
  key[KEY.seenRs] = now.rs;
19213
19238
  }
19214
19239
  /**
19240
+ * Tells whether this frame's linear part differs from the one a set of keys holds. Pure.
19241
+ *
19242
+ * @param key - The record's key.
19243
+ * @param now - This frame's numbers.
19244
+ * @param base - The index of `a` in the set: `KEY.a` (the take) or `KEY.seenA` (the last frame).
19245
+ * @returns True when one number differs.
19246
+ */
19247
+ function linearMoved(key, now, base) {
19248
+ return key[base] !== now.a || key[base + 1] !== now.b || key[base + 2] !== now.c || key[base + 3] !== now.d;
19249
+ }
19250
+ /**
19215
19251
  * Tells whether this frame's linear part or stack resolution differs from the ones a set of keys holds.
19216
19252
  *
19217
19253
  * @param key - The record's key.
@@ -19221,7 +19257,7 @@ function writeSeen(record, now) {
19221
19257
  * @returns True when one differs.
19222
19258
  */
19223
19259
  function linearDiffers(key, now, base, rsAt) {
19224
- return key[base] !== now.a || key[base + 1] !== now.b || key[base + 2] !== now.c || key[base + 3] !== now.d || key[rsAt] !== now.rs;
19260
+ return linearMoved(key, now, base) || key[rsAt] !== now.rs;
19225
19261
  }
19226
19262
  /**
19227
19263
  * The bytes a take needs: the subtree picture, the filter output and the pre-pass results.
@@ -19365,6 +19401,7 @@ function takePicture(kctx, pixi, matrices, record, view, now, turned = false) {
19365
19401
  });
19366
19402
  const ok = renderStages(kctx, pixi, matrices, record, view, now);
19367
19403
  record.settle = false;
19404
+ record.coarse &&= !ok;
19368
19405
  writeSeen(record, now);
19369
19406
  return ok;
19370
19407
  }
@@ -19534,15 +19571,17 @@ function scaledQuad(key, Ps, inverse, local) {
19534
19571
  }
19535
19572
  /**
19536
19573
  * Tells whether a kept picture may be drawn scaled to this frame's linear part instead of taken again (F67): its
19537
- * subtree and its stack resolution are as at the take, its filters follow the view (not its canvas place), it was not
19538
- * cut to the canvas, and the area scale stays within `SCALED_LIMIT` of the take's either way.
19574
+ * subtree and its stack resolution are as at the take (a stepped picture's resolution followed the canvas: F126), its
19575
+ * filters follow the view (not its canvas place), it was not cut to the canvas, and the area scale stays within
19576
+ * `SCALED_LIMIT` of the take's either way.
19539
19577
  *
19540
19578
  * @param record - The record, kept.
19579
+ * @param stepped - A step of the resolution passed over the picture.
19541
19580
  * @returns True when the quad may scale.
19542
19581
  */
19543
- function scalable(record) {
19582
+ function scalable(record, stepped) {
19544
19583
  const { key } = record;
19545
- if (record.dirtyS1 || record.cut || record.category === "placed" || key[KEY.rs] !== NOW.rs) return false;
19584
+ if (record.dirtyS1 || record.cut || record.category === "placed" || !stepped && key[KEY.rs] !== NOW.rs) return false;
19546
19585
  const taken = Math.abs((key[KEY.a] ?? 1) * (key[KEY.d] ?? 1) - (key[KEY.b] ?? 0) * (key[KEY.c] ?? 0));
19547
19586
  const now = Math.abs(NOW.a * NOW.d - NOW.b * NOW.c);
19548
19587
  const limit = 4;
@@ -19722,8 +19761,8 @@ function noteTake(kctx, record, why) {
19722
19761
  record.retakeAt = kctx.state.frame;
19723
19762
  }
19724
19763
  /**
19725
- * Marks every kept record above a record that was just first taken: their retake in this flush is not churn (F114),
19726
- * so the inner takes spread over frames do not drop the outer picture to live.
19764
+ * Marks every kept record above a record that was just first taken, settled or refined: their retake in this flush is
19765
+ * not churn (F114, F126), so the inner takes spread over frames do not drop the outer picture to live.
19727
19766
  *
19728
19767
  * @param kctx - The kept context.
19729
19768
  * @param record - The record just taken.
@@ -19786,14 +19825,16 @@ function stepLive(kctx, pixi, matrices, record, view) {
19786
19825
  * @param record - The record, kept.
19787
19826
  * @param view - Its view.
19788
19827
  * @param why - The `RETAKE` of the take.
19828
+ * @returns True when every stage rendered.
19789
19829
  */
19790
19830
  function retakeOrGoLive(kctx, pixi, matrices, record, view, why) {
19791
19831
  if (takePicture(kctx, pixi, matrices, record, view, NOW)) {
19792
19832
  noteTake(kctx, record, why);
19793
- return;
19833
+ return true;
19794
19834
  }
19795
19835
  goLive(kctx, record, view, true);
19796
19836
  noteHeld(kctx.state, record, false, false);
19837
+ return false;
19797
19838
  }
19798
19839
  /**
19799
19840
  * A stage-1 change of a kept record (P4.3): retaken, or after three in a row drawn live and calm, so it stands still
@@ -19819,40 +19860,61 @@ function churn(kctx, pixi, matrices, record, view, why) {
19819
19860
  }
19820
19861
  /**
19821
19862
  * What a retake of a kept record owes itself to: a new stack resolution, a change under its top, or a linear part it may
19822
- * not be drawn at.
19863
+ * not be drawn at. A stepped record owes the step nothing here.
19823
19864
  *
19824
19865
  * @param record - The record, kept, about to be retaken.
19866
+ * @param stepped - A step of the resolution passed over the picture.
19825
19867
  * @returns The `RETAKE`.
19826
19868
  */
19827
- function retakeWhy(record) {
19828
- if (record.key[KEY.rs] !== NOW.rs) return RETAKE.resolution;
19869
+ function retakeWhy(record, stepped) {
19870
+ if (!stepped && record.key[KEY.rs] !== NOW.rs) return RETAKE.resolution;
19829
19871
  if (record.dirtyS1) return RETAKE.mark;
19830
19872
  return record.cut || record.category === "placed" ? RETAKE.placedMove : RETAKE.scaleLimit;
19831
19873
  }
19832
19874
  /**
19833
- * What a refresh of a kept record owes itself to, read before the render writes its keys.
19875
+ * What a refresh of a kept record owes itself to, read before the render writes its keys. Under `hold` the resolution
19876
+ * is no reason: what is owed is the filter's.
19834
19877
  *
19835
19878
  * @param record - The record, kept.
19836
19879
  * @param chain - Stage 2 is redone too.
19880
+ * @param hold - A step of the resolution owes no stage.
19837
19881
  * @returns The `RETAKE`.
19838
19882
  */
19839
- function refreshWhy(record, chain) {
19883
+ function refreshWhy(record, chain, hold) {
19840
19884
  if (chain) return RETAKE.chain;
19841
- return NOW.r === record.key[KEY.r] ? RETAKE.filter : RETAKE.resolution;
19885
+ return hold || NOW.r === record.key[KEY.r] ? RETAKE.filter : RETAKE.resolution;
19842
19886
  }
19843
19887
  /**
19844
19888
  * Notes a move of a kept record: a quad that left its picture's texel grid owes one settle retake at rest, and asks
19845
- * for the frame it happens in.
19889
+ * for the frame it happens in. The grid is the picture's own: a step of the resolution leaves it where it was (F126).
19846
19890
  *
19847
19891
  * @param kctx - The kept context.
19848
19892
  * @param record - The record, kept.
19849
19893
  */
19850
19894
  function noteMove(kctx, record) {
19851
19895
  const { key } = record;
19852
- record.settle = !onGrid(NOW.tx - (key[KEY.tx] ?? 0), NOW.rs, NOW.r) || !onGrid(NOW.ty - (key[KEY.ty] ?? 0), NOW.rs, NOW.r);
19896
+ const rs = key[KEY.rs] ?? 1;
19897
+ const drawn = drawnResolution(key, record.direct);
19898
+ record.settle = !onGrid(NOW.tx - (key[KEY.tx] ?? 0), rs, drawn) || !onGrid(NOW.ty - (key[KEY.ty] ?? 0), rs, drawn);
19853
19899
  if (record.settle) kctx.demand.request();
19854
19900
  }
19855
19901
  /**
19902
+ * Notes what a frame of a kept record left it owing at rest: a move off its grid, and a picture drawn scaled, which is
19903
+ * sampled off its grid too and owes one settle retake, in a frame asked for.
19904
+ *
19905
+ * @param kctx - The kept context.
19906
+ * @param record - The record, kept.
19907
+ * @param moved - It moved in this frame.
19908
+ * @param scaled - It is drawn at another linear part than at the take.
19909
+ */
19910
+ function noteRest(kctx, record, moved, scaled) {
19911
+ if (moved) noteMove(kctx, record);
19912
+ if (scaled && !record.settle) {
19913
+ record.settle = true;
19914
+ kctx.demand.request();
19915
+ }
19916
+ }
19917
+ /**
19856
19918
  * Tells whether the canvas has another size than at the take.
19857
19919
  *
19858
19920
  * @param kctx - The kept context.
@@ -19864,9 +19926,110 @@ function canvasChanged(kctx, key) {
19864
19926
  return screen !== void 0 && (screen.width !== key[KEY.sw] || screen.height !== key[KEY.sh]);
19865
19927
  }
19866
19928
  /**
19867
- * A kept record's frame (P4.3): a stage-1 change retakes (three in a row go live and calm); otherwise a new chain
19868
- * version redoes stages 2 and 3, a filter value, the resolution, the padding or (placed) a move stage 3; at rest after
19869
- * an off-grid move one settle retake is owed.
19929
+ * Tells whether a step of the renderer resolution passed over a kept picture (F126): drawn at another resolution than
19930
+ * the canvas, with a stack that followed the canvas there: a resolution of its own, or `"inherit"`. A picture cut to the
19931
+ * canvas or placed, a filter that wrote its own resolution and a mixed stack whose fixed resolution the step crossed
19932
+ * are no step: their change is read as a change of the stack.
19933
+ *
19934
+ * @param record - The record, kept.
19935
+ * @returns True when the picture was stepped over.
19936
+ */
19937
+ function resolutionStepped(record) {
19938
+ if (record.cut || record.category === "placed") return false;
19939
+ const { key } = record;
19940
+ const drawn = drawnResolution(key, record.direct);
19941
+ if (drawn === NOW.r) return false;
19942
+ const fixedStack = key[KEY.rs] === NOW.rs;
19943
+ const followsCanvas = key[KEY.rs] === drawn && NOW.rs === NOW.r;
19944
+ return fixedStack || followsCanvas;
19945
+ }
19946
+ /**
19947
+ * Tells whether a take under `REFINE_TAKES` is left in this flush, and counts it; with none left the next frame is
19948
+ * asked for, in which the debt is paid.
19949
+ *
19950
+ * @param kctx - The kept context.
19951
+ * @returns True when the take may happen now.
19952
+ */
19953
+ function limitLeft(kctx) {
19954
+ const { state } = kctx;
19955
+ if (state.frameRefines >= 2) {
19956
+ kctx.demand.request();
19957
+ return false;
19958
+ }
19959
+ state.frameRefines += 1;
19960
+ return true;
19961
+ }
19962
+ /**
19963
+ * Refines a picture coarser than the canvas, the limit counted (P4.3): whole for a stack drawn direct and one whose
19964
+ * resolution moved, stage 3 alone for one on a fixed resolution. `refined` tells the pictures above that this change
19965
+ * was nothing else, and only once it rendered; it spares them, so refinements spread over frames do not churn an outer
19966
+ * picture that is marked to live.
19967
+ *
19968
+ * @param kctx - The kept context.
19969
+ * @param pixi - The module that draws.
19970
+ * @param matrices - The scratch matrices.
19971
+ * @param record - The record, kept and `coarse`.
19972
+ * @param view - Its view.
19973
+ * @param moved - It moved in this frame.
19974
+ * @param scaled - It is drawn at another linear part than at the take.
19975
+ */
19976
+ function refine(kctx, pixi, matrices, record, view, moved, scaled) {
19977
+ const { key } = record;
19978
+ const alone = drawsDirect(NOW) || stagesOwed(record, true) === OWED.none;
19979
+ if (record.direct || key[KEY.rs] !== NOW.rs) {
19980
+ record.refined = retakeOrGoLive(kctx, pixi, matrices, record, view, RETAKE.resolution) && alone;
19981
+ if (record.refined) spareAbove(kctx, record);
19982
+ return;
19983
+ }
19984
+ refresh$1(kctx, pixi, matrices, record, view, false);
19985
+ record.coarse = drawnResolution(key, record.direct) !== NOW.r;
19986
+ record.refined = !record.coarse && alone;
19987
+ if (record.refined) spareAbove(kctx, record);
19988
+ noteRest(kctx, record, moved, scaled);
19989
+ if (record.settle) kctx.demand.request();
19990
+ }
19991
+ /**
19992
+ * The retake a stage-1 change or a zoom past the limit owes a kept record, which counts as churn unless an inner
19993
+ * record's spread take alone caused it (F114).
19994
+ *
19995
+ * @param kctx - The kept context.
19996
+ * @param pixi - The module that draws.
19997
+ * @param matrices - The scratch matrices.
19998
+ * @param record - The record, kept.
19999
+ * @param view - Its view.
20000
+ * @param stepped - A step of the resolution passed over the picture.
20001
+ * @param scaled - It is drawn at another linear part than at the take.
20002
+ * @returns True when one was owed.
20003
+ */
20004
+ function retakeOwed$1(kctx, pixi, matrices, record, view, stepped, scaled) {
20005
+ if (!record.dirtyS1 && (!scaled || scalable(record, stepped))) return false;
20006
+ if (record.spared && !scaled) retakeOrGoLive(kctx, pixi, matrices, record, view, RETAKE.innerFirst);
20007
+ else churn(kctx, pixi, matrices, record, view, retakeWhy(record, stepped));
20008
+ return true;
20009
+ }
20010
+ /**
20011
+ * The settle retake of a kept record at rest, under the limit (P2.5, F114): it spares the pictures above it, so a settle
20012
+ * spread over frames does not churn an outer picture to live. With the limit spent `settle` stays set.
20013
+ *
20014
+ * @param kctx - The kept context.
20015
+ * @param pixi - The module that draws.
20016
+ * @param matrices - The scratch matrices.
20017
+ * @param record - The record, kept.
20018
+ * @param view - Its view.
20019
+ * @returns True when the picture was taken again.
20020
+ */
20021
+ function settleTake(kctx, pixi, matrices, record, view) {
20022
+ if (!limitLeft(kctx)) return false;
20023
+ spareAbove(kctx, record);
20024
+ retakeOrGoLive(kctx, pixi, matrices, record, view, RETAKE.settle);
20025
+ return true;
20026
+ }
20027
+ /**
20028
+ * A kept record's frame (P4.3): a stage-1 change retakes (three in a row go live and calm); otherwise a picture coarser
20029
+ * than the canvas after a step of the resolution is refined under the limit, at rest after an off-grid move or a zoom
20030
+ * one settle retake is owed under the same limit, and a new chain version redoes stages 2 and 3, a filter value, the
20031
+ * resolution, the padding or (placed) a move stage 3. A step is neither a move nor a scale, and on the way down it owes
20032
+ * nothing (F126).
19870
20033
  *
19871
20034
  * @param kctx - The kept context.
19872
20035
  * @param pixi - The module that draws.
@@ -19876,67 +20039,105 @@ function canvasChanged(kctx, key) {
19876
20039
  */
19877
20040
  function stepKept$1(kctx, pixi, matrices, record, view) {
19878
20041
  const { key } = record;
19879
- const turned = linearDiffers(key, NOW, KEY.seenA, KEY.seenRs);
19880
- const scaled = linearDiffers(key, NOW, KEY.a, KEY.rs);
20042
+ const stepped = resolutionStepped(record);
20043
+ const turned = stepped ? linearMoved(key, NOW, KEY.seenA) : linearDiffers(key, NOW, KEY.seenA, KEY.seenRs);
20044
+ const scaled = stepped ? linearMoved(key, NOW, KEY.a) : linearDiffers(key, NOW, KEY.a, KEY.rs);
19881
20045
  writeSeen(record, NOW);
19882
- const retake = record.dirtyS1 || scaled && !scalable(record);
19883
- if (retake && record.spared && !scaled) {
19884
- retakeOrGoLive(kctx, pixi, matrices, record, view, RETAKE.innerFirst);
19885
- return;
19886
- }
19887
- if (retake) {
19888
- churn(kctx, pixi, matrices, record, view, retakeWhy(record));
19889
- return;
19890
- }
20046
+ if (retakeOwed$1(kctx, pixi, matrices, record, view, stepped, scaled)) return;
19891
20047
  const moved = turned || NOW.tx !== key[KEY.lastTx] || NOW.ty !== key[KEY.lastTy];
19892
20048
  if (record.cut && (moved || canvasChanged(kctx, key))) {
19893
20049
  churn(kctx, pixi, matrices, record, view, RETAKE.canvas);
19894
20050
  return;
19895
20051
  }
19896
20052
  record.churn = 0;
19897
- if (!moved && record.settle) {
19898
- retakeOrGoLive(kctx, pixi, matrices, record, view, RETAKE.settle);
20053
+ record.coarse = stepped && NOW.r > drawnResolution(key, record.direct);
20054
+ if (record.coarse && limitLeft(kctx)) {
20055
+ refine(kctx, pixi, matrices, record, view, moved, scaled);
19899
20056
  return;
19900
20057
  }
19901
- refresh$1(kctx, pixi, matrices, record);
19902
- if (moved) noteMove(kctx, record);
19903
- if (scaled && !record.settle) {
19904
- record.settle = true;
19905
- kctx.demand.request();
19906
- }
20058
+ if (!moved && record.settle && (scaled || !stepped) && settleTake(kctx, pixi, matrices, record, view)) return;
20059
+ if (refresh$1(kctx, pixi, matrices, record, view, stepped)) return;
20060
+ noteRest(kctx, record, moved, scaled);
20061
+ }
20062
+ /**
20063
+ * Tells whether stage 2 is owed: a new chain, a new chain version, or a new subtree picture under it.
20064
+ *
20065
+ * @param record - The record, kept.
20066
+ * @param inputs - The seam of its first filter with inputs.
20067
+ * @returns True when it is.
20068
+ */
20069
+ function chainOwed(record, inputs) {
20070
+ return record.dirtyS2 || inputs !== record.s2Of || inputs.version() !== record.s2InputsVersion || record.s1Version !== record.s2PictureVersion;
20071
+ }
20072
+ /**
20073
+ * Tells whether stage 3 is owed for its own keys: a filter value, the resolution, the padding, a placed filter's move.
20074
+ * Under `hold` the resolution is no reason, and a stack drawn direct has no padding: its key is stale.
20075
+ *
20076
+ * @param record - The record, kept.
20077
+ * @param hold - A step of the resolution owes no stage.
20078
+ * @returns True when it is.
20079
+ */
20080
+ function outputOwed(record, hold) {
20081
+ const { key } = record;
20082
+ const resolutionOwed = !hold && NOW.r !== key[KEY.r];
20083
+ const paddingOwed = hold && record.direct ? NOW.P !== 0 : NOW.P !== key[KEY.P];
20084
+ const placedMoved = record.category === "placed" && (NOW.tx !== key[KEY.s3Tx] || NOW.ty !== key[KEY.s3Ty]);
20085
+ return record.dirtyS3 || resolutionOwed || paddingOwed || placedMoved;
19907
20086
  }
19908
20087
  /**
19909
- * Redoes stage 2 and 3, or stage 3 alone, when their keys changed (P4.3): a refresh never counts as churn.
20088
+ * What a kept record that does not draw direct owes `refresh`: read by it and by the refining. Stage 3 follows stage 2,
20089
+ * and a chain that left.
20090
+ *
20091
+ * @param record - The record, kept.
20092
+ * @param hold - A step of the resolution owes no stage.
20093
+ * @returns The `OWED`.
20094
+ */
20095
+ function stagesOwed(record, hold) {
20096
+ const inputs = firstInputs(record.slots)?.inputs;
20097
+ if (inputs !== void 0 && chainOwed(record, inputs)) return OWED.chain;
20098
+ return inputs === void 0 && record.s2Of !== void 0 || outputOwed(record, hold) ? OWED.output : OWED.none;
20099
+ }
20100
+ /**
20101
+ * Redoes stage 2 and 3, or stage 3 alone, when their keys changed (P4.3): a refresh never counts as churn. Under `hold`
20102
+ * the resolution owes nothing, and what else is owed lands on one resolution: a stack whose resolution moved is taken
20103
+ * whole, before anything is released or rendered, so stage 3 is never drawn at a new `rs` over a stage 1 of an old one.
19910
20104
  *
19911
20105
  * @param kctx - The kept context.
19912
20106
  * @param pixi - The module that draws.
19913
20107
  * @param matrices - The scratch matrices.
19914
20108
  * @param record - The record, kept.
20109
+ * @param view - Its view.
20110
+ * @param hold - A step of the resolution owes no stage.
20111
+ * @returns True when the record was taken whole.
19915
20112
  */
19916
- function refresh$1(kctx, pixi, matrices, record) {
19917
- const { key } = record;
20113
+ function refresh$1(kctx, pixi, matrices, record, view, hold) {
19918
20114
  if (drawsDirect(NOW)) {
19919
- if (record.direct) return;
20115
+ if (record.direct) return false;
19920
20116
  goDirect(kctx, record);
19921
20117
  account(kctx, record);
19922
- return;
20118
+ return false;
20119
+ }
20120
+ const owed = stagesOwed(record, hold);
20121
+ if (owed === OWED.none) return false;
20122
+ const chain = owed === OWED.chain;
20123
+ const why = refreshWhy(record, chain, hold);
20124
+ if (hold && record.key[KEY.rs] !== NOW.rs) {
20125
+ retakeOrGoLive(kctx, pixi, matrices, record, view, why);
20126
+ return true;
19923
20127
  }
19924
20128
  const inputs = firstInputs(record.slots)?.inputs;
19925
- const stageTwoOwed = inputs !== void 0 && (record.dirtyS2 || inputs !== record.s2Of || inputs.version() !== record.s2InputsVersion || record.s1Version !== record.s2PictureVersion);
19926
- const inputsLeft = inputs === void 0 && record.s2Of !== void 0;
19927
- const stageThreeOwed = stageTwoOwed || inputsLeft || record.dirtyS3 || NOW.r !== key[KEY.r] || NOW.P !== key[KEY.P] || record.category === "placed" && (NOW.tx !== key[KEY.s3Tx] || NOW.ty !== key[KEY.s3Ty]);
19928
- if (inputsLeft) releaseInputs(kctx, record);
19929
- if (stageTwoOwed) renderStage2(kctx, pixi, matrices, record, {
20129
+ if (inputs === void 0 && record.s2Of !== void 0) releaseInputs(kctx, record);
20130
+ if (chain && inputs !== void 0) renderStage2(kctx, pixi, matrices, record, {
19930
20131
  inputs,
19931
20132
  resolution: NOW.r,
19932
20133
  padding: NOW.P
19933
20134
  });
19934
- if (!stageThreeOwed) return;
19935
- noteTake(kctx, record, refreshWhy(record, stageTwoOwed));
20135
+ noteTake(kctx, record, why);
19936
20136
  record.direct = false;
19937
20137
  renderStage3(kctx, pixi, matrices, record, NOW);
19938
20138
  account(kctx, record);
19939
- if (!stageTwoOwed) kctx.state.refreshesOpen += 1;
20139
+ if (!chain) kctx.state.refreshesOpen += 1;
20140
+ return false;
19940
20141
  }
19941
20142
  /**
19942
20143
  * Tells whether a record's quad shows: visible and hanging in the tree.
@@ -19974,9 +20175,19 @@ function drawingChanged(kctx, record, before) {
19974
20175
  return before.mode !== record.mode || before.passes !== kctx.state.flushPasses || !Object.is(before.qtx, record.key[KEY.qtx]) || !Object.is(before.qty, record.key[KEY.qty]) || before.shown !== quadShown(record);
19975
20176
  }
19976
20177
  /**
20178
+ * Tells whether a kept record has anything to do in this frame: the frame is not calm, or a flag or a debt is on it.
20179
+ *
20180
+ * @param state - The kept state.
20181
+ * @param record - The record.
20182
+ * @returns True when it is to be stepped.
20183
+ */
20184
+ function owesStep(state, record) {
20185
+ return !state.calm || state.bypassed || record.mode !== "kept" || record.dirtyS1 || record.dirtyS2 || record.dirtyS3 || record.settle || record.coarse || record.churn !== 0;
20186
+ }
20187
+ /**
19977
20188
  * The frame of a kept record in a calm frame (no mark, no whole-frame reason) that owes nothing: no dirty flag, no
19978
- * settle retake, no churn, not bypassed. Its step would find every key as it stands and its quad where it is, so it is
19979
- * counted as drawn from its picture and left alone (E5).
20189
+ * settle or refining take, no churn, not bypassed. Its step would find every key as it stands and its quad where it
20190
+ * is, so it is counted as drawn from its picture and left alone (E5).
19980
20191
  *
19981
20192
  * @param kctx - The kept context.
19982
20193
  * @param record - The record.
@@ -19984,7 +20195,7 @@ function drawingChanged(kctx, record, before) {
19984
20195
  */
19985
20196
  function stepCalm(kctx, record) {
19986
20197
  const { state } = kctx;
19987
- if (!state.calm || state.bypassed || record.mode !== "kept" || record.dirtyS1 || record.dirtyS2 || record.dirtyS3 || record.settle || record.churn !== 0) return false;
20198
+ if (owesStep(state, record)) return false;
19988
20199
  record.lastDrawn = state.frame;
19989
20200
  state.drawnPictures += 1;
19990
20201
  record.quiet += 1;
@@ -20051,11 +20262,12 @@ function stepRecord(kctx, pixi, matrices, record, view) {
20051
20262
  const why = eligible(kctx, record, view, NOW);
20052
20263
  if (why === 0) stepEligible(kctx, pixi, matrices, record, view);
20053
20264
  else stepIneligible(kctx, record, view, why);
20054
- if (drawingChanged(kctx, record, BEFORE)) dirtyAbove(kctx, record);
20265
+ if (drawingChanged(kctx, record, BEFORE)) dirtyAbove(kctx, pixi, record);
20055
20266
  record.quiet = record.dirtyS1 ? 0 : record.quiet + 1;
20056
20267
  record.dirtyS1 = false;
20057
20268
  record.dirtyS2 = false;
20058
20269
  record.dirtyS3 = false;
20270
+ record.refined = false;
20059
20271
  record.markBy = 0;
20060
20272
  record.spared = false;
20061
20273
  if (record.alphaDue && record.mode !== "kept") record.alphaMissed = true;
@@ -20114,16 +20326,34 @@ function rangeHolds$1(entries, node) {
20114
20326
  return false;
20115
20327
  }
20116
20328
  /**
20329
+ * Tells whether a record above a refined picture will be taken whole under the limit, after its inner ones: kept,
20330
+ * coarser than the canvas, on a stack that follows the canvas (a stack on a fixed resolution would get stage 3 alone), or
20331
+ * drawn direct. Read here because that record has not stepped yet. Deepest first, so it comes up once, and needs no mark.
20332
+ *
20333
+ * @param pixi - The module that draws.
20334
+ * @param above - The record above.
20335
+ * @returns True when it needs no mark.
20336
+ */
20337
+ function takenAfterInner(pixi, above) {
20338
+ const { key } = above;
20339
+ const drawn = drawnResolution(key, above.direct);
20340
+ if (above.mode !== "kept" || drawn >= NOW.r || key[KEY.rs] !== drawn) return false;
20341
+ readStack(above.slots, NOW.r, pixi.AlphaFilter, DUE);
20342
+ return above.direct || DUE.rs === NOW.r;
20343
+ }
20344
+ /**
20117
20345
  * Marks every record above a record as changed: its picture holds what this one drew, and the flush renders inner
20118
- * records first, so they are retaken in the same flush (P4.5).
20346
+ * records first, so they are retaken in the same flush (P4.5). A refining alone leaves a record above that is taken
20347
+ * whole after it (F126).
20119
20348
  *
20120
20349
  * @param kctx - The kept context.
20350
+ * @param pixi - The module that draws.
20121
20351
  * @param record - The record whose drawing changed.
20122
20352
  */
20123
- function dirtyAbove(kctx, record) {
20353
+ function dirtyAbove(kctx, pixi, record) {
20124
20354
  for (let node = record.top.parent; node !== null; node = node.parent) {
20125
20355
  const above = kctx.state.byTop.get(node);
20126
- if (above !== void 0) {
20356
+ if (above !== void 0 && !(record.refined && takenAfterInner(pixi, above))) {
20127
20357
  above.dirtyS1 = true;
20128
20358
  above.markBy = record.entity;
20129
20359
  }
@@ -20165,8 +20395,9 @@ function bypassRecord(kctx, record, view, live) {
20165
20395
  * it inline, so a production bundle drops this module.
20166
20396
  */
20167
20397
  /**
20168
- * Tells whether a kept record's quad stands off its picture's grid: it is moving, or drawn scaled to another linear part
20169
- * than at the take (F67), and sampled linearly (P2.5).
20398
+ * Tells whether a kept record's quad stands off its picture's grid: it is moving, drawn scaled to another linear part
20399
+ * than at the take (F67), or drawn at another resolution than the canvas after a step (F126), and sampled linearly
20400
+ * (P2.5). The last is the resampling of a picture nothing changed, not a stale one.
20170
20401
  *
20171
20402
  * @param kctx - The kept context.
20172
20403
  * @param record - The record, kept.
@@ -20177,7 +20408,7 @@ function offGrid(kctx, record) {
20177
20408
  const world = record.top.getGlobalTransform(record.matrix, false);
20178
20409
  const rs = key[KEY.rs] ?? 1;
20179
20410
  const r = kctx.host.resolution();
20180
- return world.a !== key[KEY.a] || world.b !== key[KEY.b] || world.c !== key[KEY.c] || world.d !== key[KEY.d] || !onGrid(world.tx - (key[KEY.tx] ?? 0), rs, r) || !onGrid(world.ty - (key[KEY.ty] ?? 0), rs, r);
20411
+ return drawnResolution(key, record.direct) !== r || world.a !== key[KEY.a] || world.b !== key[KEY.b] || world.c !== key[KEY.c] || world.d !== key[KEY.d] || !onGrid(world.tx - (key[KEY.tx] ?? 0), rs, r) || !onGrid(world.ty - (key[KEY.ty] ?? 0), rs, r);
20181
20412
  }
20182
20413
  /**
20183
20414
  * Tells whether a kept record is translucent, by its top's own alpha (F120) or an ancestor's (F113): its quad draws
@@ -20280,8 +20511,9 @@ function logStale(kctx, pixels, records, ranges) {
20280
20511
  }
20281
20512
  /**
20282
20513
  * The pixel leg after a drawn frame: the picture as drawn against the same frame with every picture live. Frames in
20283
- * which a picture moves off its grid, is translucent itself (F120) or hangs under a translucent ancestor (F113) are
20284
- * skipped and counted; at rest, opaque, under opaque ancestors every picture is compared.
20514
+ * which a picture moves off its grid, was drawn at another resolution (F126), is translucent itself (F120) or hangs
20515
+ * under a translucent ancestor (F113) are skipped and counted; at rest, opaque, under opaque ancestors every picture is
20516
+ * compared.
20285
20517
  *
20286
20518
  * @param kctx - The kept context.
20287
20519
  * @param bypass - Draws every kept record live (true) or as its picture again (false).
@@ -20654,6 +20886,7 @@ function createKeptApi(ctx, deps) {
20654
20886
  if (state.on) {
20655
20887
  sortRecords();
20656
20888
  state.firstTakes = 0;
20889
+ state.frameRefines = 0;
20657
20890
  markAlphaDue(kctx, pixi);
20658
20891
  stepRecords(kctx, pixi, matrices);
20659
20892
  state.calm = false;
@@ -28921,7 +29154,7 @@ function defaultBordersOf(nine) {
28921
29154
  };
28922
29155
  }
28923
29156
  /**
28924
- * Makes a Pixi texture out of a decoded image, on behalf of `assets`.
29157
+ * Makes a Pixi texture out of a decoded image, on behalf of `assets`, which decides when it leaves the GPU.
28925
29158
  *
28926
29159
  * @param sctx - Domain context of the sync module.
28927
29160
  * @param image - The decoded image.
@@ -28936,6 +29169,7 @@ function createTexture(sctx, image, options) {
28936
29169
  autoGenerateMipmaps: true
28937
29170
  }) : pixi.Texture.from(image);
28938
29171
  const nine = options?.nine;
29172
+ base.source.autoGarbageCollect = false;
28939
29173
  if (nine === void 0) return base;
28940
29174
  const bordered = new pixi.Texture({
28941
29175
  source: base.source,
@@ -30472,6 +30706,7 @@ function put(sctx, upload, source) {
30472
30706
  });
30473
30707
  }
30474
30708
  upload.done.add(source);
30709
+ source.once("unload", upload.forget);
30475
30710
  }
30476
30711
  /**
30477
30712
  * Counts a source off for the calls that wait for it; a call whose last source it was answers true.
@@ -35565,12 +35800,16 @@ function createWarmState() {
35565
35800
  * @returns The upload branch of the sync state.
35566
35801
  */
35567
35802
  function createUploadState() {
35568
- return {
35803
+ const upload = {
35569
35804
  queue: [],
35570
35805
  head: 0,
35571
35806
  waiting: emptyMap$6(),
35572
- done: emptyWeakSet()
35807
+ done: emptyWeakSet(),
35808
+ forget: (source) => {
35809
+ upload.done.delete(source);
35810
+ }
35573
35811
  };
35812
+ return upload;
35574
35813
  }
35575
35814
  /**
35576
35815
  * Creates the empty aside queue of a scene build: nothing waits for a view. Its own non-exported function, as
@@ -1,7 +1,7 @@
1
- import { Bn as Hint, Dr as ClockSource, En as AnyFlow, Fr as Json, In as Descriptor, Mn as NodeTable, Vn as NodeFx, kr as FakeClock, wn as FeaturePlugin } from "./types-JrYEbbeJ.mjs";
2
- import { t as createApp } from "./index-CDOJKnNB.mjs";
3
- import { b as saveOf, v as WithGameState, y as memory } from "./types-CD25TfIM.mjs";
4
- import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-CFlHYKpY.mjs";
1
+ import { Bn as Hint, Dr as ClockSource, En as AnyFlow, Fr as Json, In as Descriptor, Mn as NodeTable, Vn as NodeFx, kr as FakeClock, wn as FeaturePlugin } from "./types-Dhc7xlyk.mjs";
2
+ import { t as createApp } from "./index-cktcVt-3.mjs";
3
+ import { b as saveOf, v as WithGameState, y as memory } from "./types-CYSXO-4b.mjs";
4
+ import { a as createHeadless, i as ReproResult, n as HeadlessGame, o as runRepro, r as Repro, s as stepFrames, t as HeadlessApp } from "./headless-CdFTpj8K.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/clock/fake.d.ts
package/dist/testing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { m as flattenFeatures, on as type, rn as exit, t as createApp, tn as refuseStart } from "./src-C3rvV0rG.mjs";
1
+ import { m as flattenFeatures, on as type, rn as exit, t as createApp, tn as refuseStart } from "./src-CeeW4Mct.mjs";
2
2
  import { n as saveOf, t as memory } from "./memory-CWlqhS7l.mjs";
3
3
  import { n as fakeClock } from "./fake-hnJcJeYf.mjs";
4
4
  import { i as stepFrames, r as runRepro, t as createHeadless } from "./headless-CCiUwvlp.mjs";
@@ -1,5 +1,5 @@
1
- import { $ as PixiFilter, $n as ReducedMotion, A as SyncApi, Fn as TypeTag, Fr as Json, In as Descriptor, Kn as Ease, Mr as Api$6, O as FilterSlot, Pr as Events$3, Un as AnchorTarget, X as Api$4, Xn as NumericFields, Yn as MotionHandle, Zr as Events$5, b as Events$4, di as Require, dr as Entity, dt as Point, et as PixiModule, ir as AnyComponent, k as FilterSlotInputs, lr as ComponentType, nr as TrackSegment, nt as PixiTexture, or as AnyComponentValue, pt as FilterCache, s as Events$1, sn as Api$2, sr as ComponentHandle, t as Api$5, ti as Api$1, tr as TrackOptions, tt as PixiSprite, ui as Events$2, xr as Api$3 } from "./types-JrYEbbeJ.mjs";
2
- import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-DvAtKyJ3.mjs";
1
+ import { $ as PixiFilter, $n as ReducedMotion, A as SyncApi, Fn as TypeTag, Fr as Json, In as Descriptor, Kn as Ease, Mr as Api$6, O as FilterSlot, Pr as Events$3, Un as AnchorTarget, X as Api$4, Xn as NumericFields, Yn as MotionHandle, Zr as Events$5, b as Events$4, di as Require, dr as Entity, dt as Point, et as PixiModule, ir as AnyComponent, k as FilterSlotInputs, lr as ComponentType, nr as TrackSegment, nt as PixiTexture, or as AnyComponentValue, pt as FilterCache, s as Events$1, sn as Api$2, sr as ComponentHandle, t as Api$5, ti as Api$1, tr as TrackOptions, tt as PixiSprite, ui as Events$2, xr as Api$3 } from "./types-Dhc7xlyk.mjs";
2
+ import { N as InputApi, R as I18nApi, X as StylesState, c as UiNode, i as Finding, l as LayoutState, n as ElementChange, o as JsxState, r as ElementMotion, w as TextApi } from "./types-CQ_B2CbW.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
  import { PluginCtx } from "@moku-labs/core";
5
5
 
@@ -1,5 +1,5 @@
1
- import { Fr as Json, Wr as Snapshot } from "./types-JrYEbbeJ.mjs";
2
- import { t as HeadlessApp } from "./headless-CFlHYKpY.mjs";
1
+ import { Fr as Json, Wr as Snapshot } from "./types-Dhc7xlyk.mjs";
2
+ import { t as HeadlessApp } from "./headless-CdFTpj8K.mjs";
3
3
  import { Log } from "@moku-labs/common/browser";
4
4
 
5
5
  //#region src/plugins/flow/doors/types.d.ts
@@ -1,4 +1,4 @@
1
- import { $n as ReducedMotion, Bn as Hint, Er as Api$5, Fr as Json, Hn as Answer, In as Descriptor, Jn as MotionCause, Kn as Ease, Un as AnchorTarget, Wn as ChangeHook, X as Api$3, Xn as NumericFields, Yn as MotionHandle, Zn as ProjectionMotion, ar as AnyComponentType, br as TagType, di as Require, dr as Entity, ft as ViewportSize, ir as AnyComponent, lr as ComponentType, or as AnyComponentValue, q as TransformValue, qn as Motion, rr as ViewHandle, s as Events$1, sn as Api$1, t as Api$4, ti as Api, xr as Api$2 } from "./types-JrYEbbeJ.mjs";
1
+ import { $n as ReducedMotion, Bn as Hint, Er as Api$5, Fr as Json, Hn as Answer, In as Descriptor, Jn as MotionCause, Kn as Ease, Un as AnchorTarget, Wn as ChangeHook, X as Api$3, Xn as NumericFields, Yn as MotionHandle, Zn as ProjectionMotion, ar as AnyComponentType, br as TagType, di as Require, dr as Entity, ft as ViewportSize, ir as AnyComponent, lr as ComponentType, or as AnyComponentValue, q as TransformValue, qn as Motion, rr as ViewHandle, s as Events$1, sn as Api$1, t as Api$4, ti as Api, xr as Api$2 } from "./types-Dhc7xlyk.mjs";
2
2
  import { Log } from "@moku-labs/common/browser";
3
3
  import { PluginCtx } from "@moku-labs/core";
4
4
  import { Node, Yoga } from "yoga-layout/load";
@@ -1,7 +1,7 @@
1
- import { Br as PlayerStateProvider, Dr as ClockSource, En as AnyFlow, Fn as TypeTag, Fr as Json, Gr as SnapshotOf, Hr as SaveDoc, Nr as Config, Vr as ProviderCall, Z as Config$2, a as Config$3, d as Manifest, et as PixiModule, kr as FakeClock, ln as Config$1, n as AssetsIo, ut as Orientation, wn as FeaturePlugin } from "./types-JrYEbbeJ.mjs";
2
- import { o as AudioContextLike, s as Config$4 } from "./types-G9hpd34F.mjs";
3
- import { R as I18nApi, U as StringTable, W as TextKey } from "./types-DvAtKyJ3.mjs";
4
- import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-CDOJKnNB.mjs";
1
+ import { Br as PlayerStateProvider, Dr as ClockSource, En as AnyFlow, Fn as TypeTag, Fr as Json, Gr as SnapshotOf, Hr as SaveDoc, Nr as Config, Vr as ProviderCall, Z as Config$2, a as Config$3, d as Manifest, et as PixiModule, kr as FakeClock, ln as Config$1, n as AssetsIo, ut as Orientation, wn as FeaturePlugin } from "./types-Dhc7xlyk.mjs";
2
+ import { o as AudioContextLike, s as Config$4 } from "./types-BaMaybxt.mjs";
3
+ import { R as I18nApi, U as StringTable, W as TextKey } from "./types-CQ_B2CbW.mjs";
4
+ import { St as effectsPlugin, Tt as audioPlugin, ht as PlatformProvider, i as screen, pt as platformPlugin, t as createApp } from "./index-cktcVt-3.mjs";
5
5
  import { AnyPluginInstance } from "@moku-labs/core";
6
6
 
7
7
  //#region src/plugins/model/store/providers/memory.d.ts
@@ -8787,8 +8787,8 @@ type KeptStats = {
8787
8787
  type WhyLive = "off" | "backdrop" | "filter-blend" | "cache-false" | "hidden" | "faded-out" | "top-blend" | "ancestor-tint" | "ancestor-blend" | "ancestor-hidden" | "placed-under-filter" | "blend-below" | "display" | "waiting" | "alpha-due" | "churn" | "budget" | "idle";
8788
8788
  /**
8789
8789
  * What a kept picture's last take was for, as `sync.debug.why()` names it: `"first"` (taken from live), `"mark"` (its
8790
- * subtree changed), `"inner-first"` (a view inside it took its first picture, F114), `"resolution"`, `"settle"` (it came
8791
- * to rest off its picture's grid), `"scale-limit"` (a zoom past what a picture is drawn scaled), `"canvas"` (a picture
8790
+ * subtree changed), `"inner-first"` (a view inside it took its first picture, or was settled or refined: F114, F126),
8791
+ * `"resolution"`, `"settle"` (it came to rest off its picture's grid), `"scale-limit"` (a zoom past what a picture is drawn scaled), `"canvas"` (a picture
8792
8792
  * cut to the canvas moved or the canvas changed), `"filter"` (the filter output alone), `"chain"` (the filter's pre-pass
8793
8793
  * and output) and `"placed-move"` (a view drawn scaled that may not be: placed, or cut to the canvas).
8794
8794
  *
@@ -8880,7 +8880,13 @@ type KeptRecord = {
8880
8880
  lastDrawn: number; /** Depth of the top under the stage, for the inner-first order (P5.2). */
8881
8881
  depth: number; /** Bytes of s1, s2, s3 (estimate, P6.1). */
8882
8882
  bytes: number; /** A settle retake is owed: the view came to rest off its picture's grid (P2.5). */
8883
- settle: boolean; /** Bytes a refused take asked for; the record is not offered again until they fit (P6.3). */
8883
+ settle: boolean;
8884
+ /**
8885
+ * A take under the limit is owed: after a step of the renderer resolution the picture is coarser than the canvas
8886
+ * (P4.3), and the step must run also in a calm frame.
8887
+ */
8888
+ coarse: boolean; /** This step's change of the record was a refining take and nothing else: read by `dirtyAbove`, cleared with the dirty flags. */
8889
+ refined: boolean; /** Bytes a refused take asked for; the record is not offered again until they fit (P6.3). */
8884
8890
  refused: number;
8885
8891
  /**
8886
8892
  * The picture was cut to the canvas at its take (F53): a move or another canvas size would show what it left out,
@@ -8902,7 +8908,7 @@ type KeptRecord = {
8902
8908
  * is not taken again until a frame that sets `dirtyS1` (a change under the top) clears it.
8903
8909
  */
8904
8910
  blended: boolean; /** The frame of the record's last take from live (F114): a picture that goes ineligible right after it churns. */
8905
- takenAt: number; /** An inner record was first taken: the next stage-1 retake this causes is not counted as churn (F114). */
8911
+ takenAt: number; /** An inner record was first taken, settled or refined: the stage-1 retake this causes is not churn (F114, F126). */
8906
8912
  spared: boolean;
8907
8913
  /**
8908
8914
  * A take attempt rendered nothing (off the canvas, empty bounds, too big, a `Display` without `onDemand`): no take is
@@ -8987,7 +8993,8 @@ type KeptState = {
8987
8993
  * the next flush.
8988
8994
  */
8989
8995
  calm: boolean; /** First takes in this flush (F114): every one counts; a stack drawn direct is never held back by the count. */
8990
- firstTakes: number; /** A record drawn direct is due in this flush: the first takes of the others wait for the next (F114). */
8996
+ firstTakes: number; /** The limited takes of this flush, refining and settle together (P4.3, `REFINE_TAKES`). */
8997
+ frameRefines: number; /** A record drawn direct is due in this flush: the first takes of the others wait for the next (F114). */
8991
8998
  alphaDue: boolean; /** Live records drawn live with a filter in this flush (F119): from `CROWD` on, their first takes do not wait. */
8992
8999
  liveWaiting: number;
8993
9000
  };
@@ -11172,7 +11179,8 @@ type TexturesApi = {
11172
11179
  */
11173
11180
  provide(fn: TextureProvider): () => void;
11174
11181
  /**
11175
- * Makes a Pixi texture from a decoded image, so `assets` never imports Pixi.
11182
+ * Makes a Pixi texture from a decoded image, so `assets` never imports Pixi. Once uploaded it stays on the GPU until
11183
+ * `destroy`: Pixi's collector leaves it alone.
11176
11184
  *
11177
11185
  * @param image - The decoded image.
11178
11186
  * @param options - `nine` is left, top, right and bottom in pixels; it becomes the texture's
@@ -11183,6 +11191,7 @@ type TexturesApi = {
11183
11191
  * ```ts
11184
11192
  * // `assets` uploads one file of a bundle it just decoded.
11185
11193
  * const renderer = ctx.require(rendererPlugin);
11194
+ * const response = await fetch("/assets/board/panel.png");
11186
11195
  * const bitmap = await createImageBitmap(await response.blob());
11187
11196
  * const texture = renderer.sync.textures.create(bitmap, { nine: [12, 12, 12, 12] });
11188
11197
  * ```
@@ -11245,7 +11254,8 @@ type TexturesApi = {
11245
11254
  * and the renderer asks for the next frame while sources wait. The slices of one atlas page share its source, so the
11246
11255
  * page is uploaded once. On a Galaxy A26 one upload costs about 9 ms whatever its size: the frame that showed 6 cold
11247
11256
  * textures took 55 ms, 8 ms once they were uploaded before. Answers `true` once every source of this call went
11248
- * through, at once when they all did on this device; `false` at once while nothing draws (headless, a lost device)
11257
+ * through, at once when they all did on this device and none left it since; `false` at once while nothing draws
11258
+ * (headless, a lost device)
11249
11259
  * or with `uploads: 0`, and `false` when the renderer stops or the device is lost before the queue reached them. A
11250
11260
  * source whose upload throws is logged (`renderer:upload-failed`) and counted done: its first draw uploads it, as
11251
11261
  * before. A source destroyed while it waits is skipped. The renderer never destroys a texture it was handed.
@@ -12296,9 +12306,10 @@ type UploadState = {
12296
12306
  waiting: Map<PixiTextureSource, UploadWaiter[]>;
12297
12307
  /**
12298
12308
  * The sources that went through `initSource` on this device, or threw there: a call naming only these answers at
12299
- * once.
12309
+ * once. A source leaves it at its `unload`.
12300
12310
  */
12301
- done: WeakSet<PixiTextureSource>;
12311
+ done: WeakSet<PixiTextureSource>; /** The one listener on `unload` of every source in `done`. */
12312
+ forget(source: PixiTextureSource): void;
12302
12313
  };
12303
12314
  /**
12304
12315
  * What a nine-slice view's object offers `sync`, whichever class draws it: Pixi's `NineSliceSprite`, or the engine's
@@ -1,9 +1,9 @@
1
- import { Er as Api$4, Mr as Api$2, X as Api, Yr as Api$3, xr as Api$1 } from "./types-JrYEbbeJ.mjs";
2
- import { P as AnimApi, r as UiApi } from "./types-G9hpd34F.mjs";
3
- import { N as InputApi } from "./types-DvAtKyJ3.mjs";
4
- import { r as Repro } from "./headless-CFlHYKpY.mjs";
5
- import { a as InputOf, r as ControlApp } from "./types-B9dzviB6.mjs";
6
- import { t as commands } from "./commands-BICMk0d0.mjs";
1
+ import { Er as Api$4, Mr as Api$2, X as Api, Yr as Api$3, xr as Api$1 } from "./types-Dhc7xlyk.mjs";
2
+ import { P as AnimApi, r as UiApi } from "./types-BaMaybxt.mjs";
3
+ import { N as InputApi } from "./types-CQ_B2CbW.mjs";
4
+ import { r as Repro } from "./headless-CdFTpj8K.mjs";
5
+ import { a as InputOf, r as ControlApp } from "./types-C-X_2Nrp.mjs";
6
+ import { t as commands } from "./commands-DU1w0Rsf.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-Dfue6iA6.mjs";
1
+ import { a as VisualApp, c as VisualRenderer, d as VisualStart, f as VisualStep, h as VisualTolerance, i as CheckpointResult, l as VisualReport, m as VisualTestResult, n as runVisualTests, o as VisualOptions, p as VisualTest, r as defineVisualTest, s as VisualPage, t as parseVisualArgv, u as VisualSetup } from "./visual-DYqbc3ro.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.78",
3
+ "version": "0.15.80",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [