@hytopia.com/server-protocol 1.4.56-dev2 → 1.4.56-dev3

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.56-dev2",
3
+ "version": "1.4.56-dev3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,12 +1,20 @@
1
1
  import { rgbColorSchema } from './RgbColor';
2
+ import { quaternionSchema } from './Quaternion';
3
+ import { vectorSchema } from './Vector';
2
4
  import type { JSONSchemaType } from 'ajv';
5
+ import type { QuaternionSchema } from './Quaternion';
3
6
  import type { RgbColorSchema } from './RgbColor';
7
+ import type { VectorSchema } from './Vector';
8
+
4
9
 
5
10
  export type ModelNodeOverrideSchema = {
6
- n: string; // node name match
7
- ec?: RgbColorSchema; // emissive color
8
- ei?: number; // emissive intensity
9
- h?: boolean; // hidden
11
+ n: string; // node name match
12
+ ec?: RgbColorSchema; // emissive color
13
+ ei?: number; // emissive intensity
14
+ h?: boolean; // hidden
15
+ p?: VectorSchema; // local position
16
+ r?: QuaternionSchema; // local rotation
17
+ s?: VectorSchema; // local scale
10
18
  }
11
19
 
12
20
  export const modelNodeOverrideSchema: JSONSchemaType<ModelNodeOverrideSchema> = {
@@ -16,6 +24,9 @@ export const modelNodeOverrideSchema: JSONSchemaType<ModelNodeOverrideSchema> =
16
24
  ec: { ...rgbColorSchema, nullable: true },
17
25
  ei: { type: 'number', nullable: true },
18
26
  h: { type: 'boolean', nullable: true },
27
+ p: { ...vectorSchema, nullable: true },
28
+ r: { ...quaternionSchema, nullable: true },
29
+ s: { ...vectorSchema, nullable: true },
19
30
  },
20
31
  required: [ 'n' ],
21
32
  additionalProperties: false,