@dcl/ecs 7.14.1-19673051995.commit-94f9a7a → 7.14.1-19676464210.commit-6775120

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.
@@ -14,6 +14,16 @@ export interface PBAudioStream {
14
14
  volume?: number | undefined;
15
15
  /** the audio stream HTTP URL */
16
16
  url: string;
17
+ /**
18
+ * either the audio will be global or spatial (default: false)
19
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
20
+ * spatial: changes depending on where the listener is relative to the sound source
21
+ */
22
+ spatial?: boolean | undefined;
23
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
24
+ spatialMinDistance?: number | undefined;
25
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
26
+ spatialMaxDistance?: number | undefined;
17
27
  }
18
28
  /**
19
29
  * @public
@@ -2,7 +2,14 @@
2
2
  import _m0 from "protobufjs/minimal";
3
3
  const protobufPackageSarasa = "decentraland.sdk.components";
4
4
  function createBasePBAudioStream() {
5
- return { playing: undefined, volume: undefined, url: "" };
5
+ return {
6
+ playing: undefined,
7
+ volume: undefined,
8
+ url: "",
9
+ spatial: undefined,
10
+ spatialMinDistance: undefined,
11
+ spatialMaxDistance: undefined,
12
+ };
6
13
  }
7
14
  /**
8
15
  * @public
@@ -19,6 +26,15 @@ export var PBAudioStream;
19
26
  if (message.url !== "") {
20
27
  writer.uint32(26).string(message.url);
21
28
  }
29
+ if (message.spatial !== undefined) {
30
+ writer.uint32(32).bool(message.spatial);
31
+ }
32
+ if (message.spatialMinDistance !== undefined) {
33
+ writer.uint32(45).float(message.spatialMinDistance);
34
+ }
35
+ if (message.spatialMaxDistance !== undefined) {
36
+ writer.uint32(53).float(message.spatialMaxDistance);
37
+ }
22
38
  return writer;
23
39
  }
24
40
  PBAudioStream.encode = encode;
@@ -47,6 +63,24 @@ export var PBAudioStream;
47
63
  }
48
64
  message.url = reader.string();
49
65
  continue;
66
+ case 4:
67
+ if (tag !== 32) {
68
+ break;
69
+ }
70
+ message.spatial = reader.bool();
71
+ continue;
72
+ case 5:
73
+ if (tag !== 45) {
74
+ break;
75
+ }
76
+ message.spatialMinDistance = reader.float();
77
+ continue;
78
+ case 6:
79
+ if (tag !== 53) {
80
+ break;
81
+ }
82
+ message.spatialMaxDistance = reader.float();
83
+ continue;
50
84
  }
51
85
  if ((tag & 7) === 4 || tag === 0) {
52
86
  break;
@@ -15,6 +15,16 @@ export interface PBVideoPlayer {
15
15
  playbackRate?: number | undefined;
16
16
  /** default false */
17
17
  loop?: boolean | undefined;
18
+ /**
19
+ * either the audio will be global or spatial (default: false)
20
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
21
+ * spatial: changes depending on where the listener is relative to the sound source
22
+ */
23
+ spatial?: boolean | undefined;
24
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
25
+ spatialMinDistance?: number | undefined;
26
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
27
+ spatialMaxDistance?: number | undefined;
18
28
  }
19
29
  /**
20
30
  * @public
@@ -9,6 +9,9 @@ function createBasePBVideoPlayer() {
9
9
  volume: undefined,
10
10
  playbackRate: undefined,
11
11
  loop: undefined,
12
+ spatial: undefined,
13
+ spatialMinDistance: undefined,
14
+ spatialMaxDistance: undefined,
12
15
  };
13
16
  }
14
17
  /**
@@ -35,6 +38,15 @@ export var PBVideoPlayer;
35
38
  if (message.loop !== undefined) {
36
39
  writer.uint32(48).bool(message.loop);
37
40
  }
41
+ if (message.spatial !== undefined) {
42
+ writer.uint32(56).bool(message.spatial);
43
+ }
44
+ if (message.spatialMinDistance !== undefined) {
45
+ writer.uint32(69).float(message.spatialMinDistance);
46
+ }
47
+ if (message.spatialMaxDistance !== undefined) {
48
+ writer.uint32(77).float(message.spatialMaxDistance);
49
+ }
38
50
  return writer;
39
51
  }
40
52
  PBVideoPlayer.encode = encode;
@@ -81,6 +93,24 @@ export var PBVideoPlayer;
81
93
  }
82
94
  message.loop = reader.bool();
83
95
  continue;
96
+ case 7:
97
+ if (tag !== 56) {
98
+ break;
99
+ }
100
+ message.spatial = reader.bool();
101
+ continue;
102
+ case 8:
103
+ if (tag !== 69) {
104
+ break;
105
+ }
106
+ message.spatialMinDistance = reader.float();
107
+ continue;
108
+ case 9:
109
+ if (tag !== 77) {
110
+ break;
111
+ }
112
+ message.spatialMaxDistance = reader.float();
113
+ continue;
84
114
  }
85
115
  if ((tag & 7) === 4 || tag === 0) {
86
116
  break;
@@ -85,7 +85,10 @@ export function createTweenSystem(engine) {
85
85
  };
86
86
  }
87
87
  if (tween.mode?.$case === 'scale' && tween.mode.scale) {
88
- return { ...tween, mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } } };
88
+ return {
89
+ ...tween,
90
+ mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } }
91
+ };
89
92
  }
90
93
  if (tween.mode?.$case === 'textureMove' && tween.mode.textureMove) {
91
94
  return {
@@ -14,6 +14,16 @@ export interface PBAudioStream {
14
14
  volume?: number | undefined;
15
15
  /** the audio stream HTTP URL */
16
16
  url: string;
17
+ /**
18
+ * either the audio will be global or spatial (default: false)
19
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
20
+ * spatial: changes depending on where the listener is relative to the sound source
21
+ */
22
+ spatial?: boolean | undefined;
23
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
24
+ spatialMinDistance?: number | undefined;
25
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
26
+ spatialMaxDistance?: number | undefined;
17
27
  }
18
28
  /**
19
29
  * @public
@@ -8,7 +8,14 @@ exports.PBAudioStream = void 0;
8
8
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
9
9
  const protobufPackageSarasa = "decentraland.sdk.components";
10
10
  function createBasePBAudioStream() {
11
- return { playing: undefined, volume: undefined, url: "" };
11
+ return {
12
+ playing: undefined,
13
+ volume: undefined,
14
+ url: "",
15
+ spatial: undefined,
16
+ spatialMinDistance: undefined,
17
+ spatialMaxDistance: undefined,
18
+ };
12
19
  }
13
20
  /**
14
21
  * @public
@@ -25,6 +32,15 @@ var PBAudioStream;
25
32
  if (message.url !== "") {
26
33
  writer.uint32(26).string(message.url);
27
34
  }
35
+ if (message.spatial !== undefined) {
36
+ writer.uint32(32).bool(message.spatial);
37
+ }
38
+ if (message.spatialMinDistance !== undefined) {
39
+ writer.uint32(45).float(message.spatialMinDistance);
40
+ }
41
+ if (message.spatialMaxDistance !== undefined) {
42
+ writer.uint32(53).float(message.spatialMaxDistance);
43
+ }
28
44
  return writer;
29
45
  }
30
46
  PBAudioStream.encode = encode;
@@ -53,6 +69,24 @@ var PBAudioStream;
53
69
  }
54
70
  message.url = reader.string();
55
71
  continue;
72
+ case 4:
73
+ if (tag !== 32) {
74
+ break;
75
+ }
76
+ message.spatial = reader.bool();
77
+ continue;
78
+ case 5:
79
+ if (tag !== 45) {
80
+ break;
81
+ }
82
+ message.spatialMinDistance = reader.float();
83
+ continue;
84
+ case 6:
85
+ if (tag !== 53) {
86
+ break;
87
+ }
88
+ message.spatialMaxDistance = reader.float();
89
+ continue;
56
90
  }
57
91
  if ((tag & 7) === 4 || tag === 0) {
58
92
  break;
@@ -15,6 +15,16 @@ export interface PBVideoPlayer {
15
15
  playbackRate?: number | undefined;
16
16
  /** default false */
17
17
  loop?: boolean | undefined;
18
+ /**
19
+ * either the audio will be global or spatial (default: false)
20
+ * global: plays the same way for every listener. It is not affected by distance, direction, or position.
21
+ * spatial: changes depending on where the listener is relative to the sound source
22
+ */
23
+ spatial?: boolean | undefined;
24
+ /** Within the min distance the audio will cease to grow louder in volume (default: 0) */
25
+ spatialMinDistance?: number | undefined;
26
+ /** The distance where sound either becomes inaudible or stops attenuation (default: 60) */
27
+ spatialMaxDistance?: number | undefined;
18
28
  }
19
29
  /**
20
30
  * @public
@@ -15,6 +15,9 @@ function createBasePBVideoPlayer() {
15
15
  volume: undefined,
16
16
  playbackRate: undefined,
17
17
  loop: undefined,
18
+ spatial: undefined,
19
+ spatialMinDistance: undefined,
20
+ spatialMaxDistance: undefined,
18
21
  };
19
22
  }
20
23
  /**
@@ -41,6 +44,15 @@ var PBVideoPlayer;
41
44
  if (message.loop !== undefined) {
42
45
  writer.uint32(48).bool(message.loop);
43
46
  }
47
+ if (message.spatial !== undefined) {
48
+ writer.uint32(56).bool(message.spatial);
49
+ }
50
+ if (message.spatialMinDistance !== undefined) {
51
+ writer.uint32(69).float(message.spatialMinDistance);
52
+ }
53
+ if (message.spatialMaxDistance !== undefined) {
54
+ writer.uint32(77).float(message.spatialMaxDistance);
55
+ }
44
56
  return writer;
45
57
  }
46
58
  PBVideoPlayer.encode = encode;
@@ -87,6 +99,24 @@ var PBVideoPlayer;
87
99
  }
88
100
  message.loop = reader.bool();
89
101
  continue;
102
+ case 7:
103
+ if (tag !== 56) {
104
+ break;
105
+ }
106
+ message.spatial = reader.bool();
107
+ continue;
108
+ case 8:
109
+ if (tag !== 69) {
110
+ break;
111
+ }
112
+ message.spatialMinDistance = reader.float();
113
+ continue;
114
+ case 9:
115
+ if (tag !== 77) {
116
+ break;
117
+ }
118
+ message.spatialMaxDistance = reader.float();
119
+ continue;
90
120
  }
91
121
  if ((tag & 7) === 4 || tag === 0) {
92
122
  break;
@@ -111,7 +111,10 @@ function createTweenSystem(engine) {
111
111
  };
112
112
  }
113
113
  if (tween.mode?.$case === 'scale' && tween.mode.scale) {
114
- return { ...tween, mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } } };
114
+ return {
115
+ ...tween,
116
+ mode: { ...tween.mode, scale: { start: tween.mode.scale.end, end: tween.mode.scale.start } }
117
+ };
115
118
  }
116
119
  if (tween.mode?.$case === 'textureMove' && tween.mode.textureMove) {
117
120
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/ecs",
3
3
  "description": "Decentraland ECS",
4
- "version": "7.14.1-19673051995.commit-94f9a7a",
4
+ "version": "7.14.1-19676464210.commit-6775120",
5
5
  "author": "DCL",
6
6
  "bugs": "https://github.com/decentraland/ecs/issues",
7
7
  "files": [
@@ -33,5 +33,5 @@
33
33
  },
34
34
  "types": "./dist/index.d.ts",
35
35
  "typings": "./dist/index.d.ts",
36
- "commit": "94f9a7ab1bfa5d78075a601c957705c92be6085f"
36
+ "commit": "6775120bd3e871f140f4bf4ee798bf398527bd0c"
37
37
  }