vimp-engine 0.14.0 → 0.14.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "vimp-engine-core"
3
- version = "0.8.0"
3
+ version = "0.8.2"
4
4
  edition = "2024"
5
5
  description = "VIMP — движковый каркас симуляции (физика, карта, снапшот-фрейминг, интерполяция/предикт/raycast-примитивы, нав-утилиты). Без wasm-bindgen — обёртки для WASM-ABI собирает game-crate."
6
6
  license = "MIT"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vimp-engine",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "VIMP — движок-приложение (мастер, P2P-транспорт, Worker-хост, мета, MVC-каркас клиента)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,7 +45,7 @@ body.hide-cursor {
45
45
  text-transform: uppercase;
46
46
  background-color: #fff;
47
47
  text-align: center;
48
- font-size: 10px;
48
+ font-size: 16px;
49
49
  line-height: 12px;
50
50
  position: absolute;
51
51
  top: 0;
@@ -31,6 +31,8 @@ export const SNAPSHOT_FORMAT_VERSION = 5;
31
31
  export const HOT_FLAGS = {
32
32
  GAME: 1,
33
33
  CAMERA: 2,
34
+ // «за группами есть хвостовые записи»: свой актор (render_overlay)
35
+ // и/или тела, предсказанные игрой (render_rows)
34
36
  PREDICTED: 4,
35
37
  FRAMES: 8,
36
38
  };
@@ -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));