@colyseus/core 0.18.0 → 0.18.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.
Files changed (125) hide show
  1. package/build/MatchMaker.cjs +3 -7
  2. package/build/MatchMaker.cjs.map +2 -2
  3. package/build/MatchMaker.mjs +4 -8
  4. package/build/MatchMaker.mjs.map +2 -2
  5. package/build/Protocol.cjs +3 -3
  6. package/build/Protocol.cjs.map +1 -1
  7. package/build/Protocol.d.ts +3 -3
  8. package/build/Protocol.mjs +3 -3
  9. package/build/Protocol.mjs.map +1 -1
  10. package/build/Rewind.cjs +385 -0
  11. package/build/Rewind.cjs.map +7 -0
  12. package/build/Rewind.d.ts +291 -0
  13. package/build/Rewind.mjs +359 -0
  14. package/build/Rewind.mjs.map +7 -0
  15. package/build/Room.cjs +280 -281
  16. package/build/Room.cjs.map +3 -3
  17. package/build/Room.d.ts +185 -81
  18. package/build/Room.mjs +286 -286
  19. package/build/Room.mjs.map +2 -2
  20. package/build/RoomMessages.cjs +265 -0
  21. package/build/RoomMessages.cjs.map +7 -0
  22. package/build/RoomMessages.d.ts +49 -0
  23. package/build/RoomMessages.mjs +240 -0
  24. package/build/RoomMessages.mjs.map +7 -0
  25. package/build/Server.cjs +88 -31
  26. package/build/Server.cjs.map +2 -2
  27. package/build/Server.d.ts +36 -0
  28. package/build/Server.mjs +88 -31
  29. package/build/Server.mjs.map +2 -2
  30. package/build/Transport.cjs +26 -0
  31. package/build/Transport.cjs.map +2 -2
  32. package/build/Transport.d.ts +69 -2
  33. package/build/Transport.mjs +25 -0
  34. package/build/Transport.mjs.map +2 -2
  35. package/build/errors/RoomExceptions.cjs +7 -4
  36. package/build/errors/RoomExceptions.cjs.map +2 -2
  37. package/build/errors/RoomExceptions.d.ts +15 -3
  38. package/build/errors/RoomExceptions.mjs +5 -3
  39. package/build/errors/RoomExceptions.mjs.map +2 -2
  40. package/build/index.cjs +19 -2
  41. package/build/index.cjs.map +2 -2
  42. package/build/index.d.ts +7 -4
  43. package/build/index.mjs +17 -4
  44. package/build/index.mjs.map +2 -2
  45. package/build/input/InputBuffer.cjs +439 -16
  46. package/build/input/InputBuffer.cjs.map +2 -2
  47. package/build/input/InputBuffer.d.ts +186 -96
  48. package/build/input/InputBuffer.mjs +436 -15
  49. package/build/input/InputBuffer.mjs.map +2 -2
  50. package/build/input/RoomInput.cjs +306 -0
  51. package/build/input/RoomInput.cjs.map +7 -0
  52. package/build/input/RoomInput.d.ts +91 -0
  53. package/build/input/RoomInput.mjs +287 -0
  54. package/build/input/RoomInput.mjs.map +7 -0
  55. package/build/input/types.cjs +18 -0
  56. package/build/input/types.cjs.map +7 -0
  57. package/build/input/types.d.ts +476 -0
  58. package/build/input/types.mjs +0 -0
  59. package/build/input/types.mjs.map +7 -0
  60. package/build/rooms/QueueRoom.cjs +1 -1
  61. package/build/rooms/QueueRoom.cjs.map +2 -2
  62. package/build/rooms/QueueRoom.mjs +1 -1
  63. package/build/rooms/QueueRoom.mjs.map +2 -2
  64. package/build/router/default_routes.cjs +4 -1
  65. package/build/router/default_routes.cjs.map +2 -2
  66. package/build/router/default_routes.mjs +4 -1
  67. package/build/router/default_routes.mjs.map +2 -2
  68. package/build/router/index.cjs +6 -1
  69. package/build/router/index.cjs.map +2 -2
  70. package/build/router/index.mjs +6 -1
  71. package/build/router/index.mjs.map +2 -2
  72. package/build/router/node.cjs +37 -2
  73. package/build/router/node.cjs.map +2 -2
  74. package/build/router/node.d.ts +10 -0
  75. package/build/router/node.mjs +35 -1
  76. package/build/router/node.mjs.map +2 -2
  77. package/build/serializer/NoneSerializer.cjs +2 -2
  78. package/build/serializer/NoneSerializer.cjs.map +2 -2
  79. package/build/serializer/NoneSerializer.d.ts +3 -3
  80. package/build/serializer/NoneSerializer.mjs +2 -2
  81. package/build/serializer/NoneSerializer.mjs.map +2 -2
  82. package/build/serializer/SchemaSerializer.cjs +44 -14
  83. package/build/serializer/SchemaSerializer.cjs.map +2 -2
  84. package/build/serializer/SchemaSerializer.d.ts +3 -3
  85. package/build/serializer/SchemaSerializer.mjs +46 -16
  86. package/build/serializer/SchemaSerializer.mjs.map +2 -2
  87. package/build/serializer/Serializer.cjs.map +1 -1
  88. package/build/serializer/Serializer.d.ts +12 -2
  89. package/build/utils/DevMode.cjs +14 -14
  90. package/build/utils/DevMode.cjs.map +2 -2
  91. package/build/utils/DevMode.d.ts +0 -2
  92. package/build/utils/DevMode.mjs +14 -12
  93. package/build/utils/DevMode.mjs.map +2 -2
  94. package/build/utils/Env.cjs +8 -4
  95. package/build/utils/Env.cjs.map +3 -3
  96. package/build/utils/Env.mjs +8 -4
  97. package/build/utils/Env.mjs.map +2 -2
  98. package/build/utils/Utils.cjs +3 -0
  99. package/build/utils/Utils.cjs.map +2 -2
  100. package/build/utils/Utils.d.ts +8 -0
  101. package/build/utils/Utils.mjs +2 -0
  102. package/build/utils/Utils.mjs.map +2 -2
  103. package/package.json +11 -11
  104. package/src/MatchMaker.ts +7 -9
  105. package/src/Protocol.ts +3 -3
  106. package/src/Rewind.ts +572 -0
  107. package/src/Room.ts +409 -448
  108. package/src/RoomMessages.ts +342 -0
  109. package/src/Server.ts +112 -38
  110. package/src/Transport.ts +97 -2
  111. package/src/errors/RoomExceptions.ts +18 -4
  112. package/src/index.ts +13 -2
  113. package/src/input/InputBuffer.ts +464 -107
  114. package/src/input/RoomInput.ts +337 -0
  115. package/src/input/types.ts +503 -0
  116. package/src/rooms/QueueRoom.ts +1 -1
  117. package/src/router/default_routes.ts +6 -1
  118. package/src/router/index.ts +6 -1
  119. package/src/router/node.ts +44 -0
  120. package/src/serializer/NoneSerializer.ts +3 -3
  121. package/src/serializer/SchemaSerializer.ts +110 -19
  122. package/src/serializer/Serializer.ts +13 -2
  123. package/src/utils/DevMode.ts +18 -13
  124. package/src/utils/Env.ts +12 -4
  125. package/src/utils/Utils.ts +9 -0
@@ -1,134 +1,224 @@
1
1
  import type { ClientPrivate } from '../Transport.ts';
2
+ import type { ConsumeOptions, IdleInput, InputAccessor, SanitizeInput } from './types.ts';
2
3
  /**
3
- * Names of fields on `I` whose values are `number` — used by
4
- * `Room.defineInput()` to constrain `seqField` to actually-numeric fields
5
- * on the input schema. Filters out booleans, strings, methods, etc.
4
+ * @internal Validate a `subSteps` count. Throws on a fractional/non-positive
5
+ * value: both sides loop `subSteps` times at `dt/subSteps`, so anything but a
6
+ * whole number is a determinism bug, not a tunable. Shared by `defineInput`
7
+ * and `setFixedTimestep`.
6
8
  */
7
- export type NumericFieldsOf<I> = {
8
- [K in keyof I]: I[K] extends number ? (K extends string ? K : never) : never;
9
- }[keyof I];
9
+ export declare function validateSubSteps(subSteps: number | undefined, source: string): number | undefined;
10
10
  /**
11
- * Internal: input configuration captured by `Room.defineInput()`. The schema
12
- * constructor is stored here so the runtime doesn't need to know it through
13
- * the public `room.input` (which is now a callable accessor).
14
- *
15
- * @internal
11
+ * @internal Compile a {@link SanitizeInput} spec into the per-frame function the
12
+ * decode path applies. The map form precompiles to dense min/max arrays walked
13
+ * with the NaN-safe branch clamp; the callback form passes through.
16
14
  */
17
- export interface InputOptions {
15
+ export declare function compileSanitizer<I>(spec: SanitizeInput<I>): (input: I) => void;
16
+ /** @internal */
17
+ export declare class InputBufferImpl<I = any> {
18
+ /** Pending snapshots, indexed `[_head, _items.length)`. Consumed inputs are
19
+ * NOT spliced off per-read — `_head` advances and the prefix is reclaimed in
20
+ * bulk by {@link compact} (a `shift()` per read is O(n), so a burst would be
21
+ * O(n²)). `_renderTimes`/`_reckonTimes` stay parallel to `_items`. */
22
+ private _items;
23
+ /** Read cursor: index of the oldest UNCONSUMED input (== `_items.length` when empty). */
24
+ private _head;
25
+ private _lastSeq;
26
+ private readonly _maxSize;
27
+ private readonly _seqField;
18
28
  /**
19
- * Schema constructor used to allocate per-client input instances on join.
20
- * Captured by `defineInput()` from its `type` argument.
21
- *
22
- * Typed loosely (`new () => any`) to sidestep type-identity issues across
23
- * duplicate `@colyseus/schema` installs; the runtime calls
24
- * `instance.clone()` and friends, which match by shape.
29
+ * Cumulative count of inputs CONSUMED from this buffer (via any consume
30
+ * primitive {@link next}/{@link take}/{@link drain}/{@link consume} — plus
31
+ * {@link clear} and overflow). Consumed = "removed from the pending set",
32
+ * whether applied to state or discarded. The server echoes this in the TIMED
33
+ * prefix as the reconciliation ack: how many of the client's inputs are
34
+ * reflected in (or finished influencing) the authoritative state, which lags
35
+ * the receive counter by inputs still buffered. Distinct from
36
+ * `_receivedInputCount` (receive-time, for RTT), which leads the state.
25
37
  */
26
- ctor: new () => any;
38
+ consumedCount: number;
39
+ /** Render times parallel to `_items` (server-clock ms; `0` when unset). */
40
+ private _renderTimes;
41
+ /** Render time of the most recently drained input (see {@link renderTime}). */
42
+ private _lastRenderTime;
43
+ /** Reckon-display stamps parallel to `_items` — the client's serverNow
44
+ * estimate at input-sample time, i.e. the instant its forward-reckoned
45
+ * entities were displayed at (server-clock ms; `0` when unset). */
46
+ private _reckonTimes;
47
+ /** Reckon stamp of the most recently consumed input (see {@link reckonTime}). */
48
+ private _lastReckonTime;
49
+ /** Framework wire seq per buffered input (parallel to `_items`) — UNRELIABLE
50
+ * ONLY, lazily created on the first seq-carrying push. Reliable inputs are
51
+ * contiguous, so their consumed-seq-value is always exactly {@link consumedCount}
52
+ * and needs no parallel array; `undefined` here marks that (the common, default
53
+ * path pays nothing). A buffer is single-mode, so this is either never created
54
+ * (reliable) or created once and kept parallel (unreliable). */
55
+ private _seqs?;
56
+ /** Seq VALUE of the last consumed input — the reconciliation ack echoed to the
57
+ * client (see {@link ackSeq}). Only meaningful when {@link _seqs} is tracked
58
+ * (unreliable); reliable's ack falls back to {@link consumedCount}. */
59
+ private _lastConsumedSeq;
60
+ /** Whether the most recently produced frame was a synthesized idle (see {@link wasIdle}). */
61
+ private _lastWasIdle;
62
+ /** Reused {@link consume} iterator (lazily minted) + its per-call state, so a
63
+ * per-tick loop allocates no generator frame. `_iterRemaining` snapshots the
64
+ * COUNT to walk — a count, not an index: mid-pass mutations (`next()`/`take()`/
65
+ * `clear()`/compaction) shift indices but can only shorten a count-based pass,
66
+ * never point it past the tail. `_iterIdle` is an optional trailing synthesized
67
+ * frame; `_iterActive` guards against a nested consume() clobbering the shared
68
+ * `_iterRes`. */
69
+ private _iter?;
70
+ private _iterRemaining;
71
+ private _iterActive;
72
+ private _iterIdle?;
73
+ private readonly _iterRes;
74
+ /** Input schema ctor — mints the reused idle frame; idle is off without it. */
75
+ private readonly _ctor?;
76
+ /** Client slice this buffer belongs to (the live object is `Client & ClientPrivate`)
77
+ * — feeds the idle callback's ctx (latest + sessionId). */
78
+ private readonly _client?;
79
+ /** Room-level idle policy (`defineInput({ idle })`) — the bare-call default. */
80
+ private readonly _roomIdle?;
81
+ /** Reused synthesized idle frame + the schema's field names/defaults (lazy). */
82
+ private _idle?;
83
+ private _fieldNames?;
84
+ private _defaults?;
85
+ /** Reused ctx for the idle callback form (see {@link IdleContext}). */
86
+ private readonly _idleCtx;
87
+ constructor(maxSize: number, seqField: string | undefined, ctor?: new () => I, client?: Pick<ClientPrivate, '_input'> & {
88
+ sessionId: string;
89
+ }, idle?: IdleInput<I>);
90
+ /** The effective idle policy for one consume call: per-call `false` suppresses,
91
+ * per-call value overrides, else the room-level default (or none). */
92
+ private effectiveIdle;
93
+ /** Resolve an {@link IdleInput} to overrides — invokes the callback form
94
+ * LAZILY, here at synthesis time (the buffer is known to be empty). */
95
+ private resolveIdle;
27
96
  /**
28
- * Name of a monotonically-increasing numeric field on the input schema used
29
- * to order and dedupe incoming frames. When set, the framework:
30
- * - Drops redundant frames (`input[seqField]` the last-seen value are
31
- * discarded before they enter the buffer). Matches the unreliable-mode
32
- * ring-redundancy pattern out of the box.
33
- * - Powers `room.input(sessionId).at(value)` lookups.
34
- *
35
- * Despite the name, "seq" here is broader than an integer counter — any
36
- * monotonic numeric field works:
37
- * - **Sequence counter** (`"seq"`, `"tick"`, `"frame"`) — typical for
38
- * lockstep / rollback netcode (Photon Quantum, GGPO).
39
- * - **Timestamp** (`"timestamp"`, milliseconds or seconds) — useful for
40
- * variable-rate clients, lag compensation, hit registration (Unreal CMC
41
- * uses float-seconds timestamps via `FSavedMove_Character.TimeStamp`).
42
- *
43
- * Whichever you use, the field must increase monotonically across frames
44
- * for dedupe to work.
97
+ * The synthesized "no input this tick" frame: schema defaults overlaid with
98
+ * `overrides` (`true` = none). Copies BY FIELD NAME from the schema metadata —
99
+ * schema fields are prototype accessors (no own props), so `Object.assign`
100
+ * can't source from a schema instance; the name walk reads getters, letting
101
+ * `overrides` be a plain partial OR a schema instance (e.g. `latest`).
102
+ * ONE reused instance — refilled per call, never advances the ack.
45
103
  */
46
- seqField?: string;
104
+ private idleFrame;
105
+ /** The idle frame to synthesize on an empty tick (room policy or per-call
106
+ * `opts.idle`), or `undefined` when no policy is in effect. Reuses the single
107
+ * idle instance; never advances the ack. Callers set {@link wasIdle}. */
108
+ private idleFrameOnEmpty;
109
+ /** Consume the input at the cursor: advance cursor + ack, stamp THIS input's
110
+ * render/reckon times, clear {@link wasIdle}. The shared per-input step behind
111
+ * {@link next}, {@link consume}'s iterator, and the re-entrant fallback. */
112
+ private stepHead;
113
+ /** Drop ALL slots, reusing the backing arrays' capacity — the zero-GC reset for
114
+ * the consume/next path ({@link compact}/{@link clear}). `drain()` deliberately
115
+ * does NOT use this (it returns an array, so fresh `[]` is faster there). */
116
+ private truncate;
47
117
  /**
48
- * > 0 enables per-client buffering of cloned snapshots required for
49
- * `room.input(sessionId).drain() / .peek() / .at()` to return populated
50
- * data. Oldest drops on overflow. Set to `0` to disable (`.latest` still
51
- * works).
118
+ * Append a decoded input snapshot. `seq` is the framework wire seq (unreliable);
119
+ * omit it for reliable inputs, which get an implicit monotonic receive count so
120
+ * {@link ackSeq} stays well-defined in both modes.
52
121
  */
53
- bufferMaxSize: number;
54
- }
55
- /**
56
- * Per-client input accessor returned by `room.input(sessionId)`. Combines the
57
- * latest decoded instance with the (optional) snapshot ring buffer.
58
- *
59
- * - {@link latest} — the bound Schema instance, mutated in place by the
60
- * decoder. Cheapest read; use when only the most recent state matters.
61
- * - {@link drain} / {@link peek} / {@link at} — populated when
62
- * `defineInput()` was called with `bufferMaxSize > 0` (default 32).
63
- * Use for rollback netcode / lockstep where every frame matters.
64
- *
65
- * Returned for unknown sessionIds and rooms without `defineInput()` is a
66
- * frozen no-op accessor (latest=undefined, drain/peek=[], at=undefined,
67
- * size=0, clear=no-op).
68
- */
69
- export interface InputAccessor<I = any> {
70
- /** Latest decoded input. `undefined` when unknown sessionId or no input declared. */
71
- readonly latest: I | undefined;
122
+ push(snapshot: I, renderTime?: number, reckonTime?: number, seq?: number): void;
123
+ /** Reclaim the consumed prefix `[0, _head)`. Free when fully drained (reuse the
124
+ * arrays); otherwise splice only once the cursor passes {@link COMPACT_THRESHOLD},
125
+ * so the amortized per-input cost stays O(1). */
126
+ private compact;
127
+ /** Returns true if `value` hasn't been seen, and updates the last-seen marker. */
128
+ accept(value: number): boolean;
129
+ drain(opts?: ConsumeOptions<I>): I[];
130
+ /** Consume the single oldest input (ack advances by one); `undefined` if
131
+ * empty or the synthesized idle frame when an idle policy is in effect. */
132
+ next(opts?: ConsumeOptions<I>): I | undefined;
133
+ /** Consume up to `n` oldest inputs (ack advances by the count actually taken). */
134
+ take(n: number): I[];
72
135
  /**
73
- * Find the buffered snapshot whose `[seqField]` equals `value`. The field
74
- * name is the Room's `defineInput()` `seqField`. Linear scan cheap for
75
- * typical buffer sizes; not intended for very large rings. Returns
76
- * `undefined` when no match is buffered (or `seqField` isn't configured).
136
+ * Iterate pending inputs one at a time (per-yield ack + stamp updates), or
137
+ * exactly one synthesized idle frame on an empty buffer with a policy in
138
+ * effect. See {@link InputAccessor.consume}.
77
139
  *
78
- * Useful for tick-aligned retrieval (lockstep, rollback).
140
+ * Returns a POOLED iterator (reused across calls — no generator frame, no
141
+ * per-call allocation) that consumes at most the pending count snapshotted at
142
+ * the call — never past the live tail — plus one optional trailing idle frame.
143
+ * The cursor advances per `next()`, so `break` (which calls `return()`)
144
+ * leaves the rest buffered and compacts. A nested
145
+ * `consume()` of the SAME buffer while one is live falls back to a fresh
146
+ * generator so the pooled `_iterRes` isn't clobbered (nesting is meaningless —
147
+ * both share the cursor — but it must not corrupt).
79
148
  */
80
- at(value: number): I | undefined;
81
- /** Take everything buffered (oldest → newest) and clear. Snapshots are safe to retain. */
82
- drain(): I[];
83
- /** Read everything buffered without consuming. */
84
- peek(): I[];
85
- /** Number of snapshots currently buffered. */
86
- readonly size: number;
87
- /** Drop all buffered snapshots (also resets the dedupe tracker). */
88
- clear(): void;
89
- }
90
- /**
91
- * Callable returned by `Room.defineInput()`. Assign it to `this.input` and
92
- * call `room.input(sessionId)` per tick to read each client's latest input
93
- * and/or buffered snapshots.
94
- */
95
- export type InputAPI<I = any> = (sessionId: string) => InputAccessor<I>;
96
- /** @internal */
97
- export declare class InputBufferImpl<I = any> {
98
- private _items;
99
- private _lastSeq;
100
- private readonly _maxSize;
101
- private readonly _seqField;
102
- constructor(maxSize: number, seqField: string | undefined);
103
- push(snapshot: I): void;
104
- /** Returns true if `value` hasn't been seen, and updates the last-seen marker. */
105
- accept(value: number): boolean;
106
- drain(): I[];
149
+ consume(opts?: ConsumeOptions<I>): IterableIterator<I>;
150
+ [Symbol.iterator](): IterableIterator<I>;
151
+ /** Lazily mint the reused iterator. Closures over `this` so it reads the
152
+ * private cursor directly; one `_iterRes` is reused — read each result before
153
+ * the next `next()`, as `for..of` / spread / `Array.from` all do. */
154
+ private ensureIter;
155
+ /** Re-entrant fallback: a fresh generator for a nested `consume()` of this same
156
+ * buffer (the pooled iterator is single-active). Same accounting + compaction. */
157
+ private consumeGen;
107
158
  peek(): I[];
108
159
  at(value: number): I | undefined;
109
160
  get size(): number;
161
+ /** Render time (server-clock ms) of the most recently drained input; `0`
162
+ * until the first render-time-stamped input is drained. */
163
+ get renderTime(): number;
164
+ /** Reckon-display stamp of the most recently consumed input — the client's
165
+ * serverNow estimate when it sampled that input, i.e. the EXACT instant its
166
+ * forward-reckoned entities were displayed at. Same consume semantics as
167
+ * {@link renderTime}. RAW: stays `0` until stamped — the resolved,
168
+ * always-usable value is the accessor's `reckonTime`
169
+ * (`room.inputs.get(sid)`); `rewind.lastSeenBy()`'s midpoint-reconstruction
170
+ * fallback depends on this raw `0`. */
171
+ get reckonTime(): number;
172
+ /** Seq VALUE of the last consumed input — the reconciliation ack sent to the
173
+ * client. Reliable (no wire seq tracked): falls back to {@link consumedCount}
174
+ * for free. Unreliable: the framework wire seq, so a fully-dropped input doesn't
175
+ * make the ack lag the client's sent seq by the lost count. `0` before the first
176
+ * consume. */
177
+ get ackSeq(): number;
178
+ /** Whether the most recently produced frame was a synthesized idle (see {@link wasIdle}). */
179
+ get wasIdle(): boolean;
110
180
  clear(): void;
111
181
  }
112
182
  /**
113
183
  * Default per-client accessor. Reads `_input` and `_inputBuffer` off the
114
184
  * client at access time — both are nullable until the room declares input
115
185
  * via `defineInput()`. Cached as `client._inputAccessor` at join, so
116
- * `room.input(sessionId)` is a Map lookup + property read.
186
+ * `room.inputs.get(sessionId)` is a Map lookup + property read.
117
187
  *
118
188
  * @internal
119
189
  */
120
190
  export declare class InputAccessorImpl<I = any> implements InputAccessor<I> {
121
191
  private _client;
122
- constructor(client: ClientPrivate);
192
+ /** Current room time (`clock.elapsedTime`) — resolves the {@link reckonTime}
193
+ * fallback. Threaded by `RoomInput.allocate()`; optional so bare
194
+ * constructions (tests) keep the raw 0. */
195
+ private _nowOf?;
196
+ constructor(client: ClientPrivate, nowOf?: () => number);
123
197
  get latest(): I | undefined;
124
198
  at(value: number): I | undefined;
125
- drain(): I[];
199
+ consume(opts?: ConsumeOptions<I>): IterableIterator<I>;
200
+ [Symbol.iterator](): IterableIterator<I>;
201
+ drain(opts?: ConsumeOptions<I>): I[];
202
+ next(): I | undefined;
203
+ next(opts: {
204
+ idle: IdleInput<I>;
205
+ }): I;
206
+ take(n: number): I[];
126
207
  peek(): I[];
127
208
  get size(): number;
209
+ get consumedCount(): number;
210
+ get wasIdle(): boolean;
128
211
  clear(): void;
212
+ get renderTime(): number;
213
+ /** @internal RAW reckon stamp (0 until stamped). The rewind binding reads
214
+ * THIS, not the resolved getter below: `Rewind._aim`'s midpoint fallback
215
+ * must still see 0 for unstamped clients (a resolved value would silently
216
+ * take the direct-stamp clamp path). */
217
+ get rawReckonTime(): number;
218
+ get reckonTime(): number;
129
219
  }
130
220
  /**
131
- * Returned by `room.input(sessionId)` for unknown sessions and for rooms
221
+ * Returned by `room.inputs.get(sessionId)` for unknown sessions and for rooms
132
222
  * that didn't call `defineInput()`.
133
223
  *
134
224
  * @internal