@dcl/playground-assets 7.22.1 → 7.22.2-23600507492.commit-5f7f8a0

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-23600507492.commit-5f7f8a0",
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": "5f7f8a09410c9cb0e2e0e0d669dfc3733e76a8e8"
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
  ])
@@ -2034,6 +2034,7 @@ export declare type EventSystemOptions = {
2034
2034
  showFeedback?: boolean;
2035
2035
  showHighlight?: boolean;
2036
2036
  maxPlayerDistance?: number;
2037
+ priority?: number;
2037
2038
  };
2038
2039
 
2039
2040
  /**
@@ -2744,6 +2745,14 @@ export declare type InstanceCompositeOptions = {
2744
2745
  alreadyRequestedSrc?: Set<string>;
2745
2746
  };
2746
2747
 
2748
+ /**
2749
+ * @public
2750
+ */
2751
+ export declare const enum InteractionType {
2752
+ CURSOR = 0,
2753
+ PROXIMITY = 1
2754
+ }
2755
+
2747
2756
  /**
2748
2757
  * @public
2749
2758
  */
@@ -5552,6 +5561,8 @@ export declare interface PBPointerEvents_Entry {
5552
5561
  eventType: PointerEventType;
5553
5562
  /** additional configuration for this detection */
5554
5563
  eventInfo: PBPointerEvents_Info | undefined;
5564
+ /** the type of interaction source (default 0 == CURSOR) */
5565
+ interactionType?: InteractionType | undefined;
5555
5566
  }
5556
5567
 
5557
5568
  /**
@@ -5578,6 +5589,8 @@ export declare interface PBPointerEvents_Info {
5578
5589
  showHighlight?: boolean | undefined;
5579
5590
  /** range of interaction from the avatar's position (default 0) */
5580
5591
  maxPlayerDistance?: number | undefined;
5592
+ /** resolution order when multiple events overlap, higher wins (default 0) */
5593
+ priority?: number | undefined;
5581
5594
  }
5582
5595
 
5583
5596
  /**
@@ -6736,6 +6749,30 @@ export declare interface PointerEventsSystem {
6736
6749
  * @param entity - Entity where the callback was attached
6737
6750
  */
6738
6751
  removeOnPointerHoverLeave(entity: Entity): void;
6752
+ /**
6753
+ * @public
6754
+ * Remove the callback for onProximityDown event
6755
+ * @param entity - Entity where the callback was attached
6756
+ */
6757
+ removeOnProximityDown(entity: Entity): void;
6758
+ /**
6759
+ * @public
6760
+ * Remove the callback for onProximityUp event
6761
+ * @param entity - Entity where the callback was attached
6762
+ */
6763
+ removeOnProximityUp(entity: Entity): void;
6764
+ /**
6765
+ * @public
6766
+ * Remove the callback for onProximityEnter event
6767
+ * @param entity - Entity where the callback was attached
6768
+ */
6769
+ removeOnProximityEnter(entity: Entity): void;
6770
+ /**
6771
+ * @public
6772
+ * Remove the callback for onProximityLeave event
6773
+ * @param entity - Entity where the callback was attached
6774
+ */
6775
+ removeOnProximityLeave(entity: Entity): void;
6739
6776
  /**
6740
6777
  * @public
6741
6778
  * Execute callback when the user press the InputButton pointing at the entity
@@ -6790,6 +6827,46 @@ export declare interface PointerEventsSystem {
6790
6827
  entity: Entity;
6791
6828
  opts?: Partial<EventSystemOptions>;
6792
6829
  }, cb: EventSystemCallback): void;
6830
+ /**
6831
+ * @public
6832
+ * Execute callback when the user presses the proximity button on the entity
6833
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
6834
+ * @param cb - Function to execute when click fires
6835
+ */
6836
+ onProximityDown(pointerData: {
6837
+ entity: Entity;
6838
+ opts?: Partial<EventSystemOptions>;
6839
+ }, cb: EventSystemCallback): void;
6840
+ /**
6841
+ * @public
6842
+ * Execute callback when the user releases the proximity button on the entity
6843
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
6844
+ * @param cb - Function to execute when event fires
6845
+ */
6846
+ onProximityUp(pointerData: {
6847
+ entity: Entity;
6848
+ opts?: Partial<EventSystemOptions>;
6849
+ }, cb: EventSystemCallback): void;
6850
+ /**
6851
+ * @public
6852
+ * Execute callback when the entity enters the proximity zone of the user
6853
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
6854
+ * @param cb - Function to execute when event fires
6855
+ */
6856
+ onProximityEnter(pointerData: {
6857
+ entity: Entity;
6858
+ opts?: Partial<EventSystemOptions>;
6859
+ }, cb: EventSystemCallback): void;
6860
+ /**
6861
+ * @public
6862
+ * Execute callback when the entity leaves the proximity zone of the user
6863
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
6864
+ * @param cb - Function to execute when event fires
6865
+ */
6866
+ onProximityLeave(pointerData: {
6867
+ entity: Entity;
6868
+ opts?: Partial<EventSystemOptions>;
6869
+ }, cb: EventSystemCallback): void;
6793
6870
  }
6794
6871
 
6795
6872
  /**
@@ -6806,7 +6883,9 @@ export declare const enum PointerEventType {
6806
6883
  PET_UP = 0,
6807
6884
  PET_DOWN = 1,
6808
6885
  PET_HOVER_ENTER = 2,
6809
- PET_HOVER_LEAVE = 3
6886
+ PET_HOVER_LEAVE = 3,
6887
+ PET_PROXIMITY_ENTER = 4,
6888
+ PET_PROXIMITY_LEAVE = 5
6810
6889
  }
6811
6890
 
6812
6891
  /**