@moku-labs/game 0.15.131 → 0.15.132
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/visual.mjs +7 -5
- package/package.json +3 -3
package/dist/visual.mjs
CHANGED
|
@@ -1176,7 +1176,7 @@ function pageOracle(event) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
/**
|
|
1178
1178
|
* Turns on the pixel check of the frames the renderer skips, through the door `game.debug`, and
|
|
1179
|
-
* starts reading the log of the page
|
|
1179
|
+
* starts reading the log of the page after its last line: from here on, `pageMissed` fails a step on the
|
|
1180
1180
|
* first line of the frame oracles or of `pageBroke`. A `pageBroke` line the page logged while it
|
|
1181
1181
|
* loaded, before the check, fails the start.
|
|
1182
1182
|
*
|
|
@@ -1188,7 +1188,7 @@ async function pageVerify(_argument) {
|
|
|
1188
1188
|
const { game, doors } = pageHandles();
|
|
1189
1189
|
await doors.run(game, doors.commands.debug, { verifyFrames: true });
|
|
1190
1190
|
const entries = game.log.trace();
|
|
1191
|
-
Reflect.set(globalThis, "__mokuVisualTrace", entries.
|
|
1191
|
+
Reflect.set(globalThis, "__mokuVisualTrace", { last: entries.at(-1) });
|
|
1192
1192
|
for (const entry of entries) if (pageBroke(entry.event)) return {
|
|
1193
1193
|
ok: false,
|
|
1194
1194
|
reason: `${entry.event} ${JSON.stringify(entry.data)}`
|
|
@@ -1212,10 +1212,12 @@ async function pageVerify(_argument) {
|
|
|
1212
1212
|
* @returns The line, as its event and its data, or `undefined` when none was logged.
|
|
1213
1213
|
*/
|
|
1214
1214
|
function pageMissed(handles) {
|
|
1215
|
-
const
|
|
1216
|
-
if (typeof
|
|
1215
|
+
const mark = Reflect.get(globalThis, "__mokuVisualTrace");
|
|
1216
|
+
if (typeof mark !== "object" || mark === null) return void 0;
|
|
1217
|
+
const read = mark;
|
|
1217
1218
|
const entries = handles.game.log.trace();
|
|
1218
|
-
|
|
1219
|
+
const from = entries.lastIndexOf(read.last) + 1;
|
|
1220
|
+
read.last = entries.at(-1);
|
|
1219
1221
|
for (let at = from; at < entries.length; at += 1) {
|
|
1220
1222
|
const entry = entries[at];
|
|
1221
1223
|
if (entry !== void 0 && (pageOracle(entry.event) || pageBroke(entry.event))) return `${entry.event} ${JSON.stringify(entry.data)}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moku-labs/game",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.132",
|
|
4
4
|
"description": "2D puzzle game engine on TypeScript and PixiJS, built on @moku-labs/core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"yoga-layout": "3.2.1"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
|
-
"@moku-labs/common": "^0.3.
|
|
128
|
+
"@moku-labs/common": "^0.3.12",
|
|
129
129
|
"@moku-labs/core": "^1.7.1",
|
|
130
130
|
"@moku-labs/native": "^0.3.13",
|
|
131
131
|
"@moku-labs/system": "^0.3.1",
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
"@biomejs/biome": "2.4.16",
|
|
161
161
|
"@formatjs/icu-messageformat-parser": "3.5.20",
|
|
162
162
|
"@moku-labs/ci": "1.5.8",
|
|
163
|
-
"@moku-labs/common": "0.3.
|
|
163
|
+
"@moku-labs/common": "0.3.12",
|
|
164
164
|
"@moku-labs/core": "1.7.6",
|
|
165
165
|
"@moku-labs/native": "0.3.15",
|
|
166
166
|
"@moku-labs/system": "0.3.8",
|