@hytopia.com/server-protocol 1.3.46 → 1.4.0
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 +1 -1
- package/schemas/Entity.ts +6 -4
- package/schemas/World.ts +0 -2
- package/schemas/index.ts +0 -1
- package/schemas/ModelNodeOverride.ts +0 -26
package/package.json
CHANGED
package/schemas/Entity.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { rgbColorSchema } from './RgbColor';
|
|
2
|
-
import { modelNodeOverrideSchema } from './ModelNodeOverride';
|
|
3
2
|
import { quaternionSchema } from './Quaternion';
|
|
4
3
|
import { vectorSchema } from './Vector';
|
|
5
4
|
import type { JSONSchemaType } from 'ajv';
|
|
6
|
-
import type { ModelNodeOverrideSchema } from './ModelNodeOverride';
|
|
7
5
|
import type { QuaternionSchema } from './Quaternion';
|
|
8
6
|
import type { RgbColorSchema } from './RgbColor';
|
|
9
7
|
import type { VectorSchema } from './Vector';
|
|
@@ -16,9 +14,11 @@ export type EntitySchema = {
|
|
|
16
14
|
as?: string[]; // model animations stop
|
|
17
15
|
bh?: VectorSchema; // block half extents
|
|
18
16
|
bt?: string; // block texture uri
|
|
17
|
+
c?: boolean; // controlled
|
|
18
|
+
cf?: string; // control function for client prediction
|
|
19
|
+
cs?: object; // control function state for client prediction
|
|
19
20
|
h?: string[]; // model parts to hide
|
|
20
21
|
m?: string; // model uri
|
|
21
|
-
mo?: ModelNodeOverrideSchema[]; // model node overrides
|
|
22
22
|
n?: string; // name
|
|
23
23
|
o?: number; // opacity
|
|
24
24
|
p?: VectorSchema; // position
|
|
@@ -40,9 +40,11 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
|
|
|
40
40
|
as: { type: 'array', items: { type: 'string' }, nullable: true },
|
|
41
41
|
bh: { ...vectorSchema, nullable: true },
|
|
42
42
|
bt: { type: 'string', nullable: true },
|
|
43
|
+
c: { type: 'boolean', nullable: true },
|
|
44
|
+
cf: { type: 'string', nullable: true },
|
|
45
|
+
cs: { type: 'object', nullable: true },
|
|
43
46
|
h: { type: 'array', items: { type: 'string' }, nullable: true },
|
|
44
47
|
m: { type: 'string', nullable: true },
|
|
45
|
-
mo: { type: 'array', items: { ...modelNodeOverrideSchema }, nullable: true },
|
|
46
48
|
n: { type: 'string', nullable: true },
|
|
47
49
|
o: { type: 'number', nullable: true },
|
|
48
50
|
p: { ...vectorSchema, nullable: true },
|
package/schemas/World.ts
CHANGED
|
@@ -11,7 +11,6 @@ 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
|
-
f?: boolean; // focused
|
|
15
14
|
n?: string; // name
|
|
16
15
|
s?: string; // skyboxUri
|
|
17
16
|
t?: number; // timestep (seconds)
|
|
@@ -26,7 +25,6 @@ export const worldSchema: JSONSchemaType<WorldSchema> = {
|
|
|
26
25
|
dc: { ...rgbColorSchema, nullable: true },
|
|
27
26
|
di: { type: 'number', nullable: true },
|
|
28
27
|
dp: { ...vectorSchema, nullable: true },
|
|
29
|
-
f: { type: 'boolean', nullable: true },
|
|
30
28
|
n: { type: 'string', nullable: true },
|
|
31
29
|
s: { type: 'string', nullable: true },
|
|
32
30
|
t: { type: 'number', nullable: true },
|
package/schemas/index.ts
CHANGED
|
@@ -16,7 +16,6 @@ export * from './HexColor';
|
|
|
16
16
|
export * from './Input';
|
|
17
17
|
export * from './Light';
|
|
18
18
|
export * from './Lights';
|
|
19
|
-
export * from './ModelNodeOverride';
|
|
20
19
|
export * from './PhysicsDebugRaycast';
|
|
21
20
|
export * from './PhysicsDebugRaycasts';
|
|
22
21
|
export * from './PhysicsDebugRender';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { rgbColorSchema } from './RgbColor';
|
|
2
|
-
import type { JSONSchemaType } from 'ajv';
|
|
3
|
-
import type { RgbColorSchema } from './RgbColor';
|
|
4
|
-
|
|
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
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const modelNodeOverrideSchema: JSONSchemaType<ModelNodeOverrideSchema> = {
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
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 },
|
|
23
|
-
},
|
|
24
|
-
required: [ 'n' ],
|
|
25
|
-
additionalProperties: false,
|
|
26
|
-
}
|