@dcl/playground-assets 7.10.3-17918694201.commit-b983b3b → 7.10.3-18106625709.commit-1bcaa4a

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.10.3-17918694201.commit-b983b3b",
4
+ "version": "7.10.3-18106625709.commit-1bcaa4a",
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": "b983b3b74a44f323355ad4aed6a0e25504d20eb1"
38
+ "commit": "1bcaa4aa66245ab02561c033a0a0651eed1260f3"
39
39
  }
@@ -541,7 +541,8 @@ export declare const enum ColliderLayer {
541
541
  CL_POINTER = 1,
542
542
  /** CL_PHYSICS - collision affecting your player's physics i.e. walls, floor, moving platfroms */
543
543
  CL_PHYSICS = 2,
544
- CL_RESERVED1 = 4,
544
+ /** CL_PLAYER - layer corresponding to any player avatar */
545
+ CL_PLAYER = 4,
545
546
  CL_RESERVED2 = 8,
546
547
  CL_RESERVED3 = 16,
547
548
  CL_RESERVED4 = 32,
@@ -1326,6 +1327,8 @@ export declare const componentDefinitionByName: {
1326
1327
  "core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
1327
1328
  "core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
1328
1329
  "core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
1330
+ "core::TriggerArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
1331
+ "core::TriggerAreaResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBTriggerAreaResult>>;
1329
1332
  "core::Tween": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTween>>;
1330
1333
  "core::TweenSequence": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTweenSequence>>;
1331
1334
  "core::TweenState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTweenState>>;
@@ -5460,6 +5463,86 @@ export declare namespace PBTextShape {
5460
5463
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
5461
5464
  }
5462
5465
 
5466
+ /**
5467
+ * The PBTriggerArea component is used to raise collision triggering events (through the TriggerAreaResult component)
5468
+ * when entities enter this component's defined area.
5469
+ *
5470
+ * ADR: https://github.com/decentraland/adr/blob/2b30a5e2b4f359a7c22a68fb827db282f6e5f887/content/ADR-258-trigger-areas.md
5471
+ *
5472
+ * The area size and rotation is defined by the Entity's Transform.
5473
+ */
5474
+ /**
5475
+ * @public
5476
+ */
5477
+ export declare interface PBTriggerArea {
5478
+ /** default: MT_BOX */
5479
+ mesh?: TriggerAreaMeshType | undefined;
5480
+ /** default: CL_PLAYER */
5481
+ collisionMask?: number | undefined;
5482
+ }
5483
+
5484
+ /**
5485
+ * @public
5486
+ */
5487
+ export declare namespace PBTriggerArea {
5488
+ export function encode(message: PBTriggerArea, writer?: _m0.Writer): _m0.Writer;
5489
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerArea;
5490
+ }
5491
+
5492
+ /**
5493
+ * The PBTriggerAreaResult component is used to transport the trigger collision event data for the PBTriggerArea component.
5494
+ * ADR: https://github.com/decentraland/adr/blob/2b30a5e2b4f359a7c22a68fb827db282f6e5f887/content/ADR-258-trigger-areas.md
5495
+ */
5496
+ /**
5497
+ * @public
5498
+ */
5499
+ export declare interface PBTriggerAreaResult {
5500
+ /** The entity that was triggered (this is the entity that owns the trigger area) */
5501
+ triggeredEntity: number;
5502
+ /** The position of the triggered entity at the time of the trigger */
5503
+ triggeredEntityPosition: PBVector3 | undefined;
5504
+ /** The rotation of the triggered entity at the time of the trigger */
5505
+ triggeredEntityRotation: PBQuaternion | undefined;
5506
+ /** The state of the trigger event (ENTER, STAY, EXIT) */
5507
+ eventType: TriggerAreaEventType;
5508
+ /** The timestamp of the trigger event */
5509
+ timestamp: number;
5510
+ trigger: PBTriggerAreaResult_Trigger | undefined;
5511
+ }
5512
+
5513
+ /**
5514
+ * @public
5515
+ */
5516
+ export declare namespace PBTriggerAreaResult {
5517
+ export function encode(message: PBTriggerAreaResult, writer?: _m0.Writer): _m0.Writer;
5518
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerAreaResult;
5519
+ }
5520
+
5521
+ /** Trigger data object */
5522
+ /**
5523
+ * @public
5524
+ */
5525
+ export declare interface PBTriggerAreaResult_Trigger {
5526
+ /** The entity that triggered the Trigger Area */
5527
+ entity: number;
5528
+ /** The collision layermask of the entity that triggered the Trigger Area */
5529
+ layers: number;
5530
+ /** The position of the entity that triggered the trigger */
5531
+ position: PBVector3 | undefined;
5532
+ /** The rotation of the entity that triggered the trigger */
5533
+ rotation: PBQuaternion | undefined;
5534
+ /** The scale of the entity that triggered the trigger */
5535
+ scale: PBVector3 | undefined;
5536
+ }
5537
+
5538
+ /**
5539
+ * @public
5540
+ */
5541
+ export declare namespace PBTriggerAreaResult_Trigger {
5542
+ export function encode(message: PBTriggerAreaResult_Trigger, writer?: _m0.Writer): _m0.Writer;
5543
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerAreaResult_Trigger;
5544
+ }
5545
+
5463
5546
  /**
5464
5547
  * @public
5465
5548
  */
@@ -7580,6 +7663,104 @@ export declare type Transport = {
7580
7663
  */
7581
7664
  export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
7582
7665
 
7666
+ export declare const TriggerArea: TriggerAreaComponentDefinitionExtended;
7667
+
7668
+ /**
7669
+ * @public
7670
+ */
7671
+ export declare interface TriggerAreaComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBTriggerArea> {
7672
+ /**
7673
+ * @public
7674
+ * Set a box in the MeshCollider component
7675
+ * @param entity - entity to create or replace the TriggerArea component
7676
+ * @param collisionMask - the collision layers mask for the trigger to react, default: Player
7677
+ */
7678
+ setBox(entity: Entity, collisionMask?: ColliderLayer | ColliderLayer[]): void;
7679
+ /**
7680
+ * @public
7681
+ * Set a sphere in the MeshCollider component
7682
+ * @param entity - entity to create or replace the TriggerArea component
7683
+ * @param collisionMask - the collision layers mask for the trigger to react, default: Player
7684
+ */
7685
+ setSphere(entity: Entity, collisionMask?: ColliderLayer | ColliderLayer[]): void;
7686
+ }
7687
+
7688
+ /**
7689
+ * @public
7690
+ */
7691
+ export declare interface TriggerAreaEventsSystem {
7692
+ /**
7693
+ * @public
7694
+ * Execute callback when an entity enters the Trigger Area
7695
+ * @param entity - The entity that already has the TriggerArea component
7696
+ * @param cb - Function to execute the 'Enter' type of result is detected
7697
+ */
7698
+ onTriggerEnter(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
7699
+ /**
7700
+ * @public
7701
+ * Remove the callback for Trigger Area 'Enter' type of result
7702
+ * @param entity - Entity where the Trigger Area was attached
7703
+ */
7704
+ removeOnTriggerEnter(entity: Entity): void;
7705
+ /**
7706
+ * @public
7707
+ * Execute callback when an entity stays in the Trigger Area
7708
+ * @param entity - The entity that already has the TriggerArea component
7709
+ * @param cb - Function to execute the 'Stay' type of result is detected
7710
+ */
7711
+ onTriggerStay(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
7712
+ /**
7713
+ * @public
7714
+ * Remove the callback for Trigger Area 'Stay' type of result
7715
+ * @param entity - Entity where the Trigger Area was attached
7716
+ */
7717
+ removeOnTriggerStay(entity: Entity): void;
7718
+ /**
7719
+ * @public
7720
+ * Execute callback when an entity exits the Trigger Area
7721
+ * @param entity - The entity that already has the TriggerArea component
7722
+ * @param cb - Function to execute the 'Exit' type of result is detected
7723
+ */
7724
+ onTriggerExit(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
7725
+ /**
7726
+ * @public
7727
+ * Remove the callback for Trigger Area 'Exit' type of result
7728
+ * @param entity - Entity where the Trigger Area was attached
7729
+ */
7730
+ removeOnTriggerExit(entity: Entity): void;
7731
+ }
7732
+
7733
+ /**
7734
+ * @public
7735
+ * Register callback functions for trigger area results.
7736
+ */
7737
+ export declare const triggerAreaEventsSystem: TriggerAreaEventsSystem;
7738
+
7739
+ /**
7740
+ * @public
7741
+ */
7742
+ export declare type TriggerAreaEventSystemCallback = (result: DeepReadonlyObject<PBTriggerAreaResult>) => void;
7743
+
7744
+ /**
7745
+ * @public
7746
+ */
7747
+ export declare const enum TriggerAreaEventType {
7748
+ TAET_ENTER = 0,
7749
+ TAET_STAY = 1,
7750
+ TAET_EXIT = 2
7751
+ }
7752
+
7753
+ /**
7754
+ * @public
7755
+ */
7756
+ export declare const enum TriggerAreaMeshType {
7757
+ TAMT_BOX = 0,
7758
+ TAMT_SPHERE = 1
7759
+ }
7760
+
7761
+ /** @public */
7762
+ export declare const TriggerAreaResult: GrowOnlyValueSetComponentDefinition<PBTriggerAreaResult>;
7763
+
7583
7764
  export declare const Tween: TweenComponentDefinitionExtended;
7584
7765
 
7585
7766
  /**