@hytopia.com/server-protocol 1.4.25 → 1.4.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hytopia.com/server-protocol",
3
- "version": "1.4.25",
3
+ "version": "1.4.28",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -3,7 +3,8 @@ import { JSONSchemaType } from 'ajv';
3
3
  export type ConnectionSchema = {
4
4
  i?: string; // connection id | server -> client | on initial WS connection
5
5
  k?: boolean; // kill connection | server -> client | tells client to close connection & not reconnect
6
- ts?: string; // transport secret | server -> client | used by the client to upgrade to a WebTransport connection
6
+ ts?: string; // transport session token | client -> server | can be sent with 1st webtransport packet to server
7
+ tc?: string; // transport connection id | client -> server | can be sent with 1st webtransport packet to server
7
8
  };
8
9
 
9
10
  export const connectionSchema: JSONSchemaType<ConnectionSchema> = {
@@ -12,6 +13,7 @@ export const connectionSchema: JSONSchemaType<ConnectionSchema> = {
12
13
  i: { type: 'string', nullable: true },
13
14
  k: { type: 'boolean', nullable: true },
14
15
  ts: { type: 'string', nullable: true },
16
+ tc: { type: 'string', nullable: true },
15
17
  },
16
18
  additionalProperties: false,
17
19
  };
package/schemas/Input.ts CHANGED
@@ -38,6 +38,7 @@ export type InputSchema = {
38
38
  mr?: boolean; // mouse right pressed
39
39
  cp?: number; // camera pitch radians
40
40
  cy?: number; // camera yaw radians
41
+ jd?: number; // joystick direction radians
41
42
  sq?: number; // sequence number for UDP inputs
42
43
  }
43
44
 
@@ -81,6 +82,7 @@ export const inputSchema: JSONSchemaType<InputSchema> = {
81
82
  mr: { type: 'boolean', nullable: true },
82
83
  cp: { type: 'number', nullable: true },
83
84
  cy: { type: 'number', nullable: true },
85
+ jd: { type: 'number', nullable: true },
84
86
  sq: { type: 'number', nullable: true },
85
87
  },
86
88
  additionalProperties: false,