playertwo-sdk 0.2.3 → 0.2.4

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 (2) hide show
  1. package/package.json +1 -1
  2. package/room.d.ts +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playertwo-sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "license": "MIT",
5
5
  "description": "Player Two's game SDK: trophies, leaderboards, saves and multiplayer rooms for games hosted on Player Two, with TypeScript types",
6
6
  "type": "module",
package/room.d.ts CHANGED
@@ -37,6 +37,11 @@ export interface Player {
37
37
  rating?: number;
38
38
  /** Their team, 1 to room.teams, in a room with teams. */
39
39
  team?: number;
40
+ /** Their way to the room and back, in ms, as the room measures it every 2 s (each round trip moving it a quarter of
41
+ the way; from an older page, what it says of itself every 10 s); null until known, within a second of joining. */
42
+ ping: number | null;
43
+ /** How much their round trip varies, in ms (null until known). */
44
+ jitter: number | null;
40
45
  }
41
46
 
42
47
  /** What room.js is handed: the room it runs for. `D` is what you keep in room.data. */