vimp-engine 0.14.0 → 0.14.1
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/core/Cargo.toml +1 -1
- package/package.json +1 -1
- package/src/config/opcodes.js +2 -0
- package/src/lib/reconstructHot.js +10 -0
package/core/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "vimp-engine-core"
|
|
3
|
-
version = "0.8.
|
|
3
|
+
version = "0.8.1"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
description = "VIMP — движковый каркас симуляции (физика, карта, снапшот-фрейминг, интерполяция/предикт/raycast-примитивы, нав-утилиты). Без wasm-bindgen — обёртки для WASM-ABI собирает game-crate."
|
|
6
6
|
license = "MIT"
|
package/package.json
CHANGED
package/src/config/opcodes.js
CHANGED
|
@@ -37,6 +37,16 @@ export function parseHot(hot, snapshotKeysById) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const { key, kind, width } = spec;
|
|
40
|
+
|
|
41
|
+
// запись должна помещаться целиком: усечённая тихо дала бы строку
|
|
42
|
+
// с недостающими полями, а обход уехал бы за конец буфера
|
|
43
|
+
if (i + width > hot.length) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
`hot buffer: record of key id ${hot[i]} needs ${width} floats, ` +
|
|
46
|
+
`${hot.length - i} left`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
const id = kind === 'indexedNoNull8' ? `d${hot[i + 1]}` : hot[i + 1];
|
|
41
51
|
|
|
42
52
|
(game[key] ??= {})[id] = Array.from(hot.subarray(i + 2, i + width));
|