@dcl/playground-assets 7.22.1 → 7.22.2-23601767788.commit-ff97f2f

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
3
  "description": "",
4
- "version": "7.22.1",
4
+ "version": "7.22.2-23601767788.commit-ff97f2f",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -35,5 +35,5 @@
35
35
  },
36
36
  "types": "./index.d.ts",
37
37
  "typings": "./index.d.ts",
38
- "commit": "02288870c7c740e4dcd970c6b4fc1dd4f81c5943"
38
+ "commit": "ff97f2f45a5d3f23080fb3f22de85711b15f0858"
39
39
  }
@@ -7,7 +7,8 @@ import {
7
7
  InputAction,
8
8
  PBPointerEvents_Entry,
9
9
  PointerEvents,
10
- PointerEventType
10
+ PointerEventType,
11
+ InteractionType
11
12
  } from '@dcl/sdk/ecs'
12
13
 
13
14
  // Cube factory
@@ -29,8 +30,10 @@ createCube(15, 1, 15, [
29
30
  button: InputAction.IA_PRIMARY,
30
31
  hoverText: 'PrimaryDown',
31
32
  maxDistance: 5,
32
- showFeedback: true
33
- }
33
+ showFeedback: true,
34
+ priority: 0
35
+ },
36
+ interactionType: InteractionType.CURSOR
34
37
  }
35
38
  ])
36
39
 
@@ -41,9 +44,11 @@ createCube(13, 1, 15, [
41
44
  button: InputAction.IA_SECONDARY,
42
45
  hoverText: 'Secondary Up',
43
46
  maxDistance: 5,
44
- showFeedback: true
47
+ showFeedback: true,
48
+ priority: 0
49
+ },
50
+ interactionType: InteractionType.CURSOR
45
51
  }
46
- }
47
52
  ])
48
53
 
49
54
  createCube(11, 1, 15, [
@@ -53,7 +58,9 @@ createCube(11, 1, 15, [
53
58
  button: InputAction.IA_ANY,
54
59
  hoverText: 'Infinity Hover',
55
60
  maxDistance: 10000000,
56
- showFeedback: true
57
- }
61
+ showFeedback: true,
62
+ priority: 0
63
+ },
64
+ interactionType: InteractionType.PROXIMITY
58
65
  }
59
66
  ])
@@ -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>>;
@@ -2034,6 +2094,7 @@ export declare type EventSystemOptions = {
2034
2094
  showFeedback?: boolean;
2035
2095
  showHighlight?: boolean;
2036
2096
  maxPlayerDistance?: number;
2097
+ priority?: number;
2037
2098
  };
2038
2099
 
2039
2100
  /**
@@ -2696,7 +2757,8 @@ export declare const enum InputAction {
2696
2757
  IA_ACTION_3 = 10,
2697
2758
  IA_ACTION_4 = 11,
2698
2759
  IA_ACTION_5 = 12,
2699
- IA_ACTION_6 = 13
2760
+ IA_ACTION_6 = 13,
2761
+ IA_MODIFIER = 14
2700
2762
  }
2701
2763
 
2702
2764
  export declare const InputModifier: InputModifierComponentDefinitionExtended;
@@ -2744,6 +2806,14 @@ export declare type InstanceCompositeOptions = {
2744
2806
  alreadyRequestedSrc?: Set<string>;
2745
2807
  };
2746
2808
 
2809
+ /**
2810
+ * @public
2811
+ */
2812
+ export declare const enum InteractionType {
2813
+ CURSOR = 0,
2814
+ PROXIMITY = 1
2815
+ }
2816
+
2747
2817
  /**
2748
2818
  * @public
2749
2819
  */
@@ -4456,6 +4526,45 @@ export declare namespace PBAssetLoadLoadingState {
4456
4526
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAssetLoadLoadingState;
4457
4527
  }
4458
4528
 
4529
+ /**
4530
+ * @public
4531
+ */
4532
+ export declare interface PBAudioAnalysis {
4533
+ /** Parameters section */
4534
+ mode: PBAudioAnalysisMode;
4535
+ /** Used only when mode == MODE_LOGARITHMIC */
4536
+ amplitudeGain?: number | undefined;
4537
+ /** End when mode == MODE_LOGARITHMIC */
4538
+ bandsGain?: number | undefined;
4539
+ /** Result section */
4540
+ amplitude: number;
4541
+ /** Protobuf doesn't support fixed arrays -> 8 band fields */
4542
+ band0: number;
4543
+ band1: number;
4544
+ band2: number;
4545
+ band3: number;
4546
+ band4: number;
4547
+ band5: number;
4548
+ band6: number;
4549
+ band7: number;
4550
+ }
4551
+
4552
+ /**
4553
+ * @public
4554
+ */
4555
+ export declare namespace PBAudioAnalysis {
4556
+ export function encode(message: PBAudioAnalysis, writer?: _m0.Writer): _m0.Writer;
4557
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioAnalysis;
4558
+ }
4559
+
4560
+ /**
4561
+ * @public
4562
+ */
4563
+ export declare const enum PBAudioAnalysisMode {
4564
+ MODE_RAW = 0,
4565
+ MODE_LOGARITHMIC = 1
4566
+ }
4567
+
4459
4568
  /**
4460
4569
  * @public
4461
4570
  */
@@ -4645,6 +4754,42 @@ export declare namespace PBAvatarEquippedData {
4645
4754
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
4646
4755
  }
4647
4756
 
4757
+ /**
4758
+ * The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
4759
+ * as the avatar movement speed, jump height etc.
4760
+ */
4761
+ /**
4762
+ * @public
4763
+ */
4764
+ export declare interface PBAvatarLocomotionSettings {
4765
+ /** Maximum speed when walking (in meters per second) */
4766
+ walkSpeed?: number | undefined;
4767
+ /** Maximum speed when jogging (in meters per second) */
4768
+ jogSpeed?: number | undefined;
4769
+ /** Maximum speed when running (in meters per second) */
4770
+ runSpeed?: number | undefined;
4771
+ /** Height of a regular jump (in meters) */
4772
+ jumpHeight?: number | undefined;
4773
+ /** Height of a jump while running (in meters) */
4774
+ runJumpHeight?: number | undefined;
4775
+ /** Cooldown time after a hard landing before the avatar can move again (in seconds) */
4776
+ hardLandingCooldown?: number | undefined;
4777
+ /** Height of the double jump (in meters) */
4778
+ doubleJumpHeight?: number | undefined;
4779
+ /** Maximum speed when gliding (in meters per second) */
4780
+ glidingSpeed?: number | undefined;
4781
+ /** Maximum falling speed when gliding (in meters per second) */
4782
+ glidingFallingSpeed?: number | undefined;
4783
+ }
4784
+
4785
+ /**
4786
+ * @public
4787
+ */
4788
+ export declare namespace PBAvatarLocomotionSettings {
4789
+ export function encode(message: PBAvatarLocomotionSettings, writer?: _m0.Writer): _m0.Writer;
4790
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings;
4791
+ }
4792
+
4648
4793
  /**
4649
4794
  * The AvatarModifierArea component can be attached to an Entity to define a region of space where
4650
4795
  * avatar behavior changes.
@@ -5552,6 +5697,8 @@ export declare interface PBPointerEvents_Entry {
5552
5697
  eventType: PointerEventType;
5553
5698
  /** additional configuration for this detection */
5554
5699
  eventInfo: PBPointerEvents_Info | undefined;
5700
+ /** the type of interaction source (default 0 == CURSOR) */
5701
+ interactionType?: InteractionType | undefined;
5555
5702
  }
5556
5703
 
5557
5704
  /**
@@ -5578,6 +5725,8 @@ export declare interface PBPointerEvents_Info {
5578
5725
  showHighlight?: boolean | undefined;
5579
5726
  /** range of interaction from the avatar's position (default 0) */
5580
5727
  maxPlayerDistance?: number | undefined;
5728
+ /** resolution order when multiple events overlap, higher wins (default 0) */
5729
+ priority?: number | undefined;
5581
5730
  }
5582
5731
 
5583
5732
  /**
@@ -6454,6 +6603,7 @@ export declare namespace PBVideoPlayer {
6454
6603
  * an 'instant' transition (like using speed/time = 0)
6455
6604
  * * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
6456
6605
  * the holding entity transform).
6606
+ * * The fov defines the Field of View of the virtual camera
6457
6607
  */
6458
6608
  /**
6459
6609
  * @public
@@ -6461,6 +6611,8 @@ export declare namespace PBVideoPlayer {
6461
6611
  export declare interface PBVirtualCamera {
6462
6612
  defaultTransition?: CameraTransition | undefined;
6463
6613
  lookAtEntity?: number | undefined;
6614
+ /** default: 60 */
6615
+ fov?: number | undefined;
6464
6616
  }
6465
6617
 
6466
6618
  /**
@@ -6736,6 +6888,30 @@ export declare interface PointerEventsSystem {
6736
6888
  * @param entity - Entity where the callback was attached
6737
6889
  */
6738
6890
  removeOnPointerHoverLeave(entity: Entity): void;
6891
+ /**
6892
+ * @public
6893
+ * Remove the callback for onProximityDown event
6894
+ * @param entity - Entity where the callback was attached
6895
+ */
6896
+ removeOnProximityDown(entity: Entity): void;
6897
+ /**
6898
+ * @public
6899
+ * Remove the callback for onProximityUp event
6900
+ * @param entity - Entity where the callback was attached
6901
+ */
6902
+ removeOnProximityUp(entity: Entity): void;
6903
+ /**
6904
+ * @public
6905
+ * Remove the callback for onProximityEnter event
6906
+ * @param entity - Entity where the callback was attached
6907
+ */
6908
+ removeOnProximityEnter(entity: Entity): void;
6909
+ /**
6910
+ * @public
6911
+ * Remove the callback for onProximityLeave event
6912
+ * @param entity - Entity where the callback was attached
6913
+ */
6914
+ removeOnProximityLeave(entity: Entity): void;
6739
6915
  /**
6740
6916
  * @public
6741
6917
  * Execute callback when the user press the InputButton pointing at the entity
@@ -6790,6 +6966,46 @@ export declare interface PointerEventsSystem {
6790
6966
  entity: Entity;
6791
6967
  opts?: Partial<EventSystemOptions>;
6792
6968
  }, cb: EventSystemCallback): void;
6969
+ /**
6970
+ * @public
6971
+ * Execute callback when the user presses the proximity button on the entity
6972
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
6973
+ * @param cb - Function to execute when click fires
6974
+ */
6975
+ onProximityDown(pointerData: {
6976
+ entity: Entity;
6977
+ opts?: Partial<EventSystemOptions>;
6978
+ }, cb: EventSystemCallback): void;
6979
+ /**
6980
+ * @public
6981
+ * Execute callback when the user releases the proximity button on the entity
6982
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
6983
+ * @param cb - Function to execute when event fires
6984
+ */
6985
+ onProximityUp(pointerData: {
6986
+ entity: Entity;
6987
+ opts?: Partial<EventSystemOptions>;
6988
+ }, cb: EventSystemCallback): void;
6989
+ /**
6990
+ * @public
6991
+ * Execute callback when the entity enters the proximity zone of the user
6992
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
6993
+ * @param cb - Function to execute when event fires
6994
+ */
6995
+ onProximityEnter(pointerData: {
6996
+ entity: Entity;
6997
+ opts?: Partial<EventSystemOptions>;
6998
+ }, cb: EventSystemCallback): void;
6999
+ /**
7000
+ * @public
7001
+ * Execute callback when the entity leaves the proximity zone of the user
7002
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
7003
+ * @param cb - Function to execute when event fires
7004
+ */
7005
+ onProximityLeave(pointerData: {
7006
+ entity: Entity;
7007
+ opts?: Partial<EventSystemOptions>;
7008
+ }, cb: EventSystemCallback): void;
6793
7009
  }
6794
7010
 
6795
7011
  /**
@@ -6806,7 +7022,9 @@ export declare const enum PointerEventType {
6806
7022
  PET_UP = 0,
6807
7023
  PET_DOWN = 1,
6808
7024
  PET_HOVER_ENTER = 2,
6809
- PET_HOVER_LEAVE = 3
7025
+ PET_HOVER_LEAVE = 3,
7026
+ PET_PROXIMITY_ENTER = 4,
7027
+ PET_PROXIMITY_LEAVE = 5
6810
7028
  }
6811
7029
 
6812
7030
  /**