@moku-labs/game 0.15.71 → 0.15.72

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.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-DvoCl9R3.mjs";
1
+ import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-CcqRw6N0.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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as sfx, $t as flowPlugin, 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 worldPlugin, 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 DEMAND_REASONS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as type, at as use, b as types_exports$17, bt as Traced, c as hint, cn as lifecyclePlugin, ct as Draggable, d as defineScene, dt as Hovered, 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 to, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as timePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as exit, nt as stagger, o as defineEffect, on as modelPlugin, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as slot, rt as stopSfx, s as guide, sn as SaveUnreadableError, st as inputPlugin, t as createApp, tn as contribution, tt as spawned, u as projection, un as clockPlugin, 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-DvoCl9R3.mjs";
1
+ import { $ as sfx, $t as flowPlugin, 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 worldPlugin, 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 DEMAND_REASONS, _ as defineBundles, _t as Tappable, a as cubicBezier, an as type, at as use, b as types_exports$17, bt as Traced, c as hint, cn as lifecyclePlugin, ct as Draggable, d as defineScene, dt as Hovered, 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 to, it as tween, j as types_exports$6, jt as Noise, k as types_exports$8, kt as Displacement, l as schedule, ln as timePlugin, lt as DropTarget, m as flattenFeatures, mt as Pressable, n as createPlugin, nn as exit, nt as stagger, o as defineEffect, on as modelPlugin, ot as wait, p as defineFeature, pt as PointerOver, q as haptic, qt as PERF_GAP_BUCKETS, r as defineGame, rn as slot, rt as stopSfx, s as guide, sn as SaveUnreadableError, st as inputPlugin, t as createApp, tn as contribution, tt as spawned, u as projection, un as clockPlugin, 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-CcqRw6N0.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, 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 };
@@ -17356,8 +17356,29 @@ function storeMatrix(cells, at, matrix) {
17356
17356
  return true;
17357
17357
  }
17358
17358
  //#endregion
17359
+ //#region src/plugins/renderer/sources.ts
17360
+ /**
17361
+ * Destroys a texture with its source, after the `change` listeners of the source and of its style
17362
+ * are removed: Pixi 8.22 caches batch and filter bind groups forever, and each one warns
17363
+ * `[BindGroup] ... destroyed while still bound to a shader` when a source it holds goes. For every
17364
+ * texture the renderer owns whole: loaded files, kept pictures, the warm-up target.
17365
+ *
17366
+ * @param texture - The texture, its source its own.
17367
+ */
17368
+ function destroyWhole(texture) {
17369
+ texture.source.style.removeAllListeners("change");
17370
+ texture.source.removeAllListeners("change");
17371
+ texture.destroy(true);
17372
+ }
17373
+ //#endregion
17359
17374
  //#region src/plugins/renderer/kept/render.ts
17360
17375
  /**
17376
+ * @file renderer/kept — the three stages of one cached view: the subtree picture (stage 1), the pre-pass result of the
17377
+ * first filter with inputs (stage 2), the filter output (stage 3), and the quad that draws it beside the view. Every
17378
+ * render is a public `renderer.render` call made before the stage pass (`host.renderTo`); every texture is the
17379
+ * engine's own, registered with `host.keep` and destroyed explicitly.
17380
+ */
17381
+ /**
17361
17382
  * Tells whether a Pixi module can draw kept pictures: it has render textures and matrices. A stand-in module of the
17362
17383
  * tests without them draws every view live.
17363
17384
  *
@@ -17440,7 +17461,7 @@ function fitTexture(kctx, pixi, current, size, label) {
17440
17461
  */
17441
17462
  function dropTexture(kctx, texture) {
17442
17463
  kctx.host.keep(texture.source, false);
17443
- texture.destroy(true);
17464
+ destroyWhole(texture);
17444
17465
  }
17445
17466
  /**
17446
17467
  * The bytes a record's textures hold now (P6.1).
@@ -18341,7 +18362,7 @@ function destroyRange(range, drop) {
18341
18362
  * @param texture - The texture.
18342
18363
  */
18343
18364
  function destroyTexture$1(texture) {
18344
- texture.destroy(true);
18365
+ destroyWhole(texture);
18345
18366
  }
18346
18367
  /**
18347
18368
  * Destroys every engine object and texture of the cache and empties its collections, while the application still
@@ -18359,7 +18380,7 @@ function stopKept(state) {
18359
18380
  destroyRecord(record, destroyTexture$1);
18360
18381
  }
18361
18382
  for (const range of state.ranges.values()) destroyRange(range, destroyTexture$1);
18362
- state.spare?.destroy(true);
18383
+ if (state.spare !== void 0) destroyWhole(state.spare);
18363
18384
  state.spare = void 0;
18364
18385
  state.records.length = 0;
18365
18386
  state.byEntity.clear();
@@ -26244,6 +26265,20 @@ function renderPassesOf(state, kept) {
26244
26265
  }
26245
26266
  //#endregion
26246
26267
  //#region src/plugins/renderer/sync/warm.ts
26268
+ /**
26269
+ * @file renderer/sync — the pipeline warm-up (F4): invisible probe draws, before the stage pass of a drawn frame, that
26270
+ * create the GPU pipelines a game will need while it loads, instead of in the frame that first needs them. A WebGPU
26271
+ * pipeline is keyed by the bound target's formats and stencil state, so every subject is drawn onto the canvas and into
26272
+ * a texture, each with and without a stencil clip; WebGL compiles one program per shader whatever the target, so one
26273
+ * draw is enough there. The probes hang in a tree of their own, never in the stage. A canvas variant is rendered onto
26274
+ * the canvas without a clear just before the stage pass, which clears the canvas first: nothing shows. A texture variant
26275
+ * is rendered into a small texture the module owns, never through a filter of its own: a filter probe is always the one
26276
+ * filter of its render, so the warm-up never opens a second level of Pixi's filter stack (Pixi 8.21 reads the stale
26277
+ * input texture of that level at its next push, and a pool trim destroys it in between). A probe whose render throws
26278
+ * ends the warm-up of the application: a throw inside Pixi's render leaves its filter stack unbalanced, which no public
26279
+ * API rebalances, so another probe would only throw again. The end of a run reaches the monitor through `onWarm`; this
26280
+ * file never imports the monitor (LEAD-FIXES-3 O24).
26281
+ */
26247
26282
  /** The side of every probe, in CSS pixels: the smallest thing that still draws a triangle. */
26248
26283
  const PROBE_SIZE = 4;
26249
26284
  /** The content subjects the renderer warms itself, in queue order; the text follows once a font is installed. */
@@ -26400,7 +26435,7 @@ function dropObjects(warm) {
26400
26435
  objects.text
26401
26436
  ];
26402
26437
  for (const node of nodes) node?.destroy({ children: true });
26403
- objects.target.destroy(true);
26438
+ destroyWhole(objects.target);
26404
26439
  }
26405
26440
  /**
26406
26441
  * Logs one warning once per key: a probe tree Pixi could not build, or the canvas variants left out.
@@ -28432,9 +28467,7 @@ function destroyTexture(state, texture) {
28432
28467
  texture.destroy(false);
28433
28468
  return;
28434
28469
  }
28435
- texture.source.style.removeAllListeners("change");
28436
- texture.source.removeAllListeners("change");
28437
- texture.destroy(true);
28470
+ destroyWhole(texture);
28438
28471
  }
28439
28472
  //#endregion
28440
28473
  //#region src/plugins/renderer/sync/leave.ts
package/dist/testing.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-DvoCl9R3.mjs";
1
+ import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-CcqRw6N0.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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moku-labs/game",
3
- "version": "0.15.71",
3
+ "version": "0.15.72",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [