@hytopia.com/server-protocol 1.4.4 → 1.4.6

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.4",
3
+ "version": "1.4.6",
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,9 @@ 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
22
  mt?: string; // model texture uri (custom override)
23
23
  n?: string; // name
24
24
  o?: number; // opacity
@@ -28,6 +28,7 @@ export type EntitySchema = {
28
28
  r?: QuaternionSchema; // rotation
29
29
  rm?: boolean; // removed/remove
30
30
  s?: number; // model scale
31
+ sn?: string[]; // model nodes to show by partial case insensitive match of gltf node names
31
32
  t?: RgbColorSchema; // tint color
32
33
  }
33
34
 
@@ -53,6 +54,7 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
53
54
  r: { ...quaternionSchema, nullable: true },
54
55
  rm: { type: 'boolean', nullable: true },
55
56
  s: { type: 'number', nullable: true },
57
+ sn: { type: 'array', items: { type: 'string' }, nullable: true },
56
58
  t: { ...rgbColorSchema, nullable: true },
57
59
  },
58
60
  required: [ 'i' ],
package/schemas/World.ts CHANGED
@@ -11,6 +11,8 @@ 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
+ fc?: RgbColorSchema; // fog color
15
+ fd?: number; // fog density
14
16
  n?: string; // name
15
17
  s?: string; // skyboxUri
16
18
  si?: number; // skybox intensity
@@ -26,6 +28,8 @@ export const worldSchema: JSONSchemaType<WorldSchema> = {
26
28
  dc: { ...rgbColorSchema, nullable: true },
27
29
  di: { type: 'number', nullable: true },
28
30
  dp: { ...vectorSchema, nullable: true },
31
+ fc: { ...rgbColorSchema, nullable: true },
32
+ fd: { type: 'number', nullable: true },
29
33
  n: { type: 'string', nullable: true },
30
34
  s: { type: 'string', nullable: true },
31
35
  si: { type: 'number', nullable: true },