@hytopia.com/server-protocol 1.4.41 → 1.4.43-dev

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.41",
3
+ "version": "1.4.43-dev",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -6,8 +6,6 @@ export type BlockTypeSchema = {
6
6
  ll?: number; // light level
7
7
  n?: string; // name
8
8
  t?: string; // textureUri
9
- ti?: number[]; // trimesh-based block indices
10
- tv?: number[]; // trimesh-based block vertices
11
9
  }
12
10
 
13
11
  export const blockTypeSchema: JSONSchemaType<BlockTypeSchema> = {
@@ -18,9 +16,7 @@ export const blockTypeSchema: JSONSchemaType<BlockTypeSchema> = {
18
16
  ll: { type: 'number', nullable: true },
19
17
  n: { type: 'string', nullable: true },
20
18
  t: { type: 'string', nullable: true },
21
- ti: { type: 'array', items: { type: 'number' }, nullable: true },
22
- tv: { type: 'array', items: { type: 'number' }, nullable: true },
23
19
  },
24
20
  required: [ 'i' ],
25
21
  additionalProperties: false,
26
- };
22
+ }
package/schemas/Entity.ts CHANGED
@@ -17,9 +17,11 @@ export type EntitySchema = {
17
17
  bh?: VectorSchema; // block half extents
18
18
  bt?: string; // block texture uri
19
19
  e?: boolean; // environmental
20
+ ec?: RgbColorSchema; // emissive color
21
+ ei?: number; // emissive intensity
20
22
  h?: string[]; // model nodes to hide by partial case insensitive match of gltf node names
21
23
  m?: string; // model uri
22
- mo?: ModelNodeOverrideSchema[]; // model node overrides, (not implemented yet)
24
+ mo?: ModelNodeOverrideSchema[]; // model node overrides
23
25
  mt?: string; // model texture uri (custom override)
24
26
  n?: string; // name
25
27
  o?: number; // opacity
@@ -45,6 +47,8 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
45
47
  bh: { ...vectorSchema, nullable: true },
46
48
  bt: { type: 'string', nullable: true },
47
49
  e: { type: 'boolean', nullable: true },
50
+ ec: { ...rgbColorSchema, nullable: true },
51
+ ei: { type: 'number', nullable: true },
48
52
  h: { type: 'array', items: { type: 'string' }, nullable: true },
49
53
  m: { type: 'string', nullable: true },
50
54
  mo: { type: 'array', items: { ...modelNodeOverrideSchema }, nullable: true },
@@ -3,23 +3,17 @@ import type { JSONSchemaType } from 'ajv';
3
3
  import type { RgbColorSchema } from './RgbColor';
4
4
 
5
5
  export type ModelNodeOverrideSchema = {
6
- n: string; // node name match
7
- h?: boolean; // hidden
8
- o?: number; // opacity
9
- r?: boolean; // reset override to defaults
10
- s?: number; // scale
11
- t?: RgbColorSchema; // tint color
6
+ n: string; // node name match
7
+ ec?: RgbColorSchema; // emissive color
8
+ ei?: number; // emissive intensity
12
9
  }
13
10
 
14
11
  export const modelNodeOverrideSchema: JSONSchemaType<ModelNodeOverrideSchema> = {
15
12
  type: 'object',
16
13
  properties: {
17
14
  n: { type: 'string' },
18
- h: { type: 'boolean', nullable: true },
19
- o: { type: 'number', minimum: 0, maximum: 1, nullable: true },
20
- r: { type: 'boolean', nullable: true },
21
- s: { type: 'number', nullable: true },
22
- t: { ...rgbColorSchema, nullable: true },
15
+ ec: { ...rgbColorSchema, nullable: true },
16
+ ei: { type: 'number', nullable: true },
23
17
  },
24
18
  required: [ 'n' ],
25
19
  additionalProperties: false,