@dcl/playground-assets 7.4.9 → 7.4.10-8394982680.commit-841a9e7

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/dist/alpha.d.ts CHANGED
@@ -90,8 +90,32 @@ export declare namespace AppendValueOperation {
90
90
  */
91
91
  export declare function areConnected(parcels: Coords[]): boolean;
92
92
 
93
- /** @public */
94
- export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
93
+ export declare const AudioSource: AudioSourceComponentDefinitionExtended;
94
+
95
+ /**
96
+ * @public
97
+ */
98
+ export declare interface AudioSourceComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioSource> {
99
+ /**
100
+ * @public
101
+ *
102
+ * Set playing=true the sound `$name`
103
+ * @param entity - entity with AudioSource component
104
+ * @param src - the path to the sound to play
105
+ * @param resetCursor - the sound starts at 0 or continues from the current cursor position
106
+ * @returns true in successful playing, false if it doesn't find the AudioSource component
107
+ */
108
+ playSound(entity: Entity, src: string, resetCursor?: boolean): boolean;
109
+ /**
110
+ * @public
111
+ *
112
+ * Set playing=false all sounds
113
+ * @param entity - entity with AudioSource component
114
+ * @param resetCursor - the sound stops at 0 or at the current cursor position
115
+ * @returns true in successful stopping, false if it doesn't find the AudioSource component
116
+ */
117
+ stopSound(entity: Entity, resetCursor?: boolean): boolean;
118
+ }
95
119
 
96
120
  /** @public */
97
121
  export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
@@ -1487,6 +1511,12 @@ export declare function createInputSystem(engine: IEngine): IInputSystem;
1487
1511
  */
1488
1512
  export declare function createPointerEventsSystem(engine: IEngine, inputSystem: IInputSystem): PointerEventsSystem;
1489
1513
 
1514
+ /**
1515
+ * @public
1516
+ * @returns tween helper to be used on the scene
1517
+ */
1518
+ export declare function createTweenSystem(engine: IEngine): TweenSystem;
1519
+
1490
1520
  /**
1491
1521
  * Transform parenting: cyclic dependency checker
1492
1522
  * It checks only in modified Transforms
@@ -1989,6 +2019,7 @@ export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefin
1989
2019
  * @public
1990
2020
  */
1991
2021
  export declare interface IEngine {
2022
+ _id: number;
1992
2023
  /**
1993
2024
  * @public
1994
2025
  * Increment the used entity counter and return the next one.
@@ -4126,6 +4157,13 @@ export declare namespace PBAnimator {
4126
4157
  * Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
4127
4158
  * the scene and declared in its manifest. The name was chosen because the URL use-case will
4128
4159
  * eventually be supported.
4160
+ *
4161
+ * `playing=true` when it's previously `playing=true`
4162
+ * a) if clip is playing and `current_time` is NOT SET, the clip remains in the current `current_time`
4163
+ * b) if clip is stopped or `current_time` is set, the clip is played from the `current_time` (if set) or from the beginning
4164
+ *
4165
+ * If other property (volume, loop, pitch) is changed while playing, the clip is keep playing with the new properties
4166
+ * Changing `audio_clip_url` while playing stops the current clip and plays the new one (as a new instance)
4129
4167
  */
4130
4168
  /**
4131
4169
  * @public
@@ -4141,6 +4179,10 @@ export declare interface PBAudioSource {
4141
4179
  pitch?: number | undefined;
4142
4180
  /** the clip path as given in the `files` array of the scene's manifest. */
4143
4181
  audioClipUrl: string;
4182
+ /** specifies the current playback time of the clip in seconds (default: 0). */
4183
+ currentTime?: number | undefined;
4184
+ /** whether the audio plays at constant volume across the scene. */
4185
+ global?: boolean | undefined;
4144
4186
  }
4145
4187
 
4146
4188
  /**
package/dist/beta.d.ts CHANGED
@@ -90,8 +90,32 @@ export declare namespace AppendValueOperation {
90
90
  */
91
91
  export declare function areConnected(parcels: Coords[]): boolean;
92
92
 
93
- /** @public */
94
- export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
93
+ export declare const AudioSource: AudioSourceComponentDefinitionExtended;
94
+
95
+ /**
96
+ * @public
97
+ */
98
+ export declare interface AudioSourceComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioSource> {
99
+ /**
100
+ * @public
101
+ *
102
+ * Set playing=true the sound `$name`
103
+ * @param entity - entity with AudioSource component
104
+ * @param src - the path to the sound to play
105
+ * @param resetCursor - the sound starts at 0 or continues from the current cursor position
106
+ * @returns true in successful playing, false if it doesn't find the AudioSource component
107
+ */
108
+ playSound(entity: Entity, src: string, resetCursor?: boolean): boolean;
109
+ /**
110
+ * @public
111
+ *
112
+ * Set playing=false all sounds
113
+ * @param entity - entity with AudioSource component
114
+ * @param resetCursor - the sound stops at 0 or at the current cursor position
115
+ * @returns true in successful stopping, false if it doesn't find the AudioSource component
116
+ */
117
+ stopSound(entity: Entity, resetCursor?: boolean): boolean;
118
+ }
95
119
 
96
120
  /** @public */
97
121
  export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
@@ -1487,6 +1511,12 @@ export declare function createInputSystem(engine: IEngine): IInputSystem;
1487
1511
  */
1488
1512
  export declare function createPointerEventsSystem(engine: IEngine, inputSystem: IInputSystem): PointerEventsSystem;
1489
1513
 
1514
+ /**
1515
+ * @public
1516
+ * @returns tween helper to be used on the scene
1517
+ */
1518
+ export declare function createTweenSystem(engine: IEngine): TweenSystem;
1519
+
1490
1520
  /**
1491
1521
  * Transform parenting: cyclic dependency checker
1492
1522
  * It checks only in modified Transforms
@@ -1989,6 +2019,7 @@ export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefin
1989
2019
  * @public
1990
2020
  */
1991
2021
  export declare interface IEngine {
2022
+ _id: number;
1992
2023
  /**
1993
2024
  * @public
1994
2025
  * Increment the used entity counter and return the next one.
@@ -4098,6 +4129,13 @@ export declare namespace PBAnimator {
4098
4129
  * Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
4099
4130
  * the scene and declared in its manifest. The name was chosen because the URL use-case will
4100
4131
  * eventually be supported.
4132
+ *
4133
+ * `playing=true` when it's previously `playing=true`
4134
+ * a) if clip is playing and `current_time` is NOT SET, the clip remains in the current `current_time`
4135
+ * b) if clip is stopped or `current_time` is set, the clip is played from the `current_time` (if set) or from the beginning
4136
+ *
4137
+ * If other property (volume, loop, pitch) is changed while playing, the clip is keep playing with the new properties
4138
+ * Changing `audio_clip_url` while playing stops the current clip and plays the new one (as a new instance)
4101
4139
  */
4102
4140
  /**
4103
4141
  * @public
@@ -4113,6 +4151,10 @@ export declare interface PBAudioSource {
4113
4151
  pitch?: number | undefined;
4114
4152
  /** the clip path as given in the `files` array of the scene's manifest. */
4115
4153
  audioClipUrl: string;
4154
+ /** specifies the current playback time of the clip in seconds (default: 0). */
4155
+ currentTime?: number | undefined;
4156
+ /** whether the audio plays at constant volume across the scene. */
4157
+ global?: boolean | undefined;
4116
4158
  }
4117
4159
 
4118
4160
  /**
@@ -90,8 +90,32 @@ export declare namespace AppendValueOperation {
90
90
  */
91
91
  export declare function areConnected(parcels: Coords[]): boolean;
92
92
 
93
- /** @public */
94
- export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAudioSource>;
93
+ export declare const AudioSource: AudioSourceComponentDefinitionExtended;
94
+
95
+ /**
96
+ * @public
97
+ */
98
+ export declare interface AudioSourceComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioSource> {
99
+ /**
100
+ * @public
101
+ *
102
+ * Set playing=true the sound `$name`
103
+ * @param entity - entity with AudioSource component
104
+ * @param src - the path to the sound to play
105
+ * @param resetCursor - the sound starts at 0 or continues from the current cursor position
106
+ * @returns true in successful playing, false if it doesn't find the AudioSource component
107
+ */
108
+ playSound(entity: Entity, src: string, resetCursor?: boolean): boolean;
109
+ /**
110
+ * @public
111
+ *
112
+ * Set playing=false all sounds
113
+ * @param entity - entity with AudioSource component
114
+ * @param resetCursor - the sound stops at 0 or at the current cursor position
115
+ * @returns true in successful stopping, false if it doesn't find the AudioSource component
116
+ */
117
+ stopSound(entity: Entity, resetCursor?: boolean): boolean;
118
+ }
95
119
 
96
120
  /** @public */
97
121
  export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
@@ -1487,6 +1511,12 @@ export declare function createInputSystem(engine: IEngine): IInputSystem;
1487
1511
  */
1488
1512
  export declare function createPointerEventsSystem(engine: IEngine, inputSystem: IInputSystem): PointerEventsSystem;
1489
1513
 
1514
+ /**
1515
+ * @public
1516
+ * @returns tween helper to be used on the scene
1517
+ */
1518
+ export declare function createTweenSystem(engine: IEngine): TweenSystem;
1519
+
1490
1520
  /**
1491
1521
  * Transform parenting: cyclic dependency checker
1492
1522
  * It checks only in modified Transforms
@@ -1989,6 +2019,7 @@ export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefin
1989
2019
  * @public
1990
2020
  */
1991
2021
  export declare interface IEngine {
2022
+ _id: number;
1992
2023
  /**
1993
2024
  * @public
1994
2025
  * Increment the used entity counter and return the next one.
@@ -4098,6 +4129,13 @@ export declare namespace PBAnimator {
4098
4129
  * Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
4099
4130
  * the scene and declared in its manifest. The name was chosen because the URL use-case will
4100
4131
  * eventually be supported.
4132
+ *
4133
+ * `playing=true` when it's previously `playing=true`
4134
+ * a) if clip is playing and `current_time` is NOT SET, the clip remains in the current `current_time`
4135
+ * b) if clip is stopped or `current_time` is set, the clip is played from the `current_time` (if set) or from the beginning
4136
+ *
4137
+ * If other property (volume, loop, pitch) is changed while playing, the clip is keep playing with the new properties
4138
+ * Changing `audio_clip_url` while playing stops the current clip and plays the new one (as a new instance)
4101
4139
  */
4102
4140
  /**
4103
4141
  * @public
@@ -4113,6 +4151,10 @@ export declare interface PBAudioSource {
4113
4151
  pitch?: number | undefined;
4114
4152
  /** the clip path as given in the `files` array of the scene's manifest. */
4115
4153
  audioClipUrl: string;
4154
+ /** specifies the current playback time of the clip in seconds (default: 0). */
4155
+ currentTime?: number | undefined;
4156
+ /** whether the audio plays at constant volume across the scene. */
4157
+ global?: boolean | undefined;
4116
4158
  }
4117
4159
 
4118
4160
  /**