@hytopia.com/server-protocol 1.3.49 → 1.3.51

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.49",
3
+ "version": "1.3.51",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/schemas/Audio.ts CHANGED
@@ -5,6 +5,7 @@ import type { VectorSchema } from './Vector';
5
5
  export type AudioSchema = {
6
6
  i: number; // audio id
7
7
  a?: string; // audio uri
8
+ cd?: number; // cutoff distance
8
9
  d?: number; // duration
9
10
  de?: number; // detune
10
11
  di?: number; // distortion (0 to 1, or 1+)
@@ -26,6 +27,7 @@ export const audioSchema: JSONSchemaType<AudioSchema> = {
26
27
  properties: {
27
28
  i: { type: 'number' },
28
29
  a: { type: 'string', nullable: true },
30
+ cd: { type: 'number', nullable: true },
29
31
  d: { type: 'number', nullable: true },
30
32
  de: { type: 'number', nullable: true },
31
33
  di: { type: 'number', minimum: 0, nullable: true },
package/schemas/Entity.ts CHANGED
@@ -23,7 +23,6 @@ export type EntitySchema = {
23
23
  o?: number; // opacity
24
24
  p?: VectorSchema; // position
25
25
  pe?: number; // parent entity id
26
- pi?: string; // player id
27
26
  pn?: string; // parent node name
28
27
  r?: QuaternionSchema; // rotation
29
28
  rm?: boolean; // removed/remove
@@ -48,7 +47,6 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
48
47
  o: { type: 'number', nullable: true },
49
48
  p: { ...vectorSchema, nullable: true },
50
49
  pe: { type: 'number', nullable: true },
51
- pi: { type: 'string', nullable: true },
52
50
  pn: { type: 'string', nullable: true },
53
51
  r: { ...quaternionSchema, nullable: true },
54
52
  rm: { type: 'boolean', nullable: true },
package/schemas/Player.ts CHANGED
@@ -2,18 +2,18 @@ import type { JSONSchemaType } from 'ajv';
2
2
 
3
3
  export type PlayerSchema = {
4
4
  i: string; // player id
5
- u?: string; // username
6
5
  p?: string; // profile picture url
7
6
  rm?: boolean; // removed/left game
7
+ u?: string; // username
8
8
  }
9
9
 
10
10
  export const playerSchema: JSONSchemaType<PlayerSchema> = {
11
11
  type: 'object',
12
12
  properties: {
13
13
  i: { type: 'string' },
14
- u: { type: 'string', nullable: true },
15
14
  p: { type: 'string', nullable: true },
16
15
  rm: { type: 'boolean', nullable: true },
16
+ u: { type: 'string', nullable: true },
17
17
  },
18
18
  required: [ 'i' ],
19
19
  additionalProperties: false,