@moku-labs/game 0.15.68 → 0.15.69

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-DXyZrs7u.mjs";
1
+ import { Ft as audioPlugin, H as platformPlugin, i as screen, m as flattenFeatures, t as createApp, wt as effectsPlugin } from "./src-DvoCl9R3.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-DXyZrs7u.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-DvoCl9R3.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 };
@@ -17325,8 +17325,15 @@ function textureBytes(width, height, resolution) {
17325
17325
  return Math.ceil(width * resolution) * Math.ceil(height * resolution) * TEXEL_BYTES;
17326
17326
  }
17327
17327
  /**
17328
- * Keeps the six numbers of a matrix in `cells` from `at` on, written only when one differs from what they hold: a
17329
- * frame whose transform stands writes nothing. A held NaN always differs, so a fresh row is written.
17328
+ * How far a stored matrix number may lie from the one computed now, relative to its size (at least 1), and still
17329
+ * stand: a quad under a camera zoom is placed through the inverse of its parent's world transform, which rounds
17330
+ * differently in every frame of the zoom by about 1e-13 though the place stands.
17331
+ */
17332
+ const MATRIX_NEAR = 1e-9;
17333
+ /**
17334
+ * Keeps the six numbers of a matrix in `cells` from `at` on, written only when one differs from what they hold by
17335
+ * more than rounding: a frame whose transform stands writes nothing, also under a zoom above it. A held NaN always
17336
+ * differs, so a fresh row is written.
17330
17337
  *
17331
17338
  * @param cells - Where the numbers are kept.
17332
17339
  * @param at - The index of `a`; `b`, `c`, `d`, `tx` and `ty` follow it.
@@ -17338,13 +17345,14 @@ function textureBytes(width, height, resolution) {
17338
17345
  * ```
17339
17346
  */
17340
17347
  function storeMatrix(cells, at, matrix) {
17341
- if (cells[at] === matrix.a && cells[at + 1] === matrix.b && cells[at + 2] === matrix.c && cells[at + 3] === matrix.d && cells[at + 4] === matrix.tx && cells[at + 5] === matrix.ty) return false;
17342
- cells[at] = matrix.a;
17343
- cells[at + 1] = matrix.b;
17344
- cells[at + 2] = matrix.c;
17345
- cells[at + 3] = matrix.d;
17346
- cells[at + 4] = matrix.tx;
17347
- cells[at + 5] = matrix.ty;
17348
+ const { a, b, c, d, tx, ty } = matrix;
17349
+ if (Math.abs((cells[at] ?? NaN) - a) <= MATRIX_NEAR * Math.max(1, Math.abs(a)) && Math.abs((cells[at + 1] ?? NaN) - b) <= MATRIX_NEAR * Math.max(1, Math.abs(b)) && Math.abs((cells[at + 2] ?? NaN) - c) <= MATRIX_NEAR * Math.max(1, Math.abs(c)) && Math.abs((cells[at + 3] ?? NaN) - d) <= MATRIX_NEAR * Math.max(1, Math.abs(d)) && Math.abs((cells[at + 4] ?? NaN) - tx) <= MATRIX_NEAR * Math.max(1, Math.abs(tx)) && Math.abs((cells[at + 5] ?? NaN) - ty) <= MATRIX_NEAR * Math.max(1, Math.abs(ty))) return false;
17350
+ cells[at] = a;
17351
+ cells[at + 1] = b;
17352
+ cells[at + 2] = c;
17353
+ cells[at + 3] = d;
17354
+ cells[at + 4] = tx;
17355
+ cells[at + 5] = ty;
17348
17356
  return true;
17349
17357
  }
17350
17358
  //#endregion
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-DXyZrs7u.mjs";
1
+ import { an as type, en as refuseStart, m as flattenFeatures, nn as exit, t as createApp } from "./src-DvoCl9R3.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.68",
3
+ "version": "0.15.69",
4
4
  "description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
5
5
  "type": "module",
6
6
  "sideEffects": [