@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.
- package/dist/alpha.d.ts +182 -1
- package/dist/beta.d.ts +182 -1
- package/dist/index.bundled.d.ts +182 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +4 -4
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +182 -1
- package/etc/playground-assets.api.json +5460 -3702
- package/etc/playground-assets.api.md +101 -2
- package/package.json +4 -4
package/dist/alpha.d.ts
CHANGED
@@ -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
|
-
|
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
|
/**
|
package/dist/beta.d.ts
CHANGED
@@ -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
|
-
|
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>>;
|
@@ -5432,6 +5435,86 @@ export declare namespace PBTextShape {
|
|
5432
5435
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
|
5433
5436
|
}
|
5434
5437
|
|
5438
|
+
/**
|
5439
|
+
* The PBTriggerArea component is used to raise collision triggering events (through the TriggerAreaResult component)
|
5440
|
+
* when entities enter this component's defined area.
|
5441
|
+
*
|
5442
|
+
* ADR: https://github.com/decentraland/adr/blob/2b30a5e2b4f359a7c22a68fb827db282f6e5f887/content/ADR-258-trigger-areas.md
|
5443
|
+
*
|
5444
|
+
* The area size and rotation is defined by the Entity's Transform.
|
5445
|
+
*/
|
5446
|
+
/**
|
5447
|
+
* @public
|
5448
|
+
*/
|
5449
|
+
export declare interface PBTriggerArea {
|
5450
|
+
/** default: MT_BOX */
|
5451
|
+
mesh?: TriggerAreaMeshType | undefined;
|
5452
|
+
/** default: CL_PLAYER */
|
5453
|
+
collisionMask?: number | undefined;
|
5454
|
+
}
|
5455
|
+
|
5456
|
+
/**
|
5457
|
+
* @public
|
5458
|
+
*/
|
5459
|
+
export declare namespace PBTriggerArea {
|
5460
|
+
export function encode(message: PBTriggerArea, writer?: _m0.Writer): _m0.Writer;
|
5461
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerArea;
|
5462
|
+
}
|
5463
|
+
|
5464
|
+
/**
|
5465
|
+
* The PBTriggerAreaResult component is used to transport the trigger collision event data for the PBTriggerArea component.
|
5466
|
+
* ADR: https://github.com/decentraland/adr/blob/2b30a5e2b4f359a7c22a68fb827db282f6e5f887/content/ADR-258-trigger-areas.md
|
5467
|
+
*/
|
5468
|
+
/**
|
5469
|
+
* @public
|
5470
|
+
*/
|
5471
|
+
export declare interface PBTriggerAreaResult {
|
5472
|
+
/** The entity that was triggered (this is the entity that owns the trigger area) */
|
5473
|
+
triggeredEntity: number;
|
5474
|
+
/** The position of the triggered entity at the time of the trigger */
|
5475
|
+
triggeredEntityPosition: PBVector3 | undefined;
|
5476
|
+
/** The rotation of the triggered entity at the time of the trigger */
|
5477
|
+
triggeredEntityRotation: PBQuaternion | undefined;
|
5478
|
+
/** The state of the trigger event (ENTER, STAY, EXIT) */
|
5479
|
+
eventType: TriggerAreaEventType;
|
5480
|
+
/** The timestamp of the trigger event */
|
5481
|
+
timestamp: number;
|
5482
|
+
trigger: PBTriggerAreaResult_Trigger | undefined;
|
5483
|
+
}
|
5484
|
+
|
5485
|
+
/**
|
5486
|
+
* @public
|
5487
|
+
*/
|
5488
|
+
export declare namespace PBTriggerAreaResult {
|
5489
|
+
export function encode(message: PBTriggerAreaResult, writer?: _m0.Writer): _m0.Writer;
|
5490
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerAreaResult;
|
5491
|
+
}
|
5492
|
+
|
5493
|
+
/** Trigger data object */
|
5494
|
+
/**
|
5495
|
+
* @public
|
5496
|
+
*/
|
5497
|
+
export declare interface PBTriggerAreaResult_Trigger {
|
5498
|
+
/** The entity that triggered the Trigger Area */
|
5499
|
+
entity: number;
|
5500
|
+
/** The collision layermask of the entity that triggered the Trigger Area */
|
5501
|
+
layers: number;
|
5502
|
+
/** The position of the entity that triggered the trigger */
|
5503
|
+
position: PBVector3 | undefined;
|
5504
|
+
/** The rotation of the entity that triggered the trigger */
|
5505
|
+
rotation: PBQuaternion | undefined;
|
5506
|
+
/** The scale of the entity that triggered the trigger */
|
5507
|
+
scale: PBVector3 | undefined;
|
5508
|
+
}
|
5509
|
+
|
5510
|
+
/**
|
5511
|
+
* @public
|
5512
|
+
*/
|
5513
|
+
export declare namespace PBTriggerAreaResult_Trigger {
|
5514
|
+
export function encode(message: PBTriggerAreaResult_Trigger, writer?: _m0.Writer): _m0.Writer;
|
5515
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerAreaResult_Trigger;
|
5516
|
+
}
|
5517
|
+
|
5435
5518
|
/**
|
5436
5519
|
* @public
|
5437
5520
|
*/
|
@@ -7547,6 +7630,104 @@ export declare type Transport = {
|
|
7547
7630
|
*/
|
7548
7631
|
export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
7549
7632
|
|
7633
|
+
export declare const TriggerArea: TriggerAreaComponentDefinitionExtended;
|
7634
|
+
|
7635
|
+
/**
|
7636
|
+
* @public
|
7637
|
+
*/
|
7638
|
+
export declare interface TriggerAreaComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBTriggerArea> {
|
7639
|
+
/**
|
7640
|
+
* @public
|
7641
|
+
* Set a box in the MeshCollider component
|
7642
|
+
* @param entity - entity to create or replace the TriggerArea component
|
7643
|
+
* @param collisionMask - the collision layers mask for the trigger to react, default: Player
|
7644
|
+
*/
|
7645
|
+
setBox(entity: Entity, collisionMask?: ColliderLayer | ColliderLayer[]): void;
|
7646
|
+
/**
|
7647
|
+
* @public
|
7648
|
+
* Set a sphere in the MeshCollider component
|
7649
|
+
* @param entity - entity to create or replace the TriggerArea component
|
7650
|
+
* @param collisionMask - the collision layers mask for the trigger to react, default: Player
|
7651
|
+
*/
|
7652
|
+
setSphere(entity: Entity, collisionMask?: ColliderLayer | ColliderLayer[]): void;
|
7653
|
+
}
|
7654
|
+
|
7655
|
+
/**
|
7656
|
+
* @public
|
7657
|
+
*/
|
7658
|
+
export declare interface TriggerAreaEventsSystem {
|
7659
|
+
/**
|
7660
|
+
* @public
|
7661
|
+
* Execute callback when an entity enters the Trigger Area
|
7662
|
+
* @param entity - The entity that already has the TriggerArea component
|
7663
|
+
* @param cb - Function to execute the 'Enter' type of result is detected
|
7664
|
+
*/
|
7665
|
+
onTriggerEnter(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
|
7666
|
+
/**
|
7667
|
+
* @public
|
7668
|
+
* Remove the callback for Trigger Area 'Enter' type of result
|
7669
|
+
* @param entity - Entity where the Trigger Area was attached
|
7670
|
+
*/
|
7671
|
+
removeOnTriggerEnter(entity: Entity): void;
|
7672
|
+
/**
|
7673
|
+
* @public
|
7674
|
+
* Execute callback when an entity stays in the Trigger Area
|
7675
|
+
* @param entity - The entity that already has the TriggerArea component
|
7676
|
+
* @param cb - Function to execute the 'Stay' type of result is detected
|
7677
|
+
*/
|
7678
|
+
onTriggerStay(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
|
7679
|
+
/**
|
7680
|
+
* @public
|
7681
|
+
* Remove the callback for Trigger Area 'Stay' type of result
|
7682
|
+
* @param entity - Entity where the Trigger Area was attached
|
7683
|
+
*/
|
7684
|
+
removeOnTriggerStay(entity: Entity): void;
|
7685
|
+
/**
|
7686
|
+
* @public
|
7687
|
+
* Execute callback when an entity exits the Trigger Area
|
7688
|
+
* @param entity - The entity that already has the TriggerArea component
|
7689
|
+
* @param cb - Function to execute the 'Exit' type of result is detected
|
7690
|
+
*/
|
7691
|
+
onTriggerExit(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
|
7692
|
+
/**
|
7693
|
+
* @public
|
7694
|
+
* Remove the callback for Trigger Area 'Exit' type of result
|
7695
|
+
* @param entity - Entity where the Trigger Area was attached
|
7696
|
+
*/
|
7697
|
+
removeOnTriggerExit(entity: Entity): void;
|
7698
|
+
}
|
7699
|
+
|
7700
|
+
/**
|
7701
|
+
* @public
|
7702
|
+
* Register callback functions for trigger area results.
|
7703
|
+
*/
|
7704
|
+
export declare const triggerAreaEventsSystem: TriggerAreaEventsSystem;
|
7705
|
+
|
7706
|
+
/**
|
7707
|
+
* @public
|
7708
|
+
*/
|
7709
|
+
export declare type TriggerAreaEventSystemCallback = (result: DeepReadonlyObject<PBTriggerAreaResult>) => void;
|
7710
|
+
|
7711
|
+
/**
|
7712
|
+
* @public
|
7713
|
+
*/
|
7714
|
+
export declare const enum TriggerAreaEventType {
|
7715
|
+
TAET_ENTER = 0,
|
7716
|
+
TAET_STAY = 1,
|
7717
|
+
TAET_EXIT = 2
|
7718
|
+
}
|
7719
|
+
|
7720
|
+
/**
|
7721
|
+
* @public
|
7722
|
+
*/
|
7723
|
+
export declare const enum TriggerAreaMeshType {
|
7724
|
+
TAMT_BOX = 0,
|
7725
|
+
TAMT_SPHERE = 1
|
7726
|
+
}
|
7727
|
+
|
7728
|
+
/** @public */
|
7729
|
+
export declare const TriggerAreaResult: GrowOnlyValueSetComponentDefinition<PBTriggerAreaResult>;
|
7730
|
+
|
7550
7731
|
export declare const Tween: TweenComponentDefinitionExtended;
|
7551
7732
|
|
7552
7733
|
/**
|
package/dist/index.bundled.d.ts
CHANGED
@@ -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
|
-
|
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>>;
|
@@ -5432,6 +5435,86 @@ export declare namespace PBTextShape {
|
|
5432
5435
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
|
5433
5436
|
}
|
5434
5437
|
|
5438
|
+
/**
|
5439
|
+
* The PBTriggerArea component is used to raise collision triggering events (through the TriggerAreaResult component)
|
5440
|
+
* when entities enter this component's defined area.
|
5441
|
+
*
|
5442
|
+
* ADR: https://github.com/decentraland/adr/blob/2b30a5e2b4f359a7c22a68fb827db282f6e5f887/content/ADR-258-trigger-areas.md
|
5443
|
+
*
|
5444
|
+
* The area size and rotation is defined by the Entity's Transform.
|
5445
|
+
*/
|
5446
|
+
/**
|
5447
|
+
* @public
|
5448
|
+
*/
|
5449
|
+
export declare interface PBTriggerArea {
|
5450
|
+
/** default: MT_BOX */
|
5451
|
+
mesh?: TriggerAreaMeshType | undefined;
|
5452
|
+
/** default: CL_PLAYER */
|
5453
|
+
collisionMask?: number | undefined;
|
5454
|
+
}
|
5455
|
+
|
5456
|
+
/**
|
5457
|
+
* @public
|
5458
|
+
*/
|
5459
|
+
export declare namespace PBTriggerArea {
|
5460
|
+
export function encode(message: PBTriggerArea, writer?: _m0.Writer): _m0.Writer;
|
5461
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerArea;
|
5462
|
+
}
|
5463
|
+
|
5464
|
+
/**
|
5465
|
+
* The PBTriggerAreaResult component is used to transport the trigger collision event data for the PBTriggerArea component.
|
5466
|
+
* ADR: https://github.com/decentraland/adr/blob/2b30a5e2b4f359a7c22a68fb827db282f6e5f887/content/ADR-258-trigger-areas.md
|
5467
|
+
*/
|
5468
|
+
/**
|
5469
|
+
* @public
|
5470
|
+
*/
|
5471
|
+
export declare interface PBTriggerAreaResult {
|
5472
|
+
/** The entity that was triggered (this is the entity that owns the trigger area) */
|
5473
|
+
triggeredEntity: number;
|
5474
|
+
/** The position of the triggered entity at the time of the trigger */
|
5475
|
+
triggeredEntityPosition: PBVector3 | undefined;
|
5476
|
+
/** The rotation of the triggered entity at the time of the trigger */
|
5477
|
+
triggeredEntityRotation: PBQuaternion | undefined;
|
5478
|
+
/** The state of the trigger event (ENTER, STAY, EXIT) */
|
5479
|
+
eventType: TriggerAreaEventType;
|
5480
|
+
/** The timestamp of the trigger event */
|
5481
|
+
timestamp: number;
|
5482
|
+
trigger: PBTriggerAreaResult_Trigger | undefined;
|
5483
|
+
}
|
5484
|
+
|
5485
|
+
/**
|
5486
|
+
* @public
|
5487
|
+
*/
|
5488
|
+
export declare namespace PBTriggerAreaResult {
|
5489
|
+
export function encode(message: PBTriggerAreaResult, writer?: _m0.Writer): _m0.Writer;
|
5490
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerAreaResult;
|
5491
|
+
}
|
5492
|
+
|
5493
|
+
/** Trigger data object */
|
5494
|
+
/**
|
5495
|
+
* @public
|
5496
|
+
*/
|
5497
|
+
export declare interface PBTriggerAreaResult_Trigger {
|
5498
|
+
/** The entity that triggered the Trigger Area */
|
5499
|
+
entity: number;
|
5500
|
+
/** The collision layermask of the entity that triggered the Trigger Area */
|
5501
|
+
layers: number;
|
5502
|
+
/** The position of the entity that triggered the trigger */
|
5503
|
+
position: PBVector3 | undefined;
|
5504
|
+
/** The rotation of the entity that triggered the trigger */
|
5505
|
+
rotation: PBQuaternion | undefined;
|
5506
|
+
/** The scale of the entity that triggered the trigger */
|
5507
|
+
scale: PBVector3 | undefined;
|
5508
|
+
}
|
5509
|
+
|
5510
|
+
/**
|
5511
|
+
* @public
|
5512
|
+
*/
|
5513
|
+
export declare namespace PBTriggerAreaResult_Trigger {
|
5514
|
+
export function encode(message: PBTriggerAreaResult_Trigger, writer?: _m0.Writer): _m0.Writer;
|
5515
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTriggerAreaResult_Trigger;
|
5516
|
+
}
|
5517
|
+
|
5435
5518
|
/**
|
5436
5519
|
* @public
|
5437
5520
|
*/
|
@@ -7547,6 +7630,104 @@ export declare type Transport = {
|
|
7547
7630
|
*/
|
7548
7631
|
export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
7549
7632
|
|
7633
|
+
export declare const TriggerArea: TriggerAreaComponentDefinitionExtended;
|
7634
|
+
|
7635
|
+
/**
|
7636
|
+
* @public
|
7637
|
+
*/
|
7638
|
+
export declare interface TriggerAreaComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<PBTriggerArea> {
|
7639
|
+
/**
|
7640
|
+
* @public
|
7641
|
+
* Set a box in the MeshCollider component
|
7642
|
+
* @param entity - entity to create or replace the TriggerArea component
|
7643
|
+
* @param collisionMask - the collision layers mask for the trigger to react, default: Player
|
7644
|
+
*/
|
7645
|
+
setBox(entity: Entity, collisionMask?: ColliderLayer | ColliderLayer[]): void;
|
7646
|
+
/**
|
7647
|
+
* @public
|
7648
|
+
* Set a sphere in the MeshCollider component
|
7649
|
+
* @param entity - entity to create or replace the TriggerArea component
|
7650
|
+
* @param collisionMask - the collision layers mask for the trigger to react, default: Player
|
7651
|
+
*/
|
7652
|
+
setSphere(entity: Entity, collisionMask?: ColliderLayer | ColliderLayer[]): void;
|
7653
|
+
}
|
7654
|
+
|
7655
|
+
/**
|
7656
|
+
* @public
|
7657
|
+
*/
|
7658
|
+
export declare interface TriggerAreaEventsSystem {
|
7659
|
+
/**
|
7660
|
+
* @public
|
7661
|
+
* Execute callback when an entity enters the Trigger Area
|
7662
|
+
* @param entity - The entity that already has the TriggerArea component
|
7663
|
+
* @param cb - Function to execute the 'Enter' type of result is detected
|
7664
|
+
*/
|
7665
|
+
onTriggerEnter(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
|
7666
|
+
/**
|
7667
|
+
* @public
|
7668
|
+
* Remove the callback for Trigger Area 'Enter' type of result
|
7669
|
+
* @param entity - Entity where the Trigger Area was attached
|
7670
|
+
*/
|
7671
|
+
removeOnTriggerEnter(entity: Entity): void;
|
7672
|
+
/**
|
7673
|
+
* @public
|
7674
|
+
* Execute callback when an entity stays in the Trigger Area
|
7675
|
+
* @param entity - The entity that already has the TriggerArea component
|
7676
|
+
* @param cb - Function to execute the 'Stay' type of result is detected
|
7677
|
+
*/
|
7678
|
+
onTriggerStay(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
|
7679
|
+
/**
|
7680
|
+
* @public
|
7681
|
+
* Remove the callback for Trigger Area 'Stay' type of result
|
7682
|
+
* @param entity - Entity where the Trigger Area was attached
|
7683
|
+
*/
|
7684
|
+
removeOnTriggerStay(entity: Entity): void;
|
7685
|
+
/**
|
7686
|
+
* @public
|
7687
|
+
* Execute callback when an entity exits the Trigger Area
|
7688
|
+
* @param entity - The entity that already has the TriggerArea component
|
7689
|
+
* @param cb - Function to execute the 'Exit' type of result is detected
|
7690
|
+
*/
|
7691
|
+
onTriggerExit(entity: Entity, cb: TriggerAreaEventSystemCallback): void;
|
7692
|
+
/**
|
7693
|
+
* @public
|
7694
|
+
* Remove the callback for Trigger Area 'Exit' type of result
|
7695
|
+
* @param entity - Entity where the Trigger Area was attached
|
7696
|
+
*/
|
7697
|
+
removeOnTriggerExit(entity: Entity): void;
|
7698
|
+
}
|
7699
|
+
|
7700
|
+
/**
|
7701
|
+
* @public
|
7702
|
+
* Register callback functions for trigger area results.
|
7703
|
+
*/
|
7704
|
+
export declare const triggerAreaEventsSystem: TriggerAreaEventsSystem;
|
7705
|
+
|
7706
|
+
/**
|
7707
|
+
* @public
|
7708
|
+
*/
|
7709
|
+
export declare type TriggerAreaEventSystemCallback = (result: DeepReadonlyObject<PBTriggerAreaResult>) => void;
|
7710
|
+
|
7711
|
+
/**
|
7712
|
+
* @public
|
7713
|
+
*/
|
7714
|
+
export declare const enum TriggerAreaEventType {
|
7715
|
+
TAET_ENTER = 0,
|
7716
|
+
TAET_STAY = 1,
|
7717
|
+
TAET_EXIT = 2
|
7718
|
+
}
|
7719
|
+
|
7720
|
+
/**
|
7721
|
+
* @public
|
7722
|
+
*/
|
7723
|
+
export declare const enum TriggerAreaMeshType {
|
7724
|
+
TAMT_BOX = 0,
|
7725
|
+
TAMT_SPHERE = 1
|
7726
|
+
}
|
7727
|
+
|
7728
|
+
/** @public */
|
7729
|
+
export declare const TriggerAreaResult: GrowOnlyValueSetComponentDefinition<PBTriggerAreaResult>;
|
7730
|
+
|
7550
7731
|
export declare const Tween: TweenComponentDefinitionExtended;
|
7551
7732
|
|
7552
7733
|
/**
|