@hytopia.com/server-protocol 1.0.44 → 1.0.46

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.0.44",
3
+ "version": "1.0.46",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -3,7 +3,7 @@ import type { JSONSchemaType } from 'ajv';
3
3
  import type { ColliderDescSchema } from './ColliderDesc';
4
4
 
5
5
  export type ColliderSchema = {
6
- h: number; // handle
6
+ i: number; // id
7
7
  fs?: boolean; // full state
8
8
  rm?: boolean; // removed/remove
9
9
  } & ColliderDescSchema;
@@ -11,11 +11,11 @@ export type ColliderSchema = {
11
11
  export const colliderSchema: JSONSchemaType<ColliderSchema> = {
12
12
  type: 'object',
13
13
  properties: {
14
- h: { type: 'number', nullable: true },
14
+ i: { type: 'number', nullable: true },
15
15
  fs: { type: 'boolean', nullable: true },
16
16
  rm: { type: 'boolean', nullable: true },
17
17
  ...colliderDescSchema.properties
18
18
  },
19
- required: [ 'h' ],
19
+ required: [ 'i' ],
20
20
  additionalProperties: false,
21
21
  }
@@ -9,6 +9,7 @@ import type { VectorBooleanSchema } from './VectorBoolean';
9
9
  import type { QuaternionSchema } from './Quaternion';
10
10
 
11
11
  export type RigidBodySchema = {
12
+ i: number; // id
12
13
  ad?: number; // angular dampening
13
14
  am?: number; // additional mass
14
15
  as?: number; // additional solver iterations
@@ -20,6 +21,7 @@ export type RigidBodySchema = {
20
21
  en?: boolean; // enabled
21
22
  er?: VectorBooleanSchema; // enabled rotations
22
23
  et?: VectorBooleanSchema; // enabled translations
24
+ fs?: boolean; // full state
23
25
  g?: number; // gravity scaling
24
26
  ld?: number; // linear damping
25
27
  lv?: VectorSchema; // linear velocity
@@ -32,6 +34,7 @@ export type RigidBodySchema = {
32
34
  export const rigidBodySchema: JSONSchemaType<RigidBodySchema> = {
33
35
  type: 'object',
34
36
  properties: {
37
+ i: { type: 'number' },
35
38
  ad: { type: 'number', nullable: true },
36
39
  am: { type: 'number', nullable: true },
37
40
  as: { type: 'number', nullable: true },
@@ -43,6 +46,7 @@ export const rigidBodySchema: JSONSchemaType<RigidBodySchema> = {
43
46
  en: { type: 'boolean', nullable: true },
44
47
  er: { ...vectorBooleanSchema, nullable: true },
45
48
  et: { ...vectorBooleanSchema, nullable: true },
49
+ fs: { type: 'boolean', nullable: true },
46
50
  g: { type: 'number', nullable: true },
47
51
  ld: { type: 'number', nullable: true },
48
52
  lv: { ...vectorSchema, nullable: true },
@@ -51,5 +55,6 @@ export const rigidBodySchema: JSONSchemaType<RigidBodySchema> = {
51
55
  scp: { type: 'number', nullable: true },
52
56
  t: { ...vectorSchema, nullable: true },
53
57
  },
58
+ required: [ 'i' ],
54
59
  additionalProperties: false,
55
60
  }