@hytopia.com/server-protocol 1.4.3 → 1.4.5

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.3",
3
+ "version": "1.4.5",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/schemas/Camera.ts CHANGED
@@ -9,11 +9,12 @@ export type CameraSchema = {
9
9
  fo?: number // film offset, + value shifts right, - shifts left
10
10
  ffo?: number // first person forward offset, moves camera in (+) or out (-) relative to camera position
11
11
  fv?: number // field of view
12
- h?: string[] // player model parts to hide by partial case insensitive match of gltf node names
12
+ h?: string[] // player model nodes to hide by partial case insensitive match of gltf node names
13
13
  o?: VectorSchema // offset - positional relative to target
14
14
  p?: VectorSchema // position to attach camera to
15
15
  pt?: VectorSchema // position to track
16
16
  pl?: VectorSchema // position to look at
17
+ s?: string[] // player model nodes to show by partial case insensitive match of gltf node names
17
18
  sa?: number // shoulder angle
18
19
  z?: number // zoom
19
20
  }
@@ -32,6 +33,7 @@ export const cameraSchema: JSONSchemaType<CameraSchema> = {
32
33
  p: { ...vectorSchema, nullable: true },
33
34
  pt: { ...vectorSchema, nullable: true },
34
35
  pl: { ...vectorSchema, nullable: true },
36
+ s: { type: 'array', items: { type: 'string' }, nullable: true },
35
37
  sa: { type: 'number', nullable: true },
36
38
  z: { type: 'number', nullable: true },
37
39
  },
package/schemas/Entity.ts CHANGED
@@ -16,9 +16,10 @@ export type EntitySchema = {
16
16
  as?: string[]; // model animations stop
17
17
  bh?: VectorSchema; // block half extents
18
18
  bt?: string; // block texture uri
19
- h?: string[]; // model parts to hide
19
+ h?: string[]; // model nodes to hide by partial case insensitive match of gltf node names
20
20
  m?: string; // model uri
21
- mo?: ModelNodeOverrideSchema[]; // model node overrides
21
+ mo?: ModelNodeOverrideSchema[]; // model node overrides, (not implemented yet)
22
+ mt?: string; // model texture uri (custom override)
22
23
  n?: string; // name
23
24
  o?: number; // opacity
24
25
  p?: VectorSchema; // position
@@ -27,6 +28,7 @@ export type EntitySchema = {
27
28
  r?: QuaternionSchema; // rotation
28
29
  rm?: boolean; // removed/remove
29
30
  s?: number; // model scale
31
+ sn?: string[]; // model nodes to show by partial case insensitive match of gltf node names
30
32
  t?: RgbColorSchema; // tint color
31
33
  }
32
34
 
@@ -43,6 +45,7 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
43
45
  h: { type: 'array', items: { type: 'string' }, nullable: true },
44
46
  m: { type: 'string', nullable: true },
45
47
  mo: { type: 'array', items: { ...modelNodeOverrideSchema }, nullable: true },
48
+ mt: { type: 'string', nullable: true },
46
49
  n: { type: 'string', nullable: true },
47
50
  o: { type: 'number', nullable: true },
48
51
  p: { ...vectorSchema, nullable: true },
@@ -51,6 +54,7 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
51
54
  r: { ...quaternionSchema, nullable: true },
52
55
  rm: { type: 'boolean', nullable: true },
53
56
  s: { type: 'number', nullable: true },
57
+ sn: { type: 'array', items: { type: 'string' }, nullable: true },
54
58
  t: { ...rgbColorSchema, nullable: true },
55
59
  },
56
60
  required: [ 'i' ],