@dcl/playground-assets 7.20.4-22492765829.commit-3a83d2f → 7.20.4-22561917759.commit-d944d0d

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
@@ -115,6 +115,61 @@ export declare const assetLoadLoadingStateSystem: AssetLoadLoadingStateSystem;
115
115
  */
116
116
  export declare type AssetLoadLoadingStateSystemCallback = (event: DeepReadonlyObject<PBAssetLoadLoadingState>) => void;
117
117
 
118
+ export declare const AudioAnalysis: AudioAnalysisComponentDefinitionExtended;
119
+
120
+ export declare interface AudioAnalysisComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBAudioAnalysis> {
121
+ /**
122
+ * Reads the component data of `entity` into the provided `out` view.
123
+ *
124
+ * @throws Error if the entity does not have an AudioAnalysis component.
125
+ * @param entity - The entity whose AudioAnalysis data will be read.
126
+ * @param out - An existing AudioAnalysisView to populate with the latest values.
127
+ */
128
+ readIntoView(entity: Entity, out: AudioAnalysisView): void;
129
+ /**
130
+ * Attempts to read the component data of `entity` into the provided `out` view.
131
+ *
132
+ * @returns `true` if the component exists and data was written into `out`,
133
+ * `false` if the entity does not have an AudioAnalysis component.
134
+ * @param entity - The entity whose AudioAnalysis data will be read.
135
+ * @param out - An existing AudioAnalysisView to populate.
136
+ */
137
+ tryReadIntoView(entity: Entity, out: AudioAnalysisView): boolean;
138
+ /**
139
+ * Creates an AudioAnalysis component for the given `entity`.
140
+ *
141
+ * If a component already exists on the entity, this call fails (does not replace).
142
+ *
143
+ * @param entity - The entity to attach the component to.
144
+ * @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
145
+ * @param amplitudeGain - Optional amplitude gain multiplier.
146
+ * @param bandsGain - Optional gain multiplier applied to all frequency bands.
147
+ */
148
+ createAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
149
+ amplitudeGain?: number, bandsGain?: number): void;
150
+ /**
151
+ * Creates the AudioAnalysis component if missing, or replaces the existing one.
152
+ *
153
+ * @param entity - The target entity.
154
+ * @param mode - Analysis mode. Defaults to `PBAudioAnalysisMode.MODE_LOGARITHMIC`.
155
+ * @param amplitudeGain - Optional amplitude gain multiplier.
156
+ * @param bandsGain - Optional gain multiplier applied to the frequency bands.
157
+ */
158
+ createOrReplaceAudioAnalysis(entity: Entity, mode?: PBAudioAnalysisMode, // default is PBAudioAnalysisMode.MODE_LOGARITHMIC
159
+ amplitudeGain?: number, bandsGain?: number): void;
160
+ }
161
+
162
+ /**
163
+ * A read-only JavaScript-friendly view of AudioAnalysis ECS data.
164
+ *
165
+ * `amplitude` represents the aggregated signal strength.
166
+ * `bands` represents the processed frequency bands.
167
+ */
168
+ export declare type AudioAnalysisView = {
169
+ amplitude: number;
170
+ bands: number[];
171
+ };
172
+
118
173
  /** @public */
119
174
  export declare const AudioEvent: GrowOnlyValueSetComponentDefinition<PBAudioEvent>;
120
175
 
@@ -209,6 +264,9 @@ export declare const AvatarEmoteCommand: GrowOnlyValueSetComponentDefinition<PBA
209
264
  /** @public */
210
265
  export declare const AvatarEquippedData: LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>;
211
266
 
267
+ /** @public */
268
+ export declare const AvatarLocomotionSettings: LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>;
269
+
212
270
  /** @public */
213
271
  export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
214
272
 
@@ -1321,6 +1379,7 @@ export declare const componentDefinitionByName: {
1321
1379
  "core::Animator": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAnimator>>;
1322
1380
  "core::AssetLoad": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAssetLoad>>;
1323
1381
  "core::AssetLoadLoadingState": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAssetLoadLoadingState>>;
1382
+ "core::AudioAnalysis": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioAnalysis>>;
1324
1383
  "core::AudioEvent": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAudioEvent>>;
1325
1384
  "core::AudioSource": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioSource>>;
1326
1385
  "core::AudioStream": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAudioStream>>;
@@ -1328,6 +1387,7 @@ export declare const componentDefinitionByName: {
1328
1387
  "core::AvatarBase": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarBase>>;
1329
1388
  "core::AvatarEmoteCommand": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBAvatarEmoteCommand>>;
1330
1389
  "core::AvatarEquippedData": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarEquippedData>>;
1390
+ "core::AvatarLocomotionSettings": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarLocomotionSettings>>;
1331
1391
  "core::AvatarModifierArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>>;
1332
1392
  "core::AvatarShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBAvatarShape>>;
1333
1393
  "core::Billboard": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBBillboard>>;
@@ -2685,7 +2745,8 @@ export declare const enum InputAction {
2685
2745
  IA_ACTION_3 = 10,
2686
2746
  IA_ACTION_4 = 11,
2687
2747
  IA_ACTION_5 = 12,
2688
- IA_ACTION_6 = 13
2748
+ IA_ACTION_6 = 13,
2749
+ IA_MODIFIER = 14
2689
2750
  }
2690
2751
 
2691
2752
  export declare const InputModifier: InputModifierComponentDefinitionExtended;
@@ -2733,6 +2794,14 @@ export declare type InstanceCompositeOptions = {
2733
2794
  alreadyRequestedSrc?: Set<string>;
2734
2795
  };
2735
2796
 
2797
+ /**
2798
+ * @public
2799
+ */
2800
+ export declare const enum InteractionType {
2801
+ CURSOR = 0,
2802
+ PROXIMITY = 1
2803
+ }
2804
+
2736
2805
  /**
2737
2806
  * @public
2738
2807
  */
@@ -3911,6 +3980,88 @@ export declare namespace MoveContinuous {
3911
3980
  export function decode(input: _m0.Reader | Uint8Array, length?: number): MoveContinuous;
3912
3981
  }
3913
3982
 
3983
+ /**
3984
+ * @public
3985
+ */
3986
+ export declare interface MoveRotateScale {
3987
+ positionStart: PBVector3 | undefined;
3988
+ positionEnd: PBVector3 | undefined;
3989
+ rotationStart: PBQuaternion | undefined;
3990
+ rotationEnd: PBQuaternion | undefined;
3991
+ scaleStart: PBVector3 | undefined;
3992
+ scaleEnd: PBVector3 | undefined;
3993
+ }
3994
+
3995
+ /**
3996
+ * @public
3997
+ */
3998
+ export declare namespace MoveRotateScale {
3999
+ export function encode(message: MoveRotateScale, writer?: _m0.Writer): _m0.Writer;
4000
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): MoveRotateScale;
4001
+ }
4002
+
4003
+ /**
4004
+ * @public
4005
+ */
4006
+ export declare interface MoveRotateScaleContinuous {
4007
+ positionDirection: PBVector3 | undefined;
4008
+ rotationDirection: PBQuaternion | undefined;
4009
+ scaleDirection: PBVector3 | undefined;
4010
+ speed: number;
4011
+ }
4012
+
4013
+ /**
4014
+ * @public
4015
+ */
4016
+ export declare namespace MoveRotateScaleContinuous {
4017
+ export function encode(message: MoveRotateScaleContinuous, writer?: _m0.Writer): _m0.Writer;
4018
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): MoveRotateScaleContinuous;
4019
+ }
4020
+
4021
+ /**
4022
+ * @public
4023
+ * Partial params for Tween.Mode.MoveRotateScaleContinuous(). At least one of position, rotation, or scale must be provided.
4024
+ */
4025
+ export declare interface MoveRotateScaleContinuousModeParams {
4026
+ /** Position direction for continuous movement. Optional. */
4027
+ position?: {
4028
+ direction: PBVector3;
4029
+ };
4030
+ /** Rotation direction for continuous rotation. Optional. */
4031
+ rotation?: {
4032
+ direction: PBQuaternion;
4033
+ };
4034
+ /** Scale direction for continuous scale change. Optional. */
4035
+ scale?: {
4036
+ direction: PBVector3;
4037
+ };
4038
+ /** Speed of the animation per second. */
4039
+ speed: number;
4040
+ }
4041
+
4042
+ /**
4043
+ * @public
4044
+ * Partial params for Tween.Mode.MoveRotateScale(). At least one of position, rotation, or scale must be provided.
4045
+ * Use this when building a mode for Tween.createOrReplace() or TweenSequence (e.g. only positionStart/positionEnd).
4046
+ */
4047
+ export declare interface MoveRotateScaleModeParams {
4048
+ /** Position tween (start → end). Optional. */
4049
+ position?: {
4050
+ start: PBVector3;
4051
+ end: PBVector3;
4052
+ };
4053
+ /** Rotation tween (start → end). Optional. */
4054
+ rotation?: {
4055
+ start: PBQuaternion;
4056
+ end: PBQuaternion;
4057
+ };
4058
+ /** Scale tween (start → end). Optional. */
4059
+ scale?: {
4060
+ start: PBVector3;
4061
+ end: PBVector3;
4062
+ };
4063
+ }
4064
+
3914
4065
  export declare const Name: NameComponent;
3915
4066
 
3916
4067
  export declare type NameComponent = LastWriteWinElementSetComponentDefinition<NameType>;
@@ -4389,6 +4540,45 @@ export declare namespace PBAssetLoadLoadingState {
4389
4540
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAssetLoadLoadingState;
4390
4541
  }
4391
4542
 
4543
+ /**
4544
+ * @public
4545
+ */
4546
+ export declare interface PBAudioAnalysis {
4547
+ /** Parameters section */
4548
+ mode: PBAudioAnalysisMode;
4549
+ /** Used only when mode == MODE_LOGARITHMIC */
4550
+ amplitudeGain?: number | undefined;
4551
+ /** End when mode == MODE_LOGARITHMIC */
4552
+ bandsGain?: number | undefined;
4553
+ /** Result section */
4554
+ amplitude: number;
4555
+ /** Protobuf doesn't support fixed arrays -> 8 band fields */
4556
+ band0: number;
4557
+ band1: number;
4558
+ band2: number;
4559
+ band3: number;
4560
+ band4: number;
4561
+ band5: number;
4562
+ band6: number;
4563
+ band7: number;
4564
+ }
4565
+
4566
+ /**
4567
+ * @public
4568
+ */
4569
+ export declare namespace PBAudioAnalysis {
4570
+ export function encode(message: PBAudioAnalysis, writer?: _m0.Writer): _m0.Writer;
4571
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioAnalysis;
4572
+ }
4573
+
4574
+ /**
4575
+ * @public
4576
+ */
4577
+ export declare const enum PBAudioAnalysisMode {
4578
+ MODE_RAW = 0,
4579
+ MODE_LOGARITHMIC = 1
4580
+ }
4581
+
4392
4582
  /**
4393
4583
  * @public
4394
4584
  */
@@ -4578,6 +4768,36 @@ export declare namespace PBAvatarEquippedData {
4578
4768
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
4579
4769
  }
4580
4770
 
4771
+ /**
4772
+ * The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
4773
+ * as the avatar movement speed, jump height etc.
4774
+ */
4775
+ /**
4776
+ * @public
4777
+ */
4778
+ export declare interface PBAvatarLocomotionSettings {
4779
+ /** Maximum speed when walking (in meters per second) */
4780
+ walkSpeed?: number | undefined;
4781
+ /** Maximum speed when jogging (in meters per second) */
4782
+ jogSpeed?: number | undefined;
4783
+ /** Maximum speed when running (in meters per second) */
4784
+ runSpeed?: number | undefined;
4785
+ /** Height of a regular jump (in meters) */
4786
+ jumpHeight?: number | undefined;
4787
+ /** Height of a jump while running (in meters) */
4788
+ runJumpHeight?: number | undefined;
4789
+ /** Cooldown time after a hard landing before the avatar can move again (in seconds) */
4790
+ hardLandingCooldown?: number | undefined;
4791
+ }
4792
+
4793
+ /**
4794
+ * @public
4795
+ */
4796
+ export declare namespace PBAvatarLocomotionSettings {
4797
+ export function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
4798
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
4799
+ }
4800
+
4581
4801
  /**
4582
4802
  * The AvatarModifierArea component can be attached to an Entity to define a region of space where
4583
4803
  * avatar behavior changes.
@@ -5430,6 +5650,8 @@ export declare interface PBPointerEvents_Entry {
5430
5650
  eventType: PointerEventType;
5431
5651
  /** additional configuration for this detection */
5432
5652
  eventInfo: PBPointerEvents_Info | undefined;
5653
+ /** the type of interaction source (default 0 == CURSOR) */
5654
+ interactionType?: InteractionType | undefined;
5433
5655
  }
5434
5656
 
5435
5657
  /**
@@ -5456,6 +5678,8 @@ export declare interface PBPointerEvents_Info {
5456
5678
  showHighlight?: boolean | undefined;
5457
5679
  /** range of interaction from the avatar's position (default 0) */
5458
5680
  maxPlayerDistance?: number | undefined;
5681
+ /** resolution order when multiple events overlap, higher wins (default 0) */
5682
+ priority?: number | undefined;
5459
5683
  }
5460
5684
 
5461
5685
  /**
@@ -5892,6 +6116,12 @@ export declare interface PBTween {
5892
6116
  } | {
5893
6117
  $case: "textureMoveContinuous";
5894
6118
  textureMoveContinuous: TextureMoveContinuous;
6119
+ } | {
6120
+ $case: "moveRotateScale";
6121
+ moveRotateScale: MoveRotateScale;
6122
+ } | {
6123
+ $case: "moveRotateScaleContinuous";
6124
+ moveRotateScaleContinuous: MoveRotateScaleContinuous;
5895
6125
  } | undefined;
5896
6126
  /** default true (pause or running) */
5897
6127
  playing?: boolean | undefined;
@@ -6329,6 +6559,7 @@ export declare namespace PBVideoPlayer {
6329
6559
  * an 'instant' transition (like using speed/time = 0)
6330
6560
  * * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
6331
6561
  * the holding entity transform).
6562
+ * * The fov defines the Field of View of the virtual camera
6332
6563
  */
6333
6564
  /**
6334
6565
  * @public
@@ -6336,6 +6567,8 @@ export declare namespace PBVideoPlayer {
6336
6567
  export declare interface PBVirtualCamera {
6337
6568
  defaultTransition?: CameraTransition | undefined;
6338
6569
  lookAtEntity?: number | undefined;
6570
+ /** default: 60 */
6571
+ fov?: number | undefined;
6339
6572
  }
6340
6573
 
6341
6574
  /**
@@ -6595,7 +6828,9 @@ export declare const enum PointerEventType {
6595
6828
  PET_UP = 0,
6596
6829
  PET_DOWN = 1,
6597
6830
  PET_HOVER_ENTER = 2,
6598
- PET_HOVER_LEAVE = 3
6831
+ PET_HOVER_LEAVE = 3,
6832
+ PET_PROXIMITY_ENTER = 4,
6833
+ PET_PROXIMITY_LEAVE = 5
6599
6834
  }
6600
6835
 
6601
6836
  /**
@@ -7812,6 +8047,26 @@ export declare namespace Schemas {
7812
8047
  }) => void;
7813
8048
  }
7814
8049
 
8050
+ /**
8051
+ * @public
8052
+ * Parameters for setMoveRotateScaleContinuous. At least one of position, rotation, or scale must be provided.
8053
+ */
8054
+ export declare interface SetMoveRotateScaleContinuousParams extends MoveRotateScaleContinuousModeParams {
8055
+ /** Duration in milliseconds (defaults to 0 for infinite). */
8056
+ duration?: number;
8057
+ }
8058
+
8059
+ /**
8060
+ * @public
8061
+ * Parameters for setMoveRotateScale. At least one of position, rotation, or scale must be provided.
8062
+ */
8063
+ export declare interface SetMoveRotateScaleParams extends MoveRotateScaleModeParams {
8064
+ /** Duration of the tween in milliseconds. */
8065
+ duration: number;
8066
+ /** Easing function (defaults to EF_LINEAR). */
8067
+ easingFunction?: EasingFunction;
8068
+ }
8069
+
7815
8070
  /** @public */
7816
8071
  export declare const SkyboxTime: LastWriteWinElementSetComponentDefinition<PBSkyboxTime>;
7817
8072
 
@@ -8413,6 +8668,26 @@ export declare interface TweenComponentDefinitionExtended extends LastWriteWinEl
8413
8668
  * @param duration - duration of the tween in milliseconds (defaults to 0 for infinite)
8414
8669
  */
8415
8670
  setTextureMoveContinuous(entity: Entity, direction: PBVector2, speed: number, movementType?: TextureMovementType, duration?: number): void;
8671
+ /**
8672
+ * @public
8673
+ *
8674
+ * Creates or replaces a move-rotate-scale tween component that simultaneously animates
8675
+ * an entity's position, rotation, and/or scale from start to end. Provide only the
8676
+ * properties you need (at least one of position, rotation, or scale).
8677
+ * @param entity - entity to apply the tween to
8678
+ * @param params - object with optional position, rotation, scale (each with start/end), duration, and optional easingFunction
8679
+ */
8680
+ setMoveRotateScale(entity: Entity, params: SetMoveRotateScaleParams): void;
8681
+ /**
8682
+ * @public
8683
+ *
8684
+ * Creates or replaces a continuous move-rotate-scale tween component that simultaneously
8685
+ * moves, rotates, and/or scales an entity continuously. Provide only the properties
8686
+ * you need (at least one of position, rotation, or scale).
8687
+ * @param entity - entity to apply the tween to
8688
+ * @param params - object with optional position, rotation, scale (each with direction), speed, and optional duration
8689
+ */
8690
+ setMoveRotateScaleContinuous(entity: Entity, params: SetMoveRotateScaleContinuousParams): void;
8416
8691
  }
8417
8692
 
8418
8693
  /**
@@ -8447,6 +8722,16 @@ export declare interface TweenHelper {
8447
8722
  * @returns a texture-move-continuous mode tween
8448
8723
  */
8449
8724
  TextureMoveContinuous: (textureMove: TextureMoveContinuous) => PBTween['mode'];
8725
+ /**
8726
+ * @returns a move-rotate-scale mode tween
8727
+ * @param params - partial transform (at least one of position, rotation, scale); omit axes you don't need
8728
+ */
8729
+ MoveRotateScale: (params: MoveRotateScaleModeParams) => PBTween['mode'];
8730
+ /**
8731
+ * @returns a move-rotate-scale-continuous mode tween
8732
+ * @param params - partial transform (at least one of position, rotation, scale) + speed; omit axes you don't need
8733
+ */
8734
+ MoveRotateScaleContinuous: (params: MoveRotateScaleContinuousModeParams) => PBTween['mode'];
8450
8735
  }
8451
8736
 
8452
8737
  /**