@hytopia.com/server-protocol 1.4.36 → 1.4.38-prerelease

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.36",
3
+ "version": "1.4.38-prerelease",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/schemas/Entity.ts CHANGED
@@ -18,6 +18,8 @@ export type EntitySchema = {
18
18
  bt?: string; // block texture uri
19
19
  e?: boolean; // environmental
20
20
  h?: string[]; // model nodes to hide by partial case insensitive match of gltf node names
21
+ ir?: string; // input resolver function
22
+ irs?: object; // input resolver state; TODO: this should be a json type?
21
23
  m?: string; // model uri
22
24
  mo?: ModelNodeOverrideSchema[]; // model node overrides, (not implemented yet)
23
25
  mt?: string; // model texture uri (custom override)
package/schemas/Input.ts CHANGED
@@ -40,8 +40,8 @@ export type InputSchema = {
40
40
  mr?: boolean; // mouse right button pressed
41
41
  cp?: number; // camera pitch radians
42
42
  cy?: number; // camera yaw radians
43
- iro?: VectorSchema; // interact ray origin
44
43
  ird?: VectorSchema; // interact ray direction
44
+ iro?: VectorSchema; // interact ray origin
45
45
  jd?: number; // joystick direction radians
46
46
  sq?: number; // sequence number for UDP inputs
47
47
  }
@@ -86,8 +86,8 @@ export const inputSchema: JSONSchemaType<InputSchema> = {
86
86
  mr: { type: 'boolean', nullable: true },
87
87
  cp: { type: 'number', nullable: true },
88
88
  cy: { type: 'number', nullable: true },
89
- iro: { ...vectorSchema, nullable: true },
90
89
  ird: { ...vectorSchema, nullable: true },
90
+ iro: { ...vectorSchema, nullable: true },
91
91
  jd: { type: 'number', nullable: true },
92
92
  sq: { type: 'number', nullable: true },
93
93
  },
package/schemas/UI.ts CHANGED
@@ -1,14 +1,16 @@
1
1
  import type { JSONSchemaType } from 'ajv';
2
2
 
3
3
  export type UISchema = {
4
- p?: boolean; // pointer lock, true = lock pointer, false = unlock pointer
5
- u?: string; // .html ui uri
4
+ p?: boolean; // pointer lock, true = lock pointer, false = unlock pointer
5
+ pf?: boolean; // pointer lock freeze, prevents states other than p for pointer lock
6
+ u?: string; // .html ui uri
6
7
  };
7
8
 
8
9
  export const uiSchema: JSONSchemaType<UISchema> = {
9
10
  type: 'object',
10
11
  properties: {
11
12
  p: { type: 'boolean', nullable: true },
13
+ pf: { type: 'boolean', nullable: true },
12
14
  u: { type: 'string', nullable: true },
13
15
  },
14
16
  additionalProperties: false,