@series-inc/rundot-syncplay 5.23.0-beta.7
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/README.md +610 -0
- package/dist/animation.d.ts +119 -0
- package/dist/animation.js +488 -0
- package/dist/asset-cooking.d.ts +82 -0
- package/dist/asset-cooking.js +364 -0
- package/dist/authority-room.d.ts +217 -0
- package/dist/authority-room.js +701 -0
- package/dist/bot-documents.d.ts +115 -0
- package/dist/bot-documents.js +549 -0
- package/dist/bot-primitives.d.ts +152 -0
- package/dist/bot-primitives.js +472 -0
- package/dist/browser.d.ts +57 -0
- package/dist/browser.js +53 -0
- package/dist/canonical.d.ts +12 -0
- package/dist/canonical.js +288 -0
- package/dist/certification.d.ts +455 -0
- package/dist/certification.js +1855 -0
- package/dist/chaos-certification.d.ts +56 -0
- package/dist/chaos-certification.js +1397 -0
- package/dist/cjs/animation.js +495 -0
- package/dist/cjs/asset-cooking.js +372 -0
- package/dist/cjs/authority-room.js +704 -0
- package/dist/cjs/bot-documents.js +556 -0
- package/dist/cjs/bot-primitives.js +482 -0
- package/dist/cjs/browser.js +96 -0
- package/dist/cjs/canonical.js +299 -0
- package/dist/cjs/certification.js +1860 -0
- package/dist/cjs/chaos-certification.js +1402 -0
- package/dist/cjs/collections.js +36 -0
- package/dist/cjs/collision.js +96 -0
- package/dist/cjs/commands.js +987 -0
- package/dist/cjs/config-bundle.js +491 -0
- package/dist/cjs/creator.js +30 -0
- package/dist/cjs/deterministic-primitives.js +134 -0
- package/dist/cjs/deterministic-session.js +1410 -0
- package/dist/cjs/ecs-lite.js +155 -0
- package/dist/cjs/effects-adapter.js +97 -0
- package/dist/cjs/engine-complete.js +2297 -0
- package/dist/cjs/engine-core-proof.js +70 -0
- package/dist/cjs/engine-parity-matrix.js +874 -0
- package/dist/cjs/engine-parity.js +3183 -0
- package/dist/cjs/engine-runtime.js +3141 -0
- package/dist/cjs/errors.js +22 -0
- package/dist/cjs/events.js +247 -0
- package/dist/cjs/examples/counter-duel.js +157 -0
- package/dist/cjs/examples/fixed-arena.js +368 -0
- package/dist/cjs/index.js +229 -0
- package/dist/cjs/input-authority.js +150 -0
- package/dist/cjs/input-button.js +256 -0
- package/dist/cjs/input-timeline.js +418 -0
- package/dist/cjs/instant-replay.js +66 -0
- package/dist/cjs/lag-compensation3d.js +837 -0
- package/dist/cjs/local-authority-server-runner.js +1121 -0
- package/dist/cjs/local-authority-wire.js +1497 -0
- package/dist/cjs/local-authority.js +817 -0
- package/dist/cjs/local-ws-adapter.js +150 -0
- package/dist/cjs/match-log.js +61 -0
- package/dist/cjs/math.js +157 -0
- package/dist/cjs/mock-network-adapter.js +26 -0
- package/dist/cjs/movement.js +703 -0
- package/dist/cjs/movement3d.js +1246 -0
- package/dist/cjs/multiclient-authority.js +308 -0
- package/dist/cjs/multiplayer-service.js +434 -0
- package/dist/cjs/navigation.js +347 -0
- package/dist/cjs/navmesh.js +1437 -0
- package/dist/cjs/networked-client.js +691 -0
- package/dist/cjs/networked-input-authority.js +443 -0
- package/dist/cjs/node.js +47 -0
- package/dist/cjs/number-lab.js +78 -0
- package/dist/cjs/offline-session.js +370 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/pause-resume.js +43 -0
- package/dist/cjs/physics-cert.js +426 -0
- package/dist/cjs/physics2d.js +751 -0
- package/dist/cjs/physics3d.js +1996 -0
- package/dist/cjs/prediction-culling.js +203 -0
- package/dist/cjs/protocol-lab.js +1299 -0
- package/dist/cjs/r3f-render-adapter.js +209 -0
- package/dist/cjs/random.js +59 -0
- package/dist/cjs/replay-bundle.js +1598 -0
- package/dist/cjs/replay-inspect.js +236 -0
- package/dist/cjs/replay-scoring.js +68 -0
- package/dist/cjs/replay.js +356 -0
- package/dist/cjs/reports.js +181 -0
- package/dist/cjs/rollback-history.js +251 -0
- package/dist/cjs/runtime-guards.js +111 -0
- package/dist/cjs/sample-lab.js +145 -0
- package/dist/cjs/sample-scenes.js +752 -0
- package/dist/cjs/schema-artifacts.js +359 -0
- package/dist/cjs/schema-codegen.js +544 -0
- package/dist/cjs/schema-dsl-binary.js +655 -0
- package/dist/cjs/schema.js +319 -0
- package/dist/cjs/sdk-offline.js +99 -0
- package/dist/cjs/session-promotion.js +74 -0
- package/dist/cjs/session-snapshot.js +265 -0
- package/dist/cjs/session-wire.js +216 -0
- package/dist/cjs/signals.js +103 -0
- package/dist/cjs/sparse-set.js +169 -0
- package/dist/cjs/synctest.js +136 -0
- package/dist/cjs/system-lifecycle.js +286 -0
- package/dist/cjs/timers.js +61 -0
- package/dist/cjs/tools/static-checker.js +1468 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/venus-mp-budget.js +125 -0
- package/dist/cjs/ws-frame.js +255 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +11379 -0
- package/dist/collections.d.ts +9 -0
- package/dist/collections.js +30 -0
- package/dist/collision.d.ts +25 -0
- package/dist/collision.js +85 -0
- package/dist/commands.d.ts +137 -0
- package/dist/commands.js +977 -0
- package/dist/config-bundle.d.ts +89 -0
- package/dist/config-bundle.js +483 -0
- package/dist/creator.d.ts +20 -0
- package/dist/creator.js +11 -0
- package/dist/deterministic-primitives.d.ts +59 -0
- package/dist/deterministic-primitives.js +126 -0
- package/dist/deterministic-session.d.ts +197 -0
- package/dist/deterministic-session.js +1401 -0
- package/dist/ecs-lite.d.ts +26 -0
- package/dist/ecs-lite.js +152 -0
- package/dist/effects-adapter.d.ts +21 -0
- package/dist/effects-adapter.js +94 -0
- package/dist/engine-complete.d.ts +45 -0
- package/dist/engine-complete.js +2292 -0
- package/dist/engine-core-proof.d.ts +26 -0
- package/dist/engine-core-proof.js +66 -0
- package/dist/engine-parity-matrix.d.ts +300 -0
- package/dist/engine-parity-matrix.js +869 -0
- package/dist/engine-parity.d.ts +74 -0
- package/dist/engine-parity.js +3178 -0
- package/dist/engine-runtime.d.ts +351 -0
- package/dist/engine-runtime.js +3123 -0
- package/dist/errors.d.ts +11 -0
- package/dist/errors.js +17 -0
- package/dist/events.d.ts +45 -0
- package/dist/events.js +242 -0
- package/dist/examples/counter-duel.d.ts +43 -0
- package/dist/examples/counter-duel.js +150 -0
- package/dist/examples/fixed-arena.d.ts +110 -0
- package/dist/examples/fixed-arena.js +356 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js +66 -0
- package/dist/input-authority.d.ts +82 -0
- package/dist/input-authority.js +147 -0
- package/dist/input-button.d.ts +36 -0
- package/dist/input-button.js +249 -0
- package/dist/input-timeline.d.ts +65 -0
- package/dist/input-timeline.js +412 -0
- package/dist/instant-replay.d.ts +59 -0
- package/dist/instant-replay.js +62 -0
- package/dist/lag-compensation3d.d.ts +146 -0
- package/dist/lag-compensation3d.js +827 -0
- package/dist/local-authority-server-runner.d.ts +79 -0
- package/dist/local-authority-server-runner.js +1118 -0
- package/dist/local-authority-wire.d.ts +142 -0
- package/dist/local-authority-wire.js +1477 -0
- package/dist/local-authority.d.ts +160 -0
- package/dist/local-authority.js +810 -0
- package/dist/local-ws-adapter.d.ts +14 -0
- package/dist/local-ws-adapter.js +146 -0
- package/dist/match-log.d.ts +74 -0
- package/dist/match-log.js +57 -0
- package/dist/math.d.ts +41 -0
- package/dist/math.js +154 -0
- package/dist/mock-network-adapter.d.ts +13 -0
- package/dist/mock-network-adapter.js +23 -0
- package/dist/movement.d.ts +155 -0
- package/dist/movement.js +694 -0
- package/dist/movement3d.d.ts +195 -0
- package/dist/movement3d.js +1238 -0
- package/dist/multiclient-authority.d.ts +30 -0
- package/dist/multiclient-authority.js +305 -0
- package/dist/multiplayer-service.d.ts +153 -0
- package/dist/multiplayer-service.js +429 -0
- package/dist/navigation.d.ts +91 -0
- package/dist/navigation.js +338 -0
- package/dist/navmesh.d.ts +236 -0
- package/dist/navmesh.js +1423 -0
- package/dist/networked-client.d.ts +124 -0
- package/dist/networked-client.js +688 -0
- package/dist/networked-input-authority.d.ts +51 -0
- package/dist/networked-input-authority.js +439 -0
- package/dist/node.d.ts +22 -0
- package/dist/node.js +19 -0
- package/dist/number-lab.d.ts +15 -0
- package/dist/number-lab.js +75 -0
- package/dist/offline-session.d.ts +2 -0
- package/dist/offline-session.js +367 -0
- package/dist/pause-resume.d.ts +48 -0
- package/dist/pause-resume.js +40 -0
- package/dist/physics-cert.d.ts +40 -0
- package/dist/physics-cert.js +389 -0
- package/dist/physics2d.d.ts +142 -0
- package/dist/physics2d.js +741 -0
- package/dist/physics3d.d.ts +285 -0
- package/dist/physics3d.js +1979 -0
- package/dist/prediction-culling.d.ts +34 -0
- package/dist/prediction-culling.js +200 -0
- package/dist/protocol-lab.d.ts +115 -0
- package/dist/protocol-lab.js +1295 -0
- package/dist/r3f-render-adapter.d.ts +61 -0
- package/dist/r3f-render-adapter.js +203 -0
- package/dist/random.d.ts +13 -0
- package/dist/random.js +55 -0
- package/dist/replay-bundle.d.ts +150 -0
- package/dist/replay-bundle.js +1586 -0
- package/dist/replay-inspect.d.ts +60 -0
- package/dist/replay-inspect.js +228 -0
- package/dist/replay-scoring.d.ts +28 -0
- package/dist/replay-scoring.js +65 -0
- package/dist/replay.d.ts +17 -0
- package/dist/replay.js +351 -0
- package/dist/reports.d.ts +176 -0
- package/dist/reports.js +174 -0
- package/dist/rollback-history.d.ts +46 -0
- package/dist/rollback-history.js +247 -0
- package/dist/runtime-guards.d.ts +1 -0
- package/dist/runtime-guards.js +108 -0
- package/dist/sample-lab.d.ts +32 -0
- package/dist/sample-lab.js +134 -0
- package/dist/sample-scenes.d.ts +86 -0
- package/dist/sample-scenes.js +745 -0
- package/dist/schema-artifacts.d.ts +49 -0
- package/dist/schema-artifacts.js +356 -0
- package/dist/schema-codegen.d.ts +21 -0
- package/dist/schema-codegen.js +538 -0
- package/dist/schema-dsl-binary.d.ts +75 -0
- package/dist/schema-dsl-binary.js +648 -0
- package/dist/schema.d.ts +87 -0
- package/dist/schema.js +315 -0
- package/dist/sdk-offline.d.ts +34 -0
- package/dist/sdk-offline.js +96 -0
- package/dist/session-promotion.d.ts +26 -0
- package/dist/session-promotion.js +70 -0
- package/dist/session-snapshot.d.ts +95 -0
- package/dist/session-snapshot.js +255 -0
- package/dist/session-wire.d.ts +89 -0
- package/dist/session-wire.js +211 -0
- package/dist/signals.d.ts +31 -0
- package/dist/signals.js +99 -0
- package/dist/sparse-set.d.ts +34 -0
- package/dist/sparse-set.js +165 -0
- package/dist/synctest.d.ts +31 -0
- package/dist/synctest.js +133 -0
- package/dist/system-lifecycle.d.ts +72 -0
- package/dist/system-lifecycle.js +281 -0
- package/dist/timers.d.ts +17 -0
- package/dist/timers.js +53 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/static-checker.d.ts +31 -0
- package/dist/tools/static-checker.js +1462 -0
- package/dist/tools/vite-plugin.d.ts +69 -0
- package/dist/tools/vite-plugin.js +203 -0
- package/dist/types.d.ts +148 -0
- package/dist/types.js +1 -0
- package/dist/venus-mp-budget.d.ts +29 -0
- package/dist/venus-mp-budget.js +122 -0
- package/dist/ws-frame.d.ts +49 -0
- package/dist/ws-frame.js +247 -0
- package/package.json +169 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runPredictionCullingLab = runPredictionCullingLab;
|
|
4
|
+
const canonical_js_1 = require("./canonical.js");
|
|
5
|
+
function runPredictionCullingLab(options) {
|
|
6
|
+
validateOptions(options);
|
|
7
|
+
const objects = createObjects(options);
|
|
8
|
+
let previousPredicted = new Set();
|
|
9
|
+
let predictedTotal = 0;
|
|
10
|
+
let minPredictedObjects = Number.POSITIVE_INFINITY;
|
|
11
|
+
let maxPredictedObjects = 0;
|
|
12
|
+
let visibleCorrections = 0;
|
|
13
|
+
let hiddenAuthoritativeInteractions = 0;
|
|
14
|
+
let predictedObjectSteps = 0;
|
|
15
|
+
let verifiedObjectSteps = 0;
|
|
16
|
+
let predictedChecksum = '';
|
|
17
|
+
let verifiedChecksum = '';
|
|
18
|
+
let completeChecksum = '';
|
|
19
|
+
const filterHistory = [];
|
|
20
|
+
const frameHistory = [];
|
|
21
|
+
const restoreFrame = Math.floor(options.frames * 0.6);
|
|
22
|
+
for (let frame = 0; frame < options.frames; frame += 1) {
|
|
23
|
+
const predictedBySlot = [];
|
|
24
|
+
const frameState = [];
|
|
25
|
+
for (const object of objects) {
|
|
26
|
+
frameState.push(getObjectFrameState(object, frame, options.seed));
|
|
27
|
+
}
|
|
28
|
+
frameHistory.push(frameState);
|
|
29
|
+
const localPredicted = new Set();
|
|
30
|
+
for (let slot = 0; slot < options.players; slot += 1) {
|
|
31
|
+
const player = getPlayerPosition(slot, frame, options.seed);
|
|
32
|
+
const slotPredicted = [];
|
|
33
|
+
for (const objectState of frameState) {
|
|
34
|
+
const object = objects[objectState.id];
|
|
35
|
+
if (shouldPredictObject(options.mode, player, object, objectState, options.radius)) {
|
|
36
|
+
slotPredicted.push(objectState.id);
|
|
37
|
+
if (slot === 0) {
|
|
38
|
+
localPredicted.add(objectState.id);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
predictedObjectSteps += slotPredicted.length;
|
|
43
|
+
predictedBySlot.push(slotPredicted);
|
|
44
|
+
}
|
|
45
|
+
for (const objectState of frameState) {
|
|
46
|
+
if (objectState.canAffectPlayer && !localPredicted.has(objectState.id)) {
|
|
47
|
+
hiddenAuthoritativeInteractions += 1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
for (const objectId of localPredicted) {
|
|
51
|
+
if (!previousPredicted.has(objectId) && frame > 0) {
|
|
52
|
+
visibleCorrections += 1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
previousPredicted = localPredicted;
|
|
56
|
+
filterHistory.push(predictedBySlot);
|
|
57
|
+
predictedTotal += localPredicted.size;
|
|
58
|
+
minPredictedObjects = Math.min(minPredictedObjects, localPredicted.size);
|
|
59
|
+
maxPredictedObjects = Math.max(maxPredictedObjects, localPredicted.size);
|
|
60
|
+
predictedChecksum = (0, canonical_js_1.defaultChecksum)({
|
|
61
|
+
frame,
|
|
62
|
+
predictedBySlot,
|
|
63
|
+
previousChecksum: predictedChecksum,
|
|
64
|
+
});
|
|
65
|
+
verifiedObjectSteps += frameState.length;
|
|
66
|
+
verifiedChecksum = (0, canonical_js_1.defaultChecksum)({
|
|
67
|
+
frame,
|
|
68
|
+
objects: frameState,
|
|
69
|
+
previousChecksum: verifiedChecksum,
|
|
70
|
+
});
|
|
71
|
+
completeChecksum = (0, canonical_js_1.defaultChecksum)({
|
|
72
|
+
frame,
|
|
73
|
+
player: getPlayerPosition(0, frame, options.seed),
|
|
74
|
+
objects: frameState,
|
|
75
|
+
previousChecksum: completeChecksum,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const resimulatedChecksum = resimulateVerifiedChecksum(frameHistory, restoreFrame);
|
|
79
|
+
const predictionFilterChecksum = (0, canonical_js_1.defaultChecksum)(filterHistory);
|
|
80
|
+
const culledObjectSteps = options.mode === 'off' ? 0 : verifiedObjectSteps * options.players - predictedObjectSteps;
|
|
81
|
+
return {
|
|
82
|
+
mode: options.mode,
|
|
83
|
+
players: options.players,
|
|
84
|
+
objects: objects.length,
|
|
85
|
+
frames: options.frames,
|
|
86
|
+
seed: options.seed,
|
|
87
|
+
radius: options.radius,
|
|
88
|
+
averagePredictedObjects: (predictedTotal / options.frames).toFixed(2),
|
|
89
|
+
minPredictedObjects,
|
|
90
|
+
maxPredictedObjects,
|
|
91
|
+
visibleCorrections,
|
|
92
|
+
hiddenAuthoritativeInteractions,
|
|
93
|
+
predictedObjectSteps,
|
|
94
|
+
verifiedObjectSteps,
|
|
95
|
+
culledObjectSteps,
|
|
96
|
+
restoreFrame,
|
|
97
|
+
predictedChecksum,
|
|
98
|
+
verifiedChecksum,
|
|
99
|
+
resimulatedChecksum,
|
|
100
|
+
predictionFilterChecksum,
|
|
101
|
+
completeChecksum,
|
|
102
|
+
result: hiddenAuthoritativeInteractions === 0 && verifiedChecksum === resimulatedChecksum ? 'pass' : 'fail',
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function createObjects(options) {
|
|
106
|
+
const objects = [];
|
|
107
|
+
for (let slot = 0; slot < options.players; slot += 1) {
|
|
108
|
+
for (let index = 0; index < options.objectsPerPlayer; index += 1) {
|
|
109
|
+
const id = objects.length;
|
|
110
|
+
objects.push({
|
|
111
|
+
id,
|
|
112
|
+
ownerSlot: slot,
|
|
113
|
+
offsetX: ((index * 37 + options.seed) % 90) - 45,
|
|
114
|
+
offsetY: ((index * 53 + options.seed) % 90) - 45,
|
|
115
|
+
alwaysPredict: index % 17 === 0,
|
|
116
|
+
canAffectPlayer: index % 17 === 0,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (options.includeHiddenThreat === true) {
|
|
121
|
+
objects.push({
|
|
122
|
+
id: objects.length,
|
|
123
|
+
ownerSlot: Math.max(1, options.players - 1),
|
|
124
|
+
offsetX: 10_000,
|
|
125
|
+
offsetY: 10_000,
|
|
126
|
+
alwaysPredict: false,
|
|
127
|
+
canAffectPlayer: true,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return objects;
|
|
131
|
+
}
|
|
132
|
+
function shouldPredictObject(mode, player, object, objectState, radius) {
|
|
133
|
+
if (mode === 'off') {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
if (object.alwaysPredict) {
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
const dx = objectState.x - player.x;
|
|
140
|
+
const dy = objectState.y - player.y;
|
|
141
|
+
return dx * dx + dy * dy <= radius * radius;
|
|
142
|
+
}
|
|
143
|
+
function getPlayerPosition(slot, frame, seed) {
|
|
144
|
+
return {
|
|
145
|
+
x: slot * 100 + ((frame * 3 + seed) % 37),
|
|
146
|
+
y: ((frame * 5 + seed) % 41) - 20,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function getObjectFrameState(object, frame, seed) {
|
|
150
|
+
const owner = getPlayerPosition(object.ownerSlot, frame, seed);
|
|
151
|
+
return {
|
|
152
|
+
id: object.id,
|
|
153
|
+
x: owner.x + object.offsetX + ((frame + object.id) % 7) - 3,
|
|
154
|
+
y: owner.y + object.offsetY + ((frame * 2 + object.id) % 7) - 3,
|
|
155
|
+
active: (frame + object.id) % 29 === 0 ? 0 : 1,
|
|
156
|
+
canAffectPlayer: object.canAffectPlayer,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function validateOptions(options) {
|
|
160
|
+
if (options.mode !== 'off' && options.mode !== 'local-area') {
|
|
161
|
+
throw new Error('prediction culling mode must be off or local-area');
|
|
162
|
+
}
|
|
163
|
+
if (!Number.isInteger(options.players) || options.players < 1 || options.players > 128) {
|
|
164
|
+
throw new Error('prediction culling players must be between 1 and 128');
|
|
165
|
+
}
|
|
166
|
+
if (!Number.isInteger(options.objectsPerPlayer) || options.objectsPerPlayer < 1 || options.objectsPerPlayer > 128) {
|
|
167
|
+
throw new Error('objectsPerPlayer must be between 1 and 128');
|
|
168
|
+
}
|
|
169
|
+
if (!Number.isInteger(options.frames) || options.frames < 1) {
|
|
170
|
+
throw new Error('prediction culling frames must be at least 1');
|
|
171
|
+
}
|
|
172
|
+
if (!Number.isInteger(options.seed)) {
|
|
173
|
+
throw new Error('prediction culling seed must be an integer');
|
|
174
|
+
}
|
|
175
|
+
if (!Number.isInteger(options.radius) || options.radius < 1) {
|
|
176
|
+
throw new Error('prediction culling radius must be a positive integer');
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function resimulateVerifiedChecksum(frameHistory, restoreFrame) {
|
|
180
|
+
let checksum = '';
|
|
181
|
+
for (let frame = 0; frame < frameHistory.length; frame += 1) {
|
|
182
|
+
if (frame === restoreFrame) {
|
|
183
|
+
checksum = resimulateVerifiedChecksumPrefix(frameHistory, frame);
|
|
184
|
+
}
|
|
185
|
+
checksum = (0, canonical_js_1.defaultChecksum)({
|
|
186
|
+
frame,
|
|
187
|
+
objects: frameHistory[frame],
|
|
188
|
+
previousChecksum: checksum,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return checksum;
|
|
192
|
+
}
|
|
193
|
+
function resimulateVerifiedChecksumPrefix(frameHistory, endFrameExclusive) {
|
|
194
|
+
let checksum = '';
|
|
195
|
+
for (let frame = 0; frame < endFrameExclusive; frame += 1) {
|
|
196
|
+
checksum = (0, canonical_js_1.defaultChecksum)({
|
|
197
|
+
frame,
|
|
198
|
+
objects: frameHistory[frame],
|
|
199
|
+
previousChecksum: checksum,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
return checksum;
|
|
203
|
+
}
|