@datamoc/mw_games 0.7.2 → 0.7.4

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.
Files changed (116) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist/board/FogOfWar.d.ts +6 -0
  4. package/dist/board/FogOfWar.d.ts.map +1 -1
  5. package/dist/board/FogOfWar.js +15 -0
  6. package/dist/board/FogOfWar.js.map +1 -1
  7. package/dist/core/ActionJournal.d.ts +36 -0
  8. package/dist/core/ActionJournal.d.ts.map +1 -0
  9. package/dist/core/ActionJournal.js +60 -0
  10. package/dist/core/ActionJournal.js.map +1 -0
  11. package/dist/core/Pathfinding.d.ts +41 -0
  12. package/dist/core/Pathfinding.d.ts.map +1 -0
  13. package/dist/core/Pathfinding.js +86 -0
  14. package/dist/core/Pathfinding.js.map +1 -0
  15. package/dist/core/State.d.ts +59 -0
  16. package/dist/core/State.d.ts.map +1 -0
  17. package/dist/core/State.js +100 -0
  18. package/dist/core/State.js.map +1 -0
  19. package/dist/core/index.d.ts +6 -0
  20. package/dist/core/index.d.ts.map +1 -1
  21. package/dist/core/index.js +3 -0
  22. package/dist/core/index.js.map +1 -1
  23. package/dist/mw_games.global.js +97 -97
  24. package/dist/mwl/hooks.d.ts +3 -2
  25. package/dist/mwl/hooks.d.ts.map +1 -1
  26. package/dist/mwl/hooks.js.map +1 -1
  27. package/dist/mwl/index.d.ts +3 -3
  28. package/dist/mwl/index.d.ts.map +1 -1
  29. package/dist/mwl/index.js +1 -1
  30. package/dist/mwl/index.js.map +1 -1
  31. package/dist/mwl/report.d.ts +17 -1
  32. package/dist/mwl/report.d.ts.map +1 -1
  33. package/dist/mwl/report.js +33 -0
  34. package/dist/mwl/report.js.map +1 -1
  35. package/dist/mwl/runtime.d.ts +46 -1
  36. package/dist/mwl/runtime.d.ts.map +1 -1
  37. package/dist/mwl/runtime.js +237 -19
  38. package/dist/mwl/runtime.js.map +1 -1
  39. package/dist/mwl/schema.d.ts.map +1 -1
  40. package/dist/mwl/schema.js +136 -1
  41. package/dist/mwl/schema.js.map +1 -1
  42. package/dist/roguelike/FieldOfView.d.ts +3 -2
  43. package/dist/roguelike/FieldOfView.d.ts.map +1 -1
  44. package/dist/roguelike/FieldOfView.js +3 -2
  45. package/dist/roguelike/FieldOfView.js.map +1 -1
  46. package/dist/roguelike/Level.d.ts +9 -1
  47. package/dist/roguelike/Level.d.ts.map +1 -1
  48. package/dist/roguelike/Level.js +6 -2
  49. package/dist/roguelike/Level.js.map +1 -1
  50. package/dist/roguelike/MultiTurnBeam.d.ts +70 -0
  51. package/dist/roguelike/MultiTurnBeam.d.ts.map +1 -0
  52. package/dist/roguelike/MultiTurnBeam.js +117 -0
  53. package/dist/roguelike/MultiTurnBeam.js.map +1 -0
  54. package/dist/roguelike/Scheduler.d.ts +5 -1
  55. package/dist/roguelike/Scheduler.d.ts.map +1 -1
  56. package/dist/roguelike/Scheduler.js +10 -3
  57. package/dist/roguelike/Scheduler.js.map +1 -1
  58. package/dist/roguelike/Targeting.d.ts +51 -0
  59. package/dist/roguelike/Targeting.d.ts.map +1 -1
  60. package/dist/roguelike/Targeting.js +87 -2
  61. package/dist/roguelike/Targeting.js.map +1 -1
  62. package/dist/roguelike/index.d.ts +4 -2
  63. package/dist/roguelike/index.d.ts.map +1 -1
  64. package/dist/roguelike/index.js +2 -1
  65. package/dist/roguelike/index.js.map +1 -1
  66. package/dist/rpg/automap.d.ts +4 -0
  67. package/dist/rpg/automap.d.ts.map +1 -1
  68. package/dist/rpg/automap.js +5 -2
  69. package/dist/rpg/automap.js.map +1 -1
  70. package/dist/simulation/Campaign.d.ts +60 -0
  71. package/dist/simulation/Campaign.d.ts.map +1 -0
  72. package/dist/simulation/Campaign.js +85 -0
  73. package/dist/simulation/Campaign.js.map +1 -0
  74. package/dist/simulation/Harness.d.ts +26 -0
  75. package/dist/simulation/Harness.d.ts.map +1 -0
  76. package/dist/simulation/Harness.js +25 -0
  77. package/dist/simulation/Harness.js.map +1 -0
  78. package/dist/simulation/index.d.ts +4 -0
  79. package/dist/simulation/index.d.ts.map +1 -1
  80. package/dist/simulation/index.js +2 -0
  81. package/dist/simulation/index.js.map +1 -1
  82. package/dist/two-d/render/ImageModifiers.d.ts +58 -0
  83. package/dist/two-d/render/ImageModifiers.d.ts.map +1 -0
  84. package/dist/two-d/render/ImageModifiers.js +145 -0
  85. package/dist/two-d/render/ImageModifiers.js.map +1 -0
  86. package/dist/two-d/render/Minimap.d.ts +24 -0
  87. package/dist/two-d/render/Minimap.d.ts.map +1 -1
  88. package/dist/two-d/render/Minimap.js +52 -14
  89. package/dist/two-d/render/Minimap.js.map +1 -1
  90. package/dist/two-d/render/Particles.d.ts +16 -0
  91. package/dist/two-d/render/Particles.d.ts.map +1 -1
  92. package/dist/two-d/render/Particles.js +15 -2
  93. package/dist/two-d/render/Particles.js.map +1 -1
  94. package/dist/two-d/render/index.d.ts +4 -2
  95. package/dist/two-d/render/index.d.ts.map +1 -1
  96. package/dist/two-d/render/index.js +2 -1
  97. package/dist/two-d/render/index.js.map +1 -1
  98. package/dist/two-d/ui/Bar.d.ts +21 -2
  99. package/dist/two-d/ui/Bar.d.ts.map +1 -1
  100. package/dist/two-d/ui/Bar.js +27 -5
  101. package/dist/two-d/ui/Bar.js.map +1 -1
  102. package/dist/two-d/ui/FloatingText.d.ts +42 -1
  103. package/dist/two-d/ui/FloatingText.d.ts.map +1 -1
  104. package/dist/two-d/ui/FloatingText.js +52 -4
  105. package/dist/two-d/ui/FloatingText.js.map +1 -1
  106. package/dist/two-d/ui/FloatingTextStack.d.ts +77 -0
  107. package/dist/two-d/ui/FloatingTextStack.d.ts.map +1 -0
  108. package/dist/two-d/ui/FloatingTextStack.js +99 -0
  109. package/dist/two-d/ui/FloatingTextStack.js.map +1 -0
  110. package/dist/two-d/ui/index.d.ts +3 -1
  111. package/dist/two-d/ui/index.d.ts.map +1 -1
  112. package/dist/two-d/ui/index.js +2 -1
  113. package/dist/two-d/ui/index.js.map +1 -1
  114. package/dist/version.d.ts +1 -1
  115. package/dist/version.js +1 -1
  116. package/package.json +5 -1
@@ -0,0 +1,77 @@
1
+ import { Container } from 'pixi.js';
2
+ import { FloatingText, type FloatingTextOptions } from './FloatingText.ts';
3
+ /**
4
+ * One pop-up the stack knows about: where it was asked to appear, how tall it is, and what it
5
+ * stacks against.
6
+ */
7
+ export interface FloatingTextStackEntry {
8
+ /** pop-ups sharing a key are stacked apart; leave it unset for one that stands alone */
9
+ key?: string | number;
10
+ /** the world point, as asked for - not wherever stacking moved the pop-up to */
11
+ x: number;
12
+ y: number;
13
+ /** the pop-up's own height, measured rather than assumed */
14
+ height: number;
15
+ }
16
+ /**
17
+ * How far a newcomer must move up to clear every live pop-up it shares a key *and* an origin
18
+ * with - the classic "three numbers on one creature in one turn" case.
19
+ *
20
+ * Exported and pure on purpose: the stacking rule is arithmetic, and this way it is checked as
21
+ * arithmetic rather than through a rendered label (`Label` needs a DOM to measure text).
22
+ * Offsets accumulate by measured height, so a taller line clears the one under it rather than
23
+ * overlapping it by a fixed guess.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * import { floatingTextStackOffset } from '@datamoc/mw_games/two-d/ui';
28
+ * console.log(floatingTextStackOffset([{ key: 'hero', x: 1, y: 2, height: 10 }], { key: 'hero', x: 1, y: 2, height: 8 })); // 11
29
+ * ```
30
+ */
31
+ export declare function floatingTextStackOffset(live: readonly FloatingTextStackEntry[], incoming: FloatingTextStackEntry): number;
32
+ export interface FloatingTextPush extends FloatingTextOptions {
33
+ /** where the pop-up belongs, in the stack's own coordinate space */
34
+ x: number;
35
+ y: number;
36
+ /**
37
+ * Pop-ups pushed with the same key and the same origin stack upward instead of
38
+ * overprinting. A pop-up with no key always stands alone.
39
+ */
40
+ key?: string | number;
41
+ }
42
+ /**
43
+ * Owns the pop-ups a game spawns over world points: one `push` per number, one `update(dt)` to
44
+ * drive them all, and no bookkeeping left to the caller.
45
+ *
46
+ * The alternative - every call site constructing, positioning, collecting and destroying its own
47
+ * `FloatingText` - is where the stacking rule gets forgotten and duplicate numbers land on top of
48
+ * each other, which is the whole reason this exists rather than being left to the game.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * import { FloatingTextStack } from '@datamoc/mw_games/two-d/ui';
53
+ * import type { Container2D } from '@datamoc/mw_games/two-d/render';
54
+ *
55
+ * declare const worldLayer: Container2D;
56
+ * declare const hero: { x: number; y: number };
57
+ * declare function update(dt: number): void;
58
+ *
59
+ * const popups = new FloatingTextStack();
60
+ * worldLayer.addChild(popups);
61
+ *
62
+ * popups.push({ text: '-12', x: hero.x, y: hero.y, key: 'hero', color: 0xff4444, hold: 0.5 });
63
+ * popups.update(0.25); // half a second's worth of rise and fade over every live pop-up
64
+ * ```
65
+ */
66
+ export declare class FloatingTextStack extends Container {
67
+ private readonly live;
68
+ /** spawns a pop-up at `options.x`/`options.y`, stacked clear of anything it shares a key with */
69
+ push(options: FloatingTextPush): FloatingText;
70
+ /** drives every live pop-up, then forgets the ones that have finished and removed themselves */
71
+ update(dt: number): void;
72
+ /** how many pop-ups are still alive */
73
+ get count(): number;
74
+ /** drops every live pop-up at once - a scene change, say */
75
+ clear(): void;
76
+ }
77
+ //# sourceMappingURL=FloatingTextStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingTextStack.d.ts","sourceRoot":"","sources":["../../../src/two-d/ui/FloatingTextStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACtC,wFAAwF;IACxF,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEtB,gFAAgF;IAChF,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAEV,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,SAAS,sBAAsB,EAAE,EACvC,QAAQ,EAAE,sBAAsB,GAC9B,MAAM,CAUR;AAED,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC5D,oEAAoE;IACpE,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;IAC/C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqE;IAE1F,iGAAiG;IACjG,IAAI,CAAC,OAAO,EAAE,gBAAgB,GAAG,YAAY,CAsB5C;IAED,gGAAgG;IAChG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAKvB;IAED,uCAAuC;IACvC,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,4DAA4D;IAC5D,KAAK,IAAI,IAAI,CAMZ;CACD"}
@@ -0,0 +1,99 @@
1
+ import { Container } from 'pixi.js';
2
+ import { FloatingText } from './FloatingText.js';
3
+ /**
4
+ * How far a newcomer must move up to clear every live pop-up it shares a key *and* an origin
5
+ * with - the classic "three numbers on one creature in one turn" case.
6
+ *
7
+ * Exported and pure on purpose: the stacking rule is arithmetic, and this way it is checked as
8
+ * arithmetic rather than through a rendered label (`Label` needs a DOM to measure text).
9
+ * Offsets accumulate by measured height, so a taller line clears the one under it rather than
10
+ * overlapping it by a fixed guess.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { floatingTextStackOffset } from '@datamoc/mw_games/two-d/ui';
15
+ * console.log(floatingTextStackOffset([{ key: 'hero', x: 1, y: 2, height: 10 }], { key: 'hero', x: 1, y: 2, height: 8 })); // 11
16
+ * ```
17
+ */
18
+ export function floatingTextStackOffset(live, incoming) {
19
+ if (incoming.key === undefined)
20
+ return 0;
21
+ let lift = 0;
22
+ for (const entry of live) {
23
+ if (entry.key !== incoming.key)
24
+ continue;
25
+ if (entry.x !== incoming.x || entry.y !== incoming.y)
26
+ continue;
27
+ lift += entry.height + 1;
28
+ }
29
+ return lift;
30
+ }
31
+ /**
32
+ * Owns the pop-ups a game spawns over world points: one `push` per number, one `update(dt)` to
33
+ * drive them all, and no bookkeeping left to the caller.
34
+ *
35
+ * The alternative - every call site constructing, positioning, collecting and destroying its own
36
+ * `FloatingText` - is where the stacking rule gets forgotten and duplicate numbers land on top of
37
+ * each other, which is the whole reason this exists rather than being left to the game.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * import { FloatingTextStack } from '@datamoc/mw_games/two-d/ui';
42
+ * import type { Container2D } from '@datamoc/mw_games/two-d/render';
43
+ *
44
+ * declare const worldLayer: Container2D;
45
+ * declare const hero: { x: number; y: number };
46
+ * declare function update(dt: number): void;
47
+ *
48
+ * const popups = new FloatingTextStack();
49
+ * worldLayer.addChild(popups);
50
+ *
51
+ * popups.push({ text: '-12', x: hero.x, y: hero.y, key: 'hero', color: 0xff4444, hold: 0.5 });
52
+ * popups.update(0.25); // half a second's worth of rise and fade over every live pop-up
53
+ * ```
54
+ */
55
+ export class FloatingTextStack extends Container {
56
+ constructor() {
57
+ super(...arguments);
58
+ this.live = [];
59
+ }
60
+ /** spawns a pop-up at `options.x`/`options.y`, stacked clear of anything it shares a key with */
61
+ push(options) {
62
+ const popup = new FloatingText({
63
+ text: options.text,
64
+ color: options.color,
65
+ size: options.size,
66
+ duration: options.duration,
67
+ rise: options.rise,
68
+ hold: options.hold,
69
+ });
70
+ const entry = { key: options.key, x: options.x, y: options.y, height: popup.height };
71
+ popup.position.set(options.x, options.y +
72
+ floatingTextStackOffset(this.live.map((held) => held.entry), entry));
73
+ this.addChild(popup);
74
+ this.live.push({ popup, entry });
75
+ return popup;
76
+ }
77
+ /** drives every live pop-up, then forgets the ones that have finished and removed themselves */
78
+ update(dt) {
79
+ for (const { popup } of this.live)
80
+ popup.update(dt);
81
+ for (let i = this.live.length - 1; i >= 0; i--) {
82
+ if (this.live[i].popup.finished)
83
+ this.live.splice(i, 1);
84
+ }
85
+ }
86
+ /** how many pop-ups are still alive */
87
+ get count() {
88
+ return this.live.length;
89
+ }
90
+ /** drops every live pop-up at once - a scene change, say */
91
+ clear() {
92
+ for (const { popup } of this.live) {
93
+ this.removeChild(popup);
94
+ popup.destroy({ children: true });
95
+ }
96
+ this.live.length = 0;
97
+ }
98
+ }
99
+ //# sourceMappingURL=FloatingTextStack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingTextStack.js","sourceRoot":"","sources":["../../../src/two-d/ui/FloatingTextStack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,YAAY,EAA4B,MAAM,mBAAmB,CAAC;AAkB3E;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,uBAAuB,CACtC,IAAuC,EACvC,QAAgC;IAEhC,IAAI,QAAQ,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO,CAAC,CAAC;IAEzC,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QAC1B,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG;YAAE,SAAS;QACzC,IAAI,KAAK,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,QAAQ,CAAC,CAAC;YAAE,SAAS;QAC/D,IAAI,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAcD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IAAhD;;QACkB,SAAI,GAAkE,EAAE,CAAC;IAgD3F,CAAC;IA9CA,iGAAiG;IAC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AI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC;IACF,CAAC;IAED,uCAAuC;IACvC,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,4DAA4D;IAC5D,KAAK;QACJ,KAAK,MAAM,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACnC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACxB,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACtB,CAAC;CACD"}
@@ -29,8 +29,10 @@ export { Button } from './Button.ts';
29
29
  export type { ButtonOptions, ButtonSkin, ButtonState } from './Button.ts';
30
30
  export { Bar } from './Bar.ts';
31
31
  export type { BarOptions } from './Bar.ts';
32
- export { FloatingText } from './FloatingText.ts';
32
+ export { FloatingText, floatingTextAlpha, floatingTextRise } from './FloatingText.ts';
33
33
  export type { FloatingTextOptions } from './FloatingText.ts';
34
+ export { FloatingTextStack, floatingTextStackOffset } from './FloatingTextStack.ts';
35
+ export type { FloatingTextPush, FloatingTextStackEntry } from './FloatingTextStack.ts';
34
36
  export { Toast } from './Toast.ts';
35
37
  export type { ToastOptions } from './Toast.ts';
36
38
  export { Tooltip } from './Tooltip.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/two-d/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC5F,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EAAE,YAAY,EA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,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAChF,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -14,7 +14,8 @@ export { VerticalLabel, layoutVertical } from './VerticalLabel.js';
14
14
  export { RebindScreen } from './RebindScreen.js';
15
15
  export { Button } from './Button.js';
16
16
  export { Bar } from './Bar.js';
17
- export { FloatingText } from './FloatingText.js';
17
+ export { FloatingText, floatingTextAlpha, floatingTextRise } from './FloatingText.js';
18
+ export { FloatingTextStack, floatingTextStackOffset } from './FloatingTextStack.js';
18
19
  export { Toast } from './Toast.js';
19
20
  export { Tooltip } from './Tooltip.js';
20
21
  export { HelpScreen } from './HelpScreen.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/two-d/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG5F,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGnC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,UAAU,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vC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGhF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
package/dist/version.d.ts CHANGED
@@ -9,5 +9,5 @@
9
9
  * this from `package.json` automatically, chosen because this project's own build already
10
10
  * has no step before `tsc`/`vite` that this would need to run ahead of.
11
11
  */
12
- export declare const version = "0.7.2";
12
+ export declare const version = "0.7.4";
13
13
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -9,5 +9,5 @@
9
9
  * this from `package.json` automatically, chosen because this project's own build already
10
10
  * has no step before `tsc`/`vite` that this would need to run ahead of.
11
11
  */
12
- export const version = '0.7.2';
12
+ export const version = '0.7.4';
13
13
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datamoc/mw_games",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "A local-file game framework: renderer-free game logic, drawn through PixiJS in 2D or Babylon.js in 3D, with mobile and desktop packaging.",
5
5
  "license": "MPL-2.0",
6
6
  "repository": {
@@ -161,6 +161,8 @@
161
161
  "format:check": "prettier --check .",
162
162
  "api:report": "npm run build:pkg && node tools/api-report.mjs",
163
163
  "api:check": "node tools/api-report.mjs --check",
164
+ "stats:write": "node tools/project-stats.mjs",
165
+ "stats:check": "node tools/project-stats.mjs --check",
164
166
  "mwl": "npm run build:pkg && node tools/mwl.mjs",
165
167
  "size:check": "node tools/bundle-size.mjs",
166
168
  "size:update": "node tools/bundle-size.mjs --update",
@@ -188,6 +190,8 @@
188
190
  "example:battle:build": "npm run mwl -- build examples/battle/content -o examples/battle/generated && vite build --config examples/battle/vite.config.ts && node tools/emit-page.mjs examples/battle",
189
191
  "example:minigame": "vite --config examples/minigame/vite.config.ts",
190
192
  "example:minigame:build": "vite build --config examples/minigame/vite.config.ts && node tools/emit-page.mjs examples/minigame",
193
+ "example:multi-turn-beam": "vite --config examples/multi-turn-beam/vite.config.ts",
194
+ "example:multi-turn-beam:build": "vite build --config examples/multi-turn-beam/vite.config.ts && node tools/emit-page.mjs examples/multi-turn-beam",
191
195
  "example:chess": "vite --config examples/chess/vite.config.ts",
192
196
  "example:chess:build": "vite build --config examples/chess/vite.config.ts && node tools/emit-page.mjs examples/chess",
193
197
  "example:tower-defense": "vite --config examples/tower-defense/vite.config.ts",