@hytopia.com/server-protocol 1.4.51 → 1.4.52

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.51",
3
+ "version": "1.4.52",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/schemas/Entity.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  import { rgbColorSchema } from './RgbColor';
2
2
  import { modelNodeOverrideSchema } from './ModelNodeOverride';
3
+ import { outlineSchema } from './Outline';
3
4
  import { quaternionSchema } from './Quaternion';
4
5
  import { vectorSchema } from './Vector';
5
6
  import type { JSONSchemaType } from 'ajv';
6
7
  import type { ModelNodeOverrideSchema } from './ModelNodeOverride';
8
+ import type { OutlineSchema } from './Outline';
7
9
  import type { QuaternionSchema } from './Quaternion';
8
10
  import type { RgbColorSchema } from './RgbColor';
9
11
  import type { VectorSchema } from './Vector';
@@ -25,6 +27,7 @@ export type EntitySchema = {
25
27
  mt?: string; // model texture uri (custom override)
26
28
  n?: string; // name
27
29
  o?: number; // opacity
30
+ ol?: OutlineSchema; // outline options
28
31
  p?: VectorSchema; // position
29
32
  pe?: number; // parent entity id
30
33
  pn?: string; // parent node name
@@ -55,6 +58,7 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
55
58
  mt: { type: 'string', nullable: true },
56
59
  n: { type: 'string', nullable: true },
57
60
  o: { type: 'number', nullable: true },
61
+ ol: { ...outlineSchema, nullable: true },
58
62
  p: { ...vectorSchema, nullable: true },
59
63
  pe: { type: 'number', nullable: true },
60
64
  pn: { type: 'string', nullable: true },
@@ -0,0 +1,24 @@
1
+ import { rgbColorSchema } from './RgbColor';
2
+ import type { JSONSchemaType } from 'ajv';
3
+ import type { RgbColorSchema } from './RgbColor';
4
+
5
+ export type OutlineSchema = {
6
+ c?: RgbColorSchema; // color
7
+ ci?: number; // color intensity
8
+ th?: number; // thickness
9
+ o?: number; // opacity
10
+ oc?: boolean; // occluded
11
+ }
12
+
13
+ export const outlineSchema: JSONSchemaType<OutlineSchema> = {
14
+ type: 'object',
15
+ properties: {
16
+ c: { ...rgbColorSchema, nullable: true },
17
+ ci: { type: 'number', nullable: true },
18
+ th: { type: 'number', nullable: true },
19
+ o: { type: 'number', nullable: true },
20
+ oc: { type: 'boolean', nullable: true },
21
+ },
22
+ required: [],
23
+ additionalProperties: false,
24
+ }
package/schemas/index.ts CHANGED
@@ -20,6 +20,7 @@ export * from './Light';
20
20
  export * from './Lights';
21
21
  export * from './ModelNodeOverride';
22
22
  export * from './NotificationPermissionRequest';
23
+ export * from './Outline';
23
24
  export * from './ParticleEmitter';
24
25
  export * from './ParticleEmitters';
25
26
  export * from './PhysicsDebugRaycast';