@hytopia.com/server-protocol 1.3.67 → 1.3.69

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.3.67",
3
+ "version": "1.3.69",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -36,6 +36,7 @@ type WrtcTransportConnect = {
36
36
  }
37
37
 
38
38
  export type ConnectionSchema = {
39
+ i?: string; // connection id | server -> client | on initial WS connection
39
40
  c?: WrtcTransportConnect, // wrtc transport connect | client -> server | 2nd wrtc packet
40
41
  ca?: WrtcConnectAck, // wrtc connect ack | server -> client | 3rd wrtc packet
41
42
  d?: WrtcDataChannel[], // wrtc data channels | server <-> client | 1st wrtc packet s->c, 4th wrtc packet c->s
@@ -176,6 +177,7 @@ const wrtcDataChannelSchema: JSONSchemaType<WrtcDataChannel> = {
176
177
  export const connectionSchema: JSONSchemaType<ConnectionSchema> = {
177
178
  type: 'object',
178
179
  properties: {
180
+ i: { type: 'string', nullable: true },
179
181
  c: { ...wrtcTransportConnectSchema, nullable: true },
180
182
  ca: { ...wrtcConnectAckSchema, nullable: true },
181
183
  d: { type: 'array', items: { ...wrtcDataChannelSchema }, nullable: true },
package/schemas/World.ts CHANGED
@@ -11,7 +11,7 @@ export type WorldSchema = {
11
11
  dc?: RgbColorSchema; // directional light color
12
12
  di?: number; // directional light intensity
13
13
  dp?: VectorSchema; // directional light position
14
- f?: boolean; // focused
14
+ j?: boolean; // joined
15
15
  n?: string; // name
16
16
  s?: string; // skyboxUri
17
17
  t?: number; // timestep (seconds)
@@ -26,7 +26,7 @@ export const worldSchema: JSONSchemaType<WorldSchema> = {
26
26
  dc: { ...rgbColorSchema, nullable: true },
27
27
  di: { type: 'number', nullable: true },
28
28
  dp: { ...vectorSchema, nullable: true },
29
- f: { type: 'boolean', nullable: true },
29
+ j: { type: 'boolean', nullable: true },
30
30
  n: { type: 'string', nullable: true },
31
31
  s: { type: 'string', nullable: true },
32
32
  t: { type: 'number', nullable: true },