@driftengine/network 4.8.0 → 4.8.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/dist/lockstep.d.ts +7 -0
- package/dist/lockstep.js +9 -0
- package/package.json +3 -3
- package/src/lockstep.ts +10 -0
package/dist/lockstep.d.ts
CHANGED
|
@@ -129,6 +129,13 @@ export declare class LockstepSession<S> {
|
|
|
129
129
|
get desync(): Desync | null;
|
|
130
130
|
/** The highest tick every participant's real input has arrived for. */
|
|
131
131
|
get confirmed(): number;
|
|
132
|
+
/**
|
|
133
|
+
* How many ticks back the session can rewind: its loop's snapshot ring.
|
|
134
|
+
*
|
|
135
|
+
* The loop stays private, because a caller stepping it beside the session would desynchronise
|
|
136
|
+
* the two; this is the one number a readout wants from it.
|
|
137
|
+
*/
|
|
138
|
+
get rewindDepth(): number;
|
|
132
139
|
/**
|
|
133
140
|
* Publish this peer's input for `tick + inputDelay`, and record it locally at the same tick.
|
|
134
141
|
*
|
package/dist/lockstep.js
CHANGED
|
@@ -101,6 +101,15 @@ export class LockstepSession {
|
|
|
101
101
|
get confirmed() {
|
|
102
102
|
return this.confirmedValue;
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* How many ticks back the session can rewind: its loop's snapshot ring.
|
|
106
|
+
*
|
|
107
|
+
* The loop stays private, because a caller stepping it beside the session would desynchronise
|
|
108
|
+
* the two; this is the one number a readout wants from it.
|
|
109
|
+
*/
|
|
110
|
+
get rewindDepth() {
|
|
111
|
+
return this.loop.depth;
|
|
112
|
+
}
|
|
104
113
|
/**
|
|
105
114
|
* Publish this peer's input for `tick + inputDelay`, and record it locally at the same tick.
|
|
106
115
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driftengine/network",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.2",
|
|
4
4
|
"description": "A transport seam, rewind and replay, lockstep and an authoritative host, on the fixed-step loop",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
],
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@driftengine/entities": "4.8.
|
|
30
|
+
"@driftengine/entities": "4.8.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@driftengine/core": "4.8.
|
|
33
|
+
"@driftengine/core": "4.8.2"
|
|
34
34
|
},
|
|
35
35
|
"author": "Drift Technologies",
|
|
36
36
|
"repository": {
|
package/src/lockstep.ts
CHANGED
|
@@ -171,6 +171,16 @@ export class LockstepSession<S> {
|
|
|
171
171
|
return this.confirmedValue;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
/**
|
|
175
|
+
* How many ticks back the session can rewind: its loop's snapshot ring.
|
|
176
|
+
*
|
|
177
|
+
* The loop stays private, because a caller stepping it beside the session would desynchronise
|
|
178
|
+
* the two; this is the one number a readout wants from it.
|
|
179
|
+
*/
|
|
180
|
+
get rewindDepth(): number {
|
|
181
|
+
return this.loop.depth;
|
|
182
|
+
}
|
|
183
|
+
|
|
174
184
|
/**
|
|
175
185
|
* Publish this peer's input for `tick + inputDelay`, and record it locally at the same tick.
|
|
176
186
|
*
|