RoomSession
Defined in: packages/engine/src/gameplay/replication/client.ts:97
What the client holds of its place in the room between messages.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
clock |
RoomClock |
The room’s clock as its answers to her pings measure it. |
correctionMetres |
number |
- |
corrections |
number |
Corrections since the loop last read them, and the largest gap among them in metres. |
edits |
boolean |
Whether the room takes a devtools edit, as its welcome said; false until the welcome. |
hero |
Entity | null |
That hero in this world. |
heroId |
string | null |
The client’s own hero by the id the room’s dump keys her under; null until the welcome. |
moves |
Move[] |
The last keptMoves moves, a ring the move numbered n stands in at n % keptMoves: made once and written in place. |
roomFacing |
object |
- |
roomFacing.armed |
boolean |
False from the start of a turn until the steer is centred again, so one push turns her once and not again for what a reversal has left. |
roomFacing.rotation |
Quaternion |
- |
roomFacing.side |
TurnSide |
- |
roomFacing.target |
Quaternion |
Where a turn on the spot is heading. |
roomFacing.turnSeconds |
number |
Seconds the turn takes end to end; the view paces its clip to this. |
roomFacing.turnSecondsLeft |
number |
Seconds of it left. Above zero the steer is ignored: the feet are coming round and nothing else may move them. |
roomJump |
object |
- |
roomJump.airSeconds |
number |
- |
roomJump.fallSpeed |
number |
- |
roomJump.grounded |
boolean |
- |
roomPosition |
Vector3 |
- |
roomSequence |
number |
The last move the room applied, from its last acknowledgement, and where it left her and how she moved there, on the ground or in the air: from the welcome, then from each delta that changed them. A delta carries only what changed, so a hero the room holds still is not re-sent, and these are what every acknowledgement is checked against. |
roomVelocity |
Vector3 |
- |
sequence |
number |
The number of the latest move begun; 0 before the first. |
snapshotSeconds |
number |
Frame seconds since the last message landed, which the loop counts: how far the streamed entities are drawn toward it. |
stepsIntoMove |
number |
Steps run of that move; 0 once it is whole. |
stretchSeconds |
number |
Seconds the streamed entities take to reach that message: the clock’s interpolation delay as it landed, held to the next, so an answer that changes the delay moves nobody back. |
walkCredit |
WalkCredit |
The walks she may send, counted as the room counts them. |