@dcl/playground-assets 7.18.2-21453292414.commit-1da934f → 7.18.2-21458377493.commit-ea4f3b6

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.
@@ -90,6 +90,61 @@ export declare namespace AppendValueOperation {
90
90
  */
91
91
  export declare function areConnected(parcels: Coords[]): boolean;
92
92
 
93
+ export declare const AudioAnalysis: AudioAnalysisComponentDefinitionExtended;
94
+
95
+ export declare interface AudioAnalysisComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioAnalysis> {
96
+ /**
97
+ * Reads the component data of `entity` into the provided `out` view.
98
+ *
99
+ * @throws Error if the entity does not have an AudioAnalysis component.
100
+ * @param entity - The entity whose AudioAnalysis data will be read.
101
+ * @param out - An existing AudioAnalysisView to populate with the latest values.
102
+ */
103
+ readIntoView(entity: Entity, out: AudioAnalysisView): void;
104
+ /**
105
+ * Attempts to read the component data of `entity` into the provided `out` view.
106
+ *
107
+ * @returns `true` if the component exists and data was written into `out`,
108
+ * `false` if the entity does not have an AudioAnalysis component.
109
+ * @param entity - The entity whose AudioAnalysis data will be read.
110
+ * @param out - An existing AudioAnalysisView to populate.
111
+ */
112
+ tryReadIntoView(entity: Entity, out: AudioAnalysisView): boolean;
113
+ /**
114
+ * Creates an AudioAnalysis component for the given `entity`.
115
+ *
116
+ * If a component already exists on the entity, this call fails (does not replace).
117
+ *
118
+ * @param entity - The entity to attach the component to.
119
+ * @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
120
+ * @param amplitudeGain - Optional amplitude gain multiplier.
121
+ * @param bandsGain - Optional gain multiplier applied to all frequency bands.
122
+ */
123
+ createAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
124
+ amplitudeGain?: number, bandsGain?: number): void;
125
+ /**
126
+ * Creates the AudioAnalysis component if missing, or replaces the existing one.
127
+ *
128
+ * @param entity - The target entity.
129
+ * @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
130
+ * @param amplitudeGain - Optional amplitude gain multiplier.
131
+ * @param bandsGain - Optional gain multiplier applied to the frequency bands.
132
+ */
133
+ createOrReplaceAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
134
+ amplitudeGain?: number, bandsGain?: number): void;
135
+ }
136
+
137
+ /**
138
+ * A read-only JavaScript-friendly view of AudioAnalysis ECS data.
139
+ *
140
+ * `amplitude` represents the aggregated signal strength.
141
+ * `bands` represents the processed frequency bands.
142
+ */
143
+ export declare type AudioAnalysisView = {
144
+ amplitude: number;
145
+ bands: number[];
146
+ };
147
+
93
148
  /** @public */
94
149
  export declare const AudioEvent: GrowOnlyValueSetComponentDefinition<PBAudioEvent>;
95
150
 
@@ -184,6 +239,9 @@ export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBA
184
239
  /** @public */
185
240
  export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
186
241
 
242
+ /** @public */
243
+ export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
244
+
187
245
  /** @public */
188
246
  export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
189
247
 
@@ -1294,6 +1352,7 @@ export declare type ComponentDefinition<T> = LastWriteWinElementSetComponentDefi
1294
1352
  /** public */
1295
1353
  export declare const componentDefinitionByName: {
1296
1354
  "core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
1355
+ "core::AudioAnalysis": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
1297
1356
  "core::AudioEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
1298
1357
  "core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
1299
1358
  "core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
@@ -1301,6 +1360,7 @@ export declare const componentDefinitionByName: {
1301
1360
  "core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
1302
1361
  "core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
1303
1362
  "core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
1363
+ "core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
1304
1364
  "core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
1305
1365
  "core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
1306
1366
  "core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -2004,6 +2064,7 @@ export declare type EventSystemOptions = {
2004
2064
  maxDistance?: number;
2005
2065
  showFeedback?: boolean;
2006
2066
  showHighlight?: boolean;
2067
+ maxPlayerDistance?: number;
2007
2068
  };
2008
2069
 
2009
2070
  /**
@@ -2648,7 +2709,8 @@ export declare const enum InputAction {
2648
2709
  IA_ACTION_3 = 10,
2649
2710
  IA_ACTION_4 = 11,
2650
2711
  IA_ACTION_5 = 12,
2651
- IA_ACTION_6 = 13
2712
+ IA_ACTION_6 = 13,
2713
+ IA_MODIFIER = 14
2652
2714
  }
2653
2715
 
2654
2716
  export declare const InputModifier: InputModifierComponentDefinitionExtended;
@@ -4292,6 +4354,45 @@ export declare namespace PBAnimator {
4292
4354
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAnimator;
4293
4355
  }
4294
4356
 
4357
+ /**
4358
+ * @public
4359
+ */
4360
+ export declare interface PBAudioAnalysis {
4361
+ /** Parameters section */
4362
+ mode: PBAudioAnalysisMode;
4363
+ /** Used only when mode == MODE_LOGARITHMIC */
4364
+ amplitudeGain?: number | undefined;
4365
+ /** End when mode == MODE_LOGARITHMIC */
4366
+ bandsGain?: number | undefined;
4367
+ /** Result section */
4368
+ amplitude: number;
4369
+ /** Protobuf doesn't support fixed arrays -> 8 band fields */
4370
+ band0: number;
4371
+ band1: number;
4372
+ band2: number;
4373
+ band3: number;
4374
+ band4: number;
4375
+ band5: number;
4376
+ band6: number;
4377
+ band7: number;
4378
+ }
4379
+
4380
+ /**
4381
+ * @public
4382
+ */
4383
+ export declare namespace PBAudioAnalysis {
4384
+ export function encode(message: PBAudioAnalysis, writer?: _m0.Writer): _m0.Writer;
4385
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioAnalysis;
4386
+ }
4387
+
4388
+ /**
4389
+ * @public
4390
+ */
4391
+ export declare const enum PBAudioAnalysisMode {
4392
+ MODE_RAW = 0,
4393
+ MODE_LOGARITHMIC = 1
4394
+ }
4395
+
4295
4396
  /**
4296
4397
  * @public
4297
4398
  */
@@ -4481,6 +4582,36 @@ export declare namespace PBAvatarEquippedData {
4481
4582
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
4482
4583
  }
4483
4584
 
4585
+ /**
4586
+ * The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
4587
+ * as the avatar movement speed, jump height etc.
4588
+ */
4589
+ /**
4590
+ * @public
4591
+ */
4592
+ export declare interface PBAvatarLocomotionSettings {
4593
+ /** Maximum speed when walking (in meters per second) */
4594
+ walkSpeed?: number | undefined;
4595
+ /** Maximum speed when jogging (in meters per second) */
4596
+ jogSpeed?: number | undefined;
4597
+ /** Maximum speed when running (in meters per second) */
4598
+ runSpeed?: number | undefined;
4599
+ /** Height of a regular jump (in meters) */
4600
+ jumpHeight?: number | undefined;
4601
+ /** Height of a jump while running (in meters) */
4602
+ runJumpHeight?: number | undefined;
4603
+ /** Cooldown time after a hard landing before the avatar can move again (in seconds) */
4604
+ hardLandingCooldown?: number | undefined;
4605
+ }
4606
+
4607
+ /**
4608
+ * @public
4609
+ */
4610
+ export declare namespace PBAvatarLocomotionSettings {
4611
+ export function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
4612
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
4613
+ }
4614
+
4484
4615
  /**
4485
4616
  * The AvatarModifierArea component can be attached to an Entity to define a region of space where
4486
4617
  * avatar behavior changes.
@@ -5285,6 +5416,29 @@ export declare namespace PBPlayerIdentityData {
5285
5416
  *
5286
5417
  * It also supports simple visual feedback when interactions occur, by showing floating text.
5287
5418
  * More sophisticated feedback requires the use of other components.
5419
+ *
5420
+ * Distance rules
5421
+ * --------------
5422
+ * PointerEvents can enforce interaction range using two independent distance checks:
5423
+ *
5424
+ * - Camera distance (`max_distance`): distance from the active camera to the target entity.
5425
+ * - Player distance (`max_player_distance`): distance from the avatar/player position to the target entity.
5426
+ *
5427
+ * How the interaction checks are combined:
5428
+ *
5429
+ * 1) Only `max_distance` is present
5430
+ * - The interaction is allowed only if the camera distance is <= `max_distance`.
5431
+ *
5432
+ * 2) Only `max_player_distance` is present
5433
+ * - The interaction is allowed only if the player distance is <= `max_player_distance`.
5434
+ *
5435
+ * 3) Both `max_distance` and `max_player_distance` are present
5436
+ * - The interaction is allowed if ANY of the checks passes (OR logic):
5437
+ * (camera distance <= `max_distance`) OR (player distance <= `max_player_distance`).
5438
+ *
5439
+ * 4) Neither `max_distance` nor `max_player_distance` is present
5440
+ * - The system behaves as if `max_distance` were set to its default value (10),
5441
+ * i.e., it uses the camera distance check with a threshold of 10.
5288
5442
  */
5289
5443
  /**
5290
5444
  * @public
@@ -5334,6 +5488,8 @@ export declare interface PBPointerEvents_Info {
5334
5488
  showFeedback?: boolean | undefined;
5335
5489
  /** enable or disable hover highlight (default true) */
5336
5490
  showHighlight?: boolean | undefined;
5491
+ /** range of interaction from the avatar's position (default 0) */
5492
+ maxPlayerDistance?: number | undefined;
5337
5493
  }
5338
5494
 
5339
5495
  /**
@@ -6207,6 +6363,7 @@ export declare namespace PBVideoPlayer {
6207
6363
  * an 'instant' transition (like using speed/time = 0)
6208
6364
  * * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
6209
6365
  * the holding entity transform).
6366
+ * * The fov defines the Field of View of the virtual camera
6210
6367
  */
6211
6368
  /**
6212
6369
  * @public
@@ -6214,6 +6371,8 @@ export declare namespace PBVideoPlayer {
6214
6371
  export declare interface PBVirtualCamera {
6215
6372
  defaultTransition?: CameraTransition | undefined;
6216
6373
  lookAtEntity?: number | undefined;
6374
+ /** default: 60 */
6375
+ fov?: number | undefined;
6217
6376
  }
6218
6377
 
6219
6378
  /**