@hytopia.com/server-protocol 1.0.14 → 1.0.15
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
package/schemas/Block.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { JSONSchemaType } from 'ajv';
|
|
|
3
3
|
import type { VectorSchema } from './Vector';
|
|
4
4
|
|
|
5
5
|
export type BlockSchema = {
|
|
6
|
-
wi:
|
|
6
|
+
wi: number; // world id
|
|
7
7
|
i: number; // block id
|
|
8
8
|
c: VectorSchema; // coordinate
|
|
9
9
|
};
|
|
@@ -11,7 +11,7 @@ export type BlockSchema = {
|
|
|
11
11
|
export const blockSchema: JSONSchemaType<BlockSchema> = {
|
|
12
12
|
type: 'object',
|
|
13
13
|
properties: {
|
|
14
|
-
wi: { type: '
|
|
14
|
+
wi: { type: 'number' },
|
|
15
15
|
i: { type: 'number' },
|
|
16
16
|
c: vectorSchema,
|
|
17
17
|
},
|
package/schemas/BlockType.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { JSONSchemaType } from 'ajv';
|
|
|
3
3
|
import type { ColliderDescSchema } from './ColliderDesc';
|
|
4
4
|
|
|
5
5
|
export type BlockTypeSchema = {
|
|
6
|
-
wi:
|
|
6
|
+
wi: number; // world id
|
|
7
7
|
i: number; // block type id
|
|
8
8
|
d: boolean; // delta
|
|
9
9
|
t?: string; // textureUri
|
|
@@ -15,7 +15,7 @@ export type BlockTypeSchema = {
|
|
|
15
15
|
export const blockTypeSchema: JSONSchemaType<BlockTypeSchema> = {
|
|
16
16
|
type: 'object',
|
|
17
17
|
properties: {
|
|
18
|
-
wi: { type: '
|
|
18
|
+
wi: { type: 'number' },
|
|
19
19
|
i: { type: 'number' },
|
|
20
20
|
d: { type: 'boolean' },
|
|
21
21
|
t: { type: 'string', nullable: true },
|
|
@@ -3,14 +3,14 @@ import type { JSONSchemaType } from 'ajv';
|
|
|
3
3
|
import type { BlockTypeSchema } from './BlockType';
|
|
4
4
|
|
|
5
5
|
export type BlockTypeRegistrySchema = {
|
|
6
|
-
wi:
|
|
6
|
+
wi: number; // world id
|
|
7
7
|
b: BlockTypeSchema[]; // block types
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export const blockTypeRegistrySchema: JSONSchemaType<BlockTypeRegistrySchema> = {
|
|
11
11
|
type: 'object',
|
|
12
12
|
properties: {
|
|
13
|
-
wi: { type: '
|
|
13
|
+
wi: { type: 'number' },
|
|
14
14
|
b: {
|
|
15
15
|
type: 'array',
|
|
16
16
|
items: blockTypeSchema,
|
package/schemas/Chunk.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { JSONSchemaType } from 'ajv';
|
|
|
3
3
|
import type { VectorSchema } from './Vector';
|
|
4
4
|
|
|
5
5
|
export type ChunkSchema = {
|
|
6
|
-
wi:
|
|
6
|
+
wi: number; // world id
|
|
7
7
|
c: VectorSchema; // chunk coordinate [ 16n, 16n, 16n ]
|
|
8
8
|
b: Uint8Array | number[]; // block ids in chunk, 16^3 entries, registry block ids 1-255, 0 = none
|
|
9
9
|
};
|
|
@@ -11,7 +11,7 @@ export type ChunkSchema = {
|
|
|
11
11
|
export const chunkSchema: JSONSchemaType<ChunkSchema> = {
|
|
12
12
|
type: 'object',
|
|
13
13
|
properties: {
|
|
14
|
-
wi: { type: '
|
|
14
|
+
wi: { type: 'number' },
|
|
15
15
|
c: vectorSchema,
|
|
16
16
|
b: {
|
|
17
17
|
type: 'array',
|
package/schemas/Entity.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { JSONSchemaType } from 'ajv';
|
|
|
3
3
|
import type { RigidBodySchema } from './RigidBody';
|
|
4
4
|
|
|
5
5
|
export type EntitySchema = {
|
|
6
|
-
wi:
|
|
6
|
+
wi: number; // world id
|
|
7
7
|
i: number; // entity id
|
|
8
8
|
d: boolean; // delta
|
|
9
9
|
f?: boolean; // focused
|
|
@@ -17,7 +17,7 @@ export type EntitySchema = {
|
|
|
17
17
|
export const entitySchema: JSONSchemaType<EntitySchema> = {
|
|
18
18
|
type: 'object',
|
|
19
19
|
properties: {
|
|
20
|
-
wi: { type: '
|
|
20
|
+
wi: { type: 'number' },
|
|
21
21
|
i: { type: 'number' },
|
|
22
22
|
d: { type: 'boolean' },
|
|
23
23
|
f: { type: 'boolean', nullable: true },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSONSchemaType } from 'ajv';
|
|
2
2
|
|
|
3
3
|
export type PhysicsDebugRenderSchema = {
|
|
4
|
-
wi:
|
|
4
|
+
wi: number; // world id
|
|
5
5
|
v: number[]; // rapier debug render vertices
|
|
6
6
|
c: number[]; // rapier debug render colors
|
|
7
7
|
}
|
|
@@ -9,7 +9,7 @@ export type PhysicsDebugRenderSchema = {
|
|
|
9
9
|
export const physicsDebugRenderSchema: JSONSchemaType<PhysicsDebugRenderSchema> = {
|
|
10
10
|
type: 'object',
|
|
11
11
|
properties: {
|
|
12
|
-
wi: { type: '
|
|
12
|
+
wi: { type: 'number' },
|
|
13
13
|
v: { type: 'array', items: { type: 'number' } },
|
|
14
14
|
c: { type: 'array', items: { type: 'number' } },
|
|
15
15
|
},
|