@hytopia.com/server-protocol 1.3.0 → 1.3.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/schemas/Audio.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hytopia.com/server-protocol",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/schemas/Audio.ts CHANGED
@@ -3,12 +3,12 @@ import type { JSONSchemaType } from 'ajv';
3
3
  import type { VectorSchema } from './Vector';
4
4
 
5
5
  export type AudioSchema = {
6
- i: number; // audio id
6
+ i: number; // audio id
7
7
  a?: string; // audio uri
8
8
  d?: number; // duration
9
9
  de?: number; // detune
10
+ di?: number; // distortion (0 to 1, or 1+)
10
11
  e?: number; // entity attachment, follows entity id
11
- g?: number; // gain (0 to 1, or 1+ for distortion)
12
12
  l?: boolean; // loop
13
13
  of?: number; // offset
14
14
  p?: VectorSchema; // spatial position of audio
@@ -27,8 +27,8 @@ export const audioSchema: JSONSchemaType<AudioSchema> = {
27
27
  a: { type: 'string', nullable: true },
28
28
  d: { type: 'number', nullable: true },
29
29
  de: { type: 'number', nullable: true },
30
+ di: { type: 'number', minimum: 0, nullable: true },
30
31
  e: { type: 'number', nullable: true },
31
- g: { type: 'number', minimum: 0, nullable: true },
32
32
  l: { type: 'boolean', nullable: true },
33
33
  o: { type: 'boolean', nullable: true },
34
34
  of: { type: 'number', nullable: true },