@hytopia.com/server-protocol 1.0.50 → 1.0.53

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.0.50",
3
+ "version": "1.0.53",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/schemas/Entity.ts CHANGED
@@ -8,9 +8,9 @@ export type EntitySchema = {
8
8
  f?: boolean; // focused
9
9
  fs?: boolean; // full state
10
10
  m?: string; // model uri
11
- a?: string[]; // model looped animations
12
- as?: string; // animation start - unlooped one shot
13
- ax?: string; // animation stop - unlooped one shot
11
+ a?: string[]; // animations looped
12
+ o?: string[]; // animations one shot
13
+ s?: string[]; // animations stop
14
14
  n?: string; // name
15
15
  r?: RigidBodySchema; // rigid body
16
16
  rm?: boolean; // removed/remove
@@ -26,8 +26,8 @@ export const entitySchema: JSONSchemaType<EntitySchema> = {
26
26
  fs: { type: 'boolean', nullable: true },
27
27
  m: { type: 'string', nullable: true },
28
28
  a: { type: 'array', items: { type: 'string' }, nullable: true },
29
- as: { type: 'string', nullable: true },
30
- ax: { type: 'string', nullable: true },
29
+ o: { type: 'array', items: { type: 'string' }, nullable: true },
30
+ s: { type: 'array', items: { type: 'string' }, nullable: true },
31
31
  n: { type: 'string', nullable: true },
32
32
  r: { ...rigidBodySchema, nullable: true },
33
33
  rm: { type: 'boolean', nullable: true },
@@ -4,7 +4,8 @@ import type { VectorSchema } from './Vector';
4
4
 
5
5
  export type SimulationSchema = {
6
6
  wi: number; // world id
7
- t?: number; // tickRate (ticks per second)
7
+ t?: number; // timestep (seconds)
8
+ r?: number; // tick rate (ticks per second)
8
9
  g?: VectorSchema; // gravity
9
10
  };
10
11
 
@@ -13,6 +14,7 @@ export const simulationSchema: JSONSchemaType<SimulationSchema> = {
13
14
  properties: {
14
15
  wi: { type: 'number' },
15
16
  t: { type: 'number', nullable: true },
17
+ r: { type: 'number', nullable: true },
16
18
  g: { ...vectorSchema, nullable: true },
17
19
  },
18
20
  required: [ 'wi' ],