@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.
- package/dist/alpha.d.ts +216 -1
- package/dist/beta.d.ts +216 -1
- package/dist/index.bundled.d.ts +216 -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 +216 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/etc/playground-assets.api.json +5397 -3342
- package/etc/playground-assets.api.md +123 -2
- package/package.json +4 -4
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>>;
|
@@ -2245,6 +2248,13 @@ export declare interface IEngine {
|
|
2245
2248
|
* @typeParam T - The type of the entity name value
|
2246
2249
|
*/
|
2247
2250
|
getEntityByName<T = never, K = T>(value: K & (T extends never ? never : string)): Entity;
|
2251
|
+
/**
|
2252
|
+
* @public
|
2253
|
+
* Get all entities that have a specific tag in their Tag component
|
2254
|
+
* @param tag - Tag to search
|
2255
|
+
* @returns Iterator of entities that have the given tag
|
2256
|
+
*/
|
2257
|
+
getEntitiesByTag(tagName: string): Iterable<Entity>;
|
2248
2258
|
/**
|
2249
2259
|
* @public
|
2250
2260
|
* @param deltaTime - deltaTime in seconds
|
@@ -5425,6 +5435,86 @@ export declare namespace PBTextShape {
|
|
5425
5435
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
|
5426
5436
|
}
|
5427
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
|
+
|
5428
5518
|
/**
|
5429
5519
|
* @public
|
5430
5520
|
*/
|
@@ -7244,6 +7334,33 @@ export declare type SystemItem = {
|
|
7244
7334
|
|
7245
7335
|
export declare const SYSTEMS_REGULAR_PRIORITY = 100000;
|
7246
7336
|
|
7337
|
+
export declare const Tags: TagsComponentDefinitionExtended;
|
7338
|
+
|
7339
|
+
export declare interface TagsComponentDefinitionExtended extends LastWriteWinElementSetComponentDefinition<TagsType> {
|
7340
|
+
/**
|
7341
|
+
* @public
|
7342
|
+
*
|
7343
|
+
* Add a tag to the entity's Tags component or create the component if it doesn't exist and add the tag
|
7344
|
+
* @param entity - entity to add the tag to
|
7345
|
+
* @param tagName - the tag name to add
|
7346
|
+
* @returns true
|
7347
|
+
*/
|
7348
|
+
add(entity: Entity, tagName: string): boolean;
|
7349
|
+
/**
|
7350
|
+
* @public
|
7351
|
+
*
|
7352
|
+
* Remove a tag from the entity's Tags component
|
7353
|
+
* @param entity - entity to remove the tag from
|
7354
|
+
* @param tagName - the tag name to remove
|
7355
|
+
* @returns true if successful, false if the entity doesn't have a Tags component or the tag doesn't exist
|
7356
|
+
*/
|
7357
|
+
remove(entity: Entity, tagName: string): boolean;
|
7358
|
+
}
|
7359
|
+
|
7360
|
+
export declare interface TagsType {
|
7361
|
+
tags: string[];
|
7362
|
+
}
|
7363
|
+
|
7247
7364
|
export declare type TargetEntityRaycastOptions = RaycastSystemOptions & TargetEntityRaycastSystemOptions;
|
7248
7365
|
|
7249
7366
|
export declare type TargetEntityRaycastSystemOptions = {
|
@@ -7513,6 +7630,104 @@ export declare type Transport = {
|
|
7513
7630
|
*/
|
7514
7631
|
export declare type TransportMessage = Omit<ReceiveMessage, 'data'>;
|
7515
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
|
+
|
7516
7731
|
export declare const Tween: TweenComponentDefinitionExtended;
|
7517
7732
|
|
7518
7733
|
/**
|