@dcl/playground-assets 7.10.2 → 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.2",
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": "931de89979b7eca676af3d4e3ccbaa5dcf8ef300"
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>>;
@@ -2250,6 +2253,13 @@ export declare interface IEngine {
2250
2253
  * @typeParam T - The type of the entity name value
2251
2254
  */
2252
2255
  getEntityByName<T = never, K = T>(value: K & (T extends never ? never : string)): Entity;
2256
+ /**
2257
+ * @public
2258
+ * Get all entities that have a specific tag in their Tag component
2259
+ * @param tag - Tag to search
2260
+ * @returns Iterator of entities that have the given tag
2261
+ */
2262
+ getEntitiesByTag(tagName: string): Iterable<Entity>;
2253
2263
  /**
2254
2264
  * @public
2255
2265
  * @param deltaTime - deltaTime in seconds
@@ -5453,6 +5463,86 @@ export declare namespace PBTextShape {
5453
5463
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
5454
5464
  }
5455
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
+
5456
5546
  /**
5457
5547
  * @public
5458
5548
  */
@@ -7277,6 +7367,33 @@ export declare type SystemItem = {
7277
7367
 
7278
7368
  export declare const SYSTEMS_REGULAR_PRIORITY = 100000;
7279
7369
 
7370
+ export declare const Tags: TagsComponentDefinitionExtended;
7371
+
7372
+ export declare interface TagsComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<TagsType> {
7373
+ /**
7374
+ * @public
7375
+ *
7376
+ * Add a tag to the entity's Tags component or create the component if it doesn't exist and add the tag
7377
+ * @param entity - entity to add the tag to
7378
+ * @param tagName - the tag name to add
7379
+ * @returns true
7380
+ */
7381
+ add(entity: Entity, tagName: string): boolean;
7382
+ /**
7383
+ * @public
7384
+ *
7385
+ * Remove a tag from the entity's Tags component
7386
+ * @param entity - entity to remove the tag from
7387
+ * @param tagName - the tag name to remove
7388
+ * @returns true if successful, false if the entity doesn't have a Tags component or the tag doesn't exist
7389
+ */
7390
+ remove(entity: Entity, tagName: string): boolean;
7391
+ }
7392
+
7393
+ export declare interface TagsType {
7394
+ tags: string[];
7395
+ }
7396
+
7280
7397
  export declare type TargetEntityRaycastOptions = RaycastSystemOptions & TargetEntityRaycastSystemOptions;
7281
7398
 
7282
7399
  export declare type TargetEntityRaycastSystemOptions = {
@@ -7546,6 +7663,104 @@ export declare type Transport = {
7546
7663
  */
7547
7664
  export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
7548
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
+
7549
7764
  export declare const Tween: TweenComponentDefinitionExtended;
7550
7765
 
7551
7766
  /**
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.11"
8
+ "packageVersion": "7.52.13"
9
9
  }
10
10
  ]
11
11
  }