@datamoc/mw_games 0.11.0 → 0.12.0
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/CHANGELOG.md +52 -0
- package/dist/audio/Playable.d.ts +2 -0
- package/dist/audio/Playable.d.ts.map +1 -1
- package/dist/audio/Playable.js.map +1 -1
- package/dist/audio/Sound.d.ts +7 -1
- package/dist/audio/Sound.d.ts.map +1 -1
- package/dist/audio/Sound.js +8 -1
- package/dist/audio/Sound.js.map +1 -1
- package/dist/mw_games.global.js +51 -51
- package/dist/rpg/EventRunner.d.ts +4 -0
- package/dist/rpg/EventRunner.d.ts.map +1 -1
- package/dist/rpg/EventRunner.js +4 -4
- package/dist/rpg/EventRunner.js.map +1 -1
- package/dist/rpg/GridMover.d.ts +6 -0
- package/dist/rpg/GridMover.d.ts.map +1 -1
- package/dist/rpg/GridMover.js +17 -0
- package/dist/rpg/GridMover.js.map +1 -1
- package/dist/rpg/MoveRoute.d.ts +87 -0
- package/dist/rpg/MoveRoute.d.ts.map +1 -0
- package/dist/rpg/MoveRoute.js +110 -0
- package/dist/rpg/MoveRoute.js.map +1 -0
- package/dist/rpg/index.d.ts +2 -0
- package/dist/rpg/index.d.ts.map +1 -1
- package/dist/rpg/index.js +1 -0
- package/dist/rpg/index.js.map +1 -1
- package/dist/two-d/ui/EventDialogue.d.ts.map +1 -1
- package/dist/two-d/ui/EventDialogue.js +7 -1
- package/dist/two-d/ui/EventDialogue.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,58 @@ the public API may still change between minor versions.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.12.0] - 2026-09-14
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `rpg.EventRunner`'s `DialogueRequest` (and `EventCommand`'s `say`/`ask`) gained an optional
|
|
15
|
+
`portrait` field, threaded through to `two-d/ui.messageBoxPresenter` and `MessageBox`'s own
|
|
16
|
+
pre-existing `portrait` support - a portrait-bearing line no longer has to bypass `present`
|
|
17
|
+
and build its own `MessageBox` directly (item 352).
|
|
18
|
+
- `rpg.GridMover.jumpBy` - an instant reposition with no tween and no walk animation, for a
|
|
19
|
+
"jump" move-route step over terrain `moveBy`'s glide has no way to skip.
|
|
20
|
+
- `rpg.MoveRouteRunner`/`MoveRoute`/`MoveRouteStep`/`MoveRouteOptions` - drives any `GridMover`
|
|
21
|
+
through a scripted route (fixed/random/toward/away steps, turn, jump, wait) with `repeat` and
|
|
22
|
+
`skippable` policies, built entirely on `GridMover`'s existing primitives (item 353).
|
|
23
|
+
- `audio.Sound.play(gain, pitch)` - an optional pitch parameter as `HTMLAudioElement.
|
|
24
|
+
playbackRate`. No matching `pan`: a plain `<audio>` element has none to set, the same reason
|
|
25
|
+
`Positional.audioPan` only ever reported a number rather than owning a panner node (item 354).
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `mobile:build` (and everything built on it: `cap:sync`, `cap:add:android`, `desktop:build`,
|
|
30
|
+
`desktop:run`) now passes `--no-compress` to `emit-page.mjs`. Item 349/350's `.gz`/`.br`
|
|
31
|
+
sidecar files, written by default into every build since those items shipped, broke the
|
|
32
|
+
Android/Capacitor asset merge (`Duplicate resources` from AAPT, which treats `game.js` and
|
|
33
|
+
`game.js.gz` as colliding) the first time the full pipeline was actually built and run
|
|
34
|
+
end to end (item 351) - those sidecars were always dead weight for a packaged native app
|
|
35
|
+
with no server to negotiate `Content-Encoding` for, so this drops them at the source rather
|
|
36
|
+
than special-casing the generated `android/` project.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
|
|
40
|
+
- `android/` is no longer `.gitignore`d (item 110's original choice, kept since). The
|
|
41
|
+
Capacitor-scaffolded project's own generated `.gitignore` already excludes build output,
|
|
42
|
+
`local.properties`, and the copied web assets/config that `cap sync` regenerates every
|
|
43
|
+
build - the 53 files it leaves are ordinary scaffold source (manifest, Java, gradle files,
|
|
44
|
+
launcher/splash resources), the same kind of thing worth tracking as any other native
|
|
45
|
+
wrapper customization: this session's own `ignoreAssetsPattern` fix (above) would otherwise
|
|
46
|
+
have been silently lost the next time someone ran `cap add android` fresh.
|
|
47
|
+
- `webpage/assets/0c_framework_architecture.svg` regenerated - it had gone stale since the
|
|
48
|
+
`ai` and `mwl` modules were added to `src/`, so the "generated, never hand-drawn" diagram
|
|
49
|
+
was quietly wrong about the current module list until `npm run webpage:diagrams` was
|
|
50
|
+
actually re-run (item 351's Android/Windows verification pass turned this up while
|
|
51
|
+
double-checking related documentation).
|
|
52
|
+
- `webpage/design/architecture-explorer.html`, the interactive module-graph explorer, was
|
|
53
|
+
regenerated via the archify skill for the same reason: authored once at release 0.4.3, it
|
|
54
|
+
had never been updated and was missing `ai`/`mwl` entirely despite linking to itself as
|
|
55
|
+
"generated straight from src/'s own import graph". Rebuilt with real, verified import-graph
|
|
56
|
+
data for all 15 current modules and a fourth guided view ("mwl as data-authoring backbone").
|
|
57
|
+
- `desktop/README.md` documented only the older, unwired `desktop/webview2` host and never
|
|
58
|
+
mentioned `desktop/MwgDesktopHost` - the one `desktop:build`/`desktop:run` actually build -
|
|
59
|
+
or its `SetVirtualHostNameToFolderMapping` capability. Rewritten to cover both hosts and
|
|
60
|
+
which job each is for.
|
|
61
|
+
|
|
10
62
|
## [0.11.0] - 2026-09-14
|
|
11
63
|
|
|
12
64
|
### Added
|
package/dist/audio/Playable.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface Playable {
|
|
|
10
10
|
currentTime: number;
|
|
11
11
|
volume: number;
|
|
12
12
|
loop: boolean;
|
|
13
|
+
/** speed and pitch together, matching `HTMLAudioElement.playbackRate`; 1 is unchanged */
|
|
14
|
+
playbackRate?: number;
|
|
13
15
|
/** Optional completion hook, matching HTMLAudioElement.onended. Backends without an
|
|
14
16
|
* end event can omit it; single-track Music remains fully usable there. */
|
|
15
17
|
onended?: ((event: Event) => unknown) | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Playable.d.ts","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACxB,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,KAAK,IAAI,IAAI,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd;+EAC2E;IAC3E,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAElD"}
|
|
1
|
+
{"version":3,"file":"Playable.d.ts","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACxB,IAAI,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,KAAK,IAAI,IAAI,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;+EAC2E;IAC3E,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAElD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Playable.js","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Playable.js","sourceRoot":"","sources":["../../src/audio/Playable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAqBhD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACvC,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
package/dist/audio/Sound.d.ts
CHANGED
|
@@ -33,8 +33,14 @@ export declare class Sound {
|
|
|
33
33
|
*
|
|
34
34
|
* @param gain multiplied into the sound's own volume, for a distance-attenuated one-shot
|
|
35
35
|
* (`Positional.SoundSource.playFor`); 1 leaves it at `volume`.
|
|
36
|
+
* @param pitch played back at this rate, matching `HTMLAudioElement.playbackRate` (1 is
|
|
37
|
+
* unchanged, above 1 higher and faster, below 1 lower and slower) - a footstep or a hit
|
|
38
|
+
* that always sounds identical reads as a loop faster than one with a little variance.
|
|
39
|
+
* There is no matching `pan` parameter: a plain `<audio>` element has no pan of its own to
|
|
40
|
+
* set, and `Positional.audioPan` already made the deliberate call to report a number rather
|
|
41
|
+
* than own a panner node a game does not necessarily want - the same reasoning applies here.
|
|
36
42
|
*/
|
|
37
|
-
play(gain?: number): void;
|
|
43
|
+
play(gain?: number, pitch?: number): void;
|
|
38
44
|
stopAll(): void;
|
|
39
45
|
}
|
|
40
46
|
//# sourceMappingURL=Sound.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sound.d.ts","sourceRoot":"","sources":["../../src/audio/Sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG3D,MAAM,WAAW,YAAY;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAC;IAEpC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,KAAK;IACjB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,EAMnD;IAED
|
|
1
|
+
{"version":3,"file":"Sound.d.ts","sourceRoot":"","sources":["../../src/audio/Sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG3D,MAAM,WAAW,YAAY;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,CAAC;IAEpC,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,KAAK;IACjB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,MAAM,EAAE,MAAM,CAAC;IAEf,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,EAMnD;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,IAAI,SAAI,EAAE,KAAK,SAAI,GAAG,IAAI,CAa9B;IAED,OAAO,IAAI,IAAI,CAKd;CACD"}
|
package/dist/audio/Sound.js
CHANGED
|
@@ -28,11 +28,18 @@ export class Sound {
|
|
|
28
28
|
*
|
|
29
29
|
* @param gain multiplied into the sound's own volume, for a distance-attenuated one-shot
|
|
30
30
|
* (`Positional.SoundSource.playFor`); 1 leaves it at `volume`.
|
|
31
|
+
* @param pitch played back at this rate, matching `HTMLAudioElement.playbackRate` (1 is
|
|
32
|
+
* unchanged, above 1 higher and faster, below 1 lower and slower) - a footstep or a hit
|
|
33
|
+
* that always sounds identical reads as a loop faster than one with a little variance.
|
|
34
|
+
* There is no matching `pan` parameter: a plain `<audio>` element has no pan of its own to
|
|
35
|
+
* set, and `Positional.audioPan` already made the deliberate call to report a number rather
|
|
36
|
+
* than own a panner node a game does not necessarily want - the same reasoning applies here.
|
|
31
37
|
*/
|
|
32
|
-
play(gain = 1) {
|
|
38
|
+
play(gain = 1, pitch = 1) {
|
|
33
39
|
const audio = this.pool[this.next];
|
|
34
40
|
this.next = (this.next + 1) % this.pool.length;
|
|
35
41
|
audio.volume = this.volume * gain;
|
|
42
|
+
audio.playbackRate = pitch;
|
|
36
43
|
audio.currentTime = 0;
|
|
37
44
|
// play() can return a Promise that rejects if this reuse interrupts its own prior,
|
|
38
45
|
// still-loading play() (a real browser, not the fakes tests supply) - swallow it the
|
package/dist/audio/Sound.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sound.js","sourceRoot":"","sources":["../../src/audio/Sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAc1C;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,KAAK;IAMjB,YAAY,IAAY,EAAE,OAAO,GAAiB,EAAE;QAJ5C,SAAI,GAAG,CAAC,CAAC;QAKhB,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,OA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