@dcl/playground-assets 7.1.4-4492843881.commit-442dfb1 → 7.1.4-4502579506.commit-4147243

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 CHANGED
@@ -89,6 +89,7 @@ export declare const AudioSource: LastWriteWinElementSetComponentDefinition<PBAu
89
89
  /** @public */
90
90
  export declare const AudioStream: LastWriteWinElementSetComponentDefinition<PBAudioStream>;
91
91
 
92
+ /** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
92
93
  /**
93
94
  * @public
94
95
  */
@@ -105,11 +106,14 @@ export declare const AvatarAttach: LastWriteWinElementSetComponentDefinition<PBA
105
106
  /** @public */
106
107
  export declare const AvatarModifierArea: LastWriteWinElementSetComponentDefinition<PBAvatarModifierArea>;
107
108
 
109
+ /** AvatarModifierType is an effect that should be applied to avatars inside the region. */
108
110
  /**
109
111
  * @public
110
112
  */
111
113
  export declare const enum AvatarModifierType {
114
+ /** AMT_HIDE_AVATARS - avatars are invisible */
112
115
  AMT_HIDE_AVATARS = 0,
116
+ /** AMT_DISABLE_PASSPORTS - selecting (e.g. clicking) an avatar will not bring up their profile. */
113
117
  AMT_DISABLE_PASSPORTS = 1
114
118
  }
115
119
 
@@ -203,6 +207,7 @@ export declare interface BaseComponent<T> {
203
207
  /** @public */
204
208
  export declare const Billboard: LastWriteWinElementSetComponentDefinition<PBBillboard>;
205
209
 
210
+ /** BillboardMode indicates one or more axis for automatic rotation, in OR-able bit flag form. */
206
211
  /**
207
212
  * @public
208
213
  */
@@ -211,6 +216,7 @@ export declare const enum BillboardMode {
211
216
  BM_X = 1,
212
217
  BM_Y = 2,
213
218
  BM_Z = 4,
219
+ /** BM_ALL - bitwise combination BM_X | BM_Y | BM_Z */
214
220
  BM_ALL = 7
215
221
  }
216
222
 
@@ -361,18 +367,39 @@ export declare const CameraModeArea: LastWriteWinElementSetComponentDefinition<P
361
367
  */
362
368
  export declare const enum CameraType {
363
369
  CT_FIRST_PERSON = 0,
364
- CT_THIRD_PERSON = 1
370
+ CT_THIRD_PERSON = 1,
371
+ /** CT_CINEMATIC - controlled by the scene */
372
+ CT_CINEMATIC = 2
365
373
  }
366
374
 
367
375
  export declare type Children = unknown;
368
376
 
377
+ /** ColliderLayer determines the kind of collision to detect, in OR-able bit flag form. */
369
378
  /**
370
379
  * @public
371
380
  */
372
381
  export declare const enum ColliderLayer {
382
+ /** CL_NONE - no collisions */
373
383
  CL_NONE = 0,
384
+ /** CL_POINTER - collisions with the player's pointer ray (e.g. mouse cursor hovering) */
374
385
  CL_POINTER = 1,
375
- CL_PHYSICS = 2
386
+ /** CL_PHYSICS - collision affecting your player's physics i.e. walls, floor, moving platfroms */
387
+ CL_PHYSICS = 2,
388
+ /** CL_VISIBLE_MESHES - all visible meshes, use with extreme care since the performance penalty is high */
389
+ CL_VISIBLE_MESHES = 4,
390
+ CL_RESERVED2 = 8,
391
+ CL_RESERVED3 = 16,
392
+ CL_RESERVED4 = 32,
393
+ CL_RESERVED5 = 64,
394
+ CL_RESERVED6 = 128,
395
+ CL_CUSTOM1 = 256,
396
+ CL_CUSTOM2 = 512,
397
+ CL_CUSTOM3 = 1024,
398
+ CL_CUSTOM4 = 2048,
399
+ CL_CUSTOM5 = 4096,
400
+ CL_CUSTOM6 = 8192,
401
+ CL_CUSTOM7 = 16384,
402
+ CL_CUSTOM8 = 32768
376
403
  }
377
404
 
378
405
  /**
@@ -3068,6 +3095,7 @@ export declare class MessageBus {
3068
3095
  private flush;
3069
3096
  }
3070
3097
 
3098
+ /** NftFrameType is a predefined framing style for the image. */
3071
3099
  /**
3072
3100
  * @public
3073
3101
  */
@@ -3230,123 +3258,229 @@ export declare const onVideoEvent: Observable<{
3230
3258
  */
3231
3259
  export declare type OverflowType = 'hidden' | 'scroll' | 'visible';
3232
3260
 
3261
+ /** AnimationState indicates the status and configuration of one available animation. */
3233
3262
  /**
3234
3263
  * @public
3235
3264
  */
3236
3265
  export declare interface PBAnimationState {
3266
+ /** the identifier for this animation, to use in scene code */
3237
3267
  name: string;
3268
+ /** the animation path in the `files` array of the scene manifest */
3238
3269
  clip: string;
3270
+ /** whether this animation is currently playing */
3239
3271
  playing?: boolean | undefined;
3240
- /** default=1.0s */
3272
+ /** the "weight" of this animation (see below, default: 1.0) */
3241
3273
  weight?: number | undefined;
3242
- /** default=1.0 */
3274
+ /** the playback speed (default: 1.0) */
3243
3275
  speed?: number | undefined;
3244
- /** default=true */
3276
+ /** whether the animation repeats until stopped (default: true) */
3245
3277
  loop?: boolean | undefined;
3278
+ /** whether the Entity is restored to its prior state when done */
3246
3279
  shouldReset?: boolean | undefined;
3247
3280
  }
3248
3281
 
3282
+ /**
3283
+ * The Animator component is a container for multiple potential animations an Entity can display,
3284
+ * separately or at the same time. It can be used to start, stop or blend animations; as well as
3285
+ * to inspect their playback state.
3286
+ *
3287
+ * Animations have a `weight` property, which determines how pronounced the animation will be. This
3288
+ * can be adjusted to blend animations together, or gracefully transition from one to the next.
3289
+ */
3249
3290
  /**
3250
3291
  * @public
3251
3292
  */
3252
3293
  export declare interface PBAnimator {
3294
+ /** a collection of animations and their current state */
3253
3295
  states: PBAnimationState[];
3254
3296
  }
3255
3297
 
3298
+ /**
3299
+ * The AudioSource component can play an audio clips bundled with the scene, controlling some
3300
+ * of the behavior.
3301
+ *
3302
+ * In each AudioSource instance, the sound is spatially located at the associated entity’s position,
3303
+ * given by its Transform.
3304
+ *
3305
+ * Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
3306
+ * the scene and declared in its manifest. The name was chosen because the URL use-case will
3307
+ * eventually be supported.
3308
+ */
3256
3309
  /**
3257
3310
  * @public
3258
3311
  */
3259
3312
  export declare interface PBAudioSource {
3313
+ /** whether the clip is currently playing. */
3260
3314
  playing?: boolean | undefined;
3261
- /** default=1.0f */
3315
+ /** the audio volume (default: 1.0). */
3262
3316
  volume?: number | undefined;
3317
+ /** whether the clip should restart when finished. */
3263
3318
  loop?: boolean | undefined;
3264
- /** default=1.0f */
3319
+ /** the audio pitch (default: 1.0). */
3265
3320
  pitch?: number | undefined;
3321
+ /** the clip path as given in the `files` array of the scene's manifest. */
3266
3322
  audioClipUrl: string;
3267
3323
  }
3268
3324
 
3325
+ /**
3326
+ * The AudioStream component can play external audio clips given a URL, streaming it in real-time.
3327
+ *
3328
+ * Despite being attached to a particular entity, the sound is not affected by its position.
3329
+ */
3269
3330
  /**
3270
3331
  * @public
3271
3332
  */
3272
3333
  export declare interface PBAudioStream {
3334
+ /** whether the clip is currently playing */
3273
3335
  playing?: boolean | undefined;
3274
- /** default=1.0f */
3336
+ /** the audio volume (default: 1.0) */
3275
3337
  volume?: number | undefined;
3338
+ /** the audio stream HTTP URL */
3276
3339
  url: string;
3277
3340
  }
3278
3341
 
3342
+ /**
3343
+ * The AvatarAttach component automatically repositions an Entity to maintain the same position and
3344
+ * rotation relative to some part of an avatar, called the "anchor point". The Entity
3345
+ * will follow this anchor as it moves.
3346
+ *
3347
+ * The Entity's own Transform is overridden by this component. To offset position and adjust scale,
3348
+ * add a child to the anchored Entity and set a Transform on it instead.
3349
+ *
3350
+ * AvatarAnchorPointType indicates which part of the avatar the Entity must follow.
3351
+ */
3279
3352
  /**
3280
3353
  * @public
3281
3354
  */
3282
3355
  export declare interface PBAvatarAttach {
3283
- /** default's to current player avatar id if not provided */
3356
+ /** the user ID of the avatar (default: local user) */
3284
3357
  avatarId?: string | undefined;
3358
+ /** the anchor point. */
3285
3359
  anchorPointId: AvatarAnchorPointType;
3286
3360
  }
3287
3361
 
3362
+ /**
3363
+ * The AvatarModifierArea component can be attached to an Entity to define a region of space where
3364
+ * avatar behavior changes.
3365
+ *
3366
+ * The Entity's Transform position determines the center-point of the region, while its size is
3367
+ * given as a vector in the `area` property below. The Transform rotation is applied, but the scale
3368
+ * is ignored.
3369
+ *
3370
+ * The modifier effect is only applied to avatars inside the region. It does not affect how players
3371
+ * standing inside it see avatars on the other side of the boundary.
3372
+ *
3373
+ * Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
3374
+ * is actually a 3D volume.
3375
+ */
3288
3376
  /**
3289
3377
  * @public
3290
3378
  */
3291
3379
  export declare interface PBAvatarModifierArea {
3380
+ /** the 3D size of the region */
3292
3381
  area: PBVector3 | undefined;
3382
+ /** user IDs that can enter and remain unaffected */
3293
3383
  excludeIds: string[];
3384
+ /** list of modifiers to apply */
3294
3385
  modifiers: AvatarModifierType[];
3295
3386
  }
3296
3387
 
3388
+ /**
3389
+ * The AvatarShape component contains the information required to draw and animate avatar, acting as
3390
+ * a simplified GLTF container for this specific case.
3391
+ *
3392
+ * All fields (except ID) are optional have reasonable default values. In the case of `wearables`,
3393
+ * each slot on the Avatar's body that is not explicitly included in the list has its own default.
3394
+ *
3395
+ * Note that, while AvatarShape can be attached to any Entity, it's only actually used in the global
3396
+ * Avatar Scene. Other requirements are usually better served by GLTFs.
3397
+ */
3297
3398
  /**
3298
3399
  * @public
3299
3400
  */
3300
3401
  export declare interface PBAvatarShape {
3402
+ /** the user ID */
3301
3403
  id: string;
3302
- /** default = NPC */
3404
+ /** visible name (default: "NPC") */
3303
3405
  name?: string | undefined;
3304
- /** default = urn:decentraland:off-chain:base-avatars:BaseFemale */
3406
+ /** shape URN (default "urn:decentraland:off-chain:base-avatars:BaseFemale") */
3305
3407
  bodyShape?: string | undefined;
3306
- /** default = decentraland.common.Color3(R = 0.6f, G = 0.462f, B = 0.356f) */
3408
+ /** RGB (default [0.6, 0.462, 0.356]) */
3307
3409
  skinColor?: PBColor3 | undefined;
3308
- /** default = decentraland.common.Color3(R = 0.283f, G = 0.142f, B = 0f) */
3410
+ /** RGB (default [0.283, 0.142, 0]) */
3309
3411
  hairColor?: PBColor3 | undefined;
3310
- /** default = decentraland.common.Color3(R = 0.6f, G = 0.462f, B = 0.356f) */
3412
+ /** RGB (default [0.6, 0.462, 0.356]) */
3311
3413
  eyeColor?: PBColor3 | undefined;
3414
+ /** current emote animations */
3312
3415
  expressionTriggerId?: string | undefined;
3313
- /** default = timestamp */
3416
+ /** start of emote animations (in the same order) */
3314
3417
  expressionTriggerTimestamp?: number | undefined;
3418
+ /** whether to display the floating voice chat icon */
3315
3419
  talking?: boolean | undefined;
3316
3420
  /**
3317
- * default = ["urn:decentraland:off-chain:base-avatars:f_eyes_00",
3318
- * "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
3319
- * "urn:decentraland:off-chain:base-avatars:f_mouth_00"
3320
- * "urn:decentraland:off-chain:base-avatars:standard_hair",
3321
- * "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
3322
- * "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
3323
- * "urn:decentraland:off-chain:base-avatars:bun_shoes"]
3421
+ * Wearable URNs, one for each body slot.
3422
+ * Default values for each unspecified slot:
3423
+ * Eyes : "urn:decentraland:off-chain:base-avatars:f_eyes_00",
3424
+ * Eyebrows: "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
3425
+ * Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00"
3426
+ * Hair : "urn:decentraland:off-chain:base-avatars:standard_hair",
3427
+ * Shirt : "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
3428
+ * Trousers: "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
3429
+ * Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"]
3324
3430
  */
3325
3431
  wearables: string[];
3326
- /** default = [] */
3432
+ /** available emotes (default empty) */
3327
3433
  emotes: string[];
3328
3434
  }
3329
3435
 
3436
+ /**
3437
+ * The Billboard component makes an Entity automatically reorient its rotation to face the camera.
3438
+ * As the name indicates, it’s used to display in-game billboards and frequently combined with
3439
+ * the TextShape component.
3440
+ *
3441
+ * Billboard only affects the Entity's rotation. Its scale and position are still determined by its
3442
+ * Transform.
3443
+ */
3330
3444
  /**
3331
3445
  * @public
3332
3446
  */
3333
3447
  export declare interface PBBillboard {
3334
- /** default=BM_ALL */
3448
+ /** the BillboardMode (default: BM_ALL) */
3335
3449
  billboardMode?: BillboardMode | undefined;
3336
3450
  }
3337
3451
 
3452
+ /**
3453
+ * The CameraMode component can be used to determine whether the player is using a first-person o
3454
+ * third-person view.
3455
+ */
3338
3456
  /**
3339
3457
  * @public
3340
3458
  */
3341
3459
  export declare interface PBCameraMode {
3460
+ /** the camera type (1st-person or 3rd-person) */
3342
3461
  mode: CameraType;
3343
3462
  }
3344
3463
 
3464
+ /**
3465
+ * The CameraModeArea component can be attached to an Entity to define a region of space where
3466
+ * the player's camera mode (1st-person or 3rd-person) is overridden.
3467
+ *
3468
+ * The Entity's Transform position determines the center-point of the region, while its size is
3469
+ * given as a vector in the `area` property below. The Transform rotation is applied, but the scale
3470
+ * is ignored.
3471
+ *
3472
+ * When players leave the region, their previous setting is restored.
3473
+ *
3474
+ * Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
3475
+ * is actually a 3D volume.
3476
+ */
3345
3477
  /**
3346
3478
  * @public
3347
3479
  */
3348
3480
  export declare interface PBCameraModeArea {
3481
+ /** the 3D size of the region */
3349
3482
  area: PBVector3 | undefined;
3483
+ /** the camera mode to enforce */
3350
3484
  mode: CameraType;
3351
3485
  }
3352
3486
 
@@ -3369,11 +3503,17 @@ export declare interface PBColor4 {
3369
3503
  a: number;
3370
3504
  }
3371
3505
 
3506
+ /**
3507
+ * GltfContainer loads a GLTF file (and any additional files packaged inside) attached to an Entity.
3508
+ *
3509
+ * This allows the use of custom models, materials, collision boundaries and shapes that can't be
3510
+ * achieved using MeshRenderer, MeshCollider and other standard components.
3511
+ */
3372
3512
  /**
3373
3513
  * @public
3374
3514
  */
3375
3515
  export declare interface PBGltfContainer {
3376
- /** which file to load */
3516
+ /** the GLTF file path as listed in the scene's manifest. */
3377
3517
  src: string;
3378
3518
  }
3379
3519
 
@@ -3442,11 +3582,21 @@ export declare interface PBMaterial_UnlitMaterial {
3442
3582
  diffuseColor?: PBColor4 | undefined;
3443
3583
  }
3444
3584
 
3585
+ /**
3586
+ * The MeshCollider component provides basic collision detection between Entities and Avatars. It
3587
+ * can behave like a cube, a plane, a sphere or a cylinder.
3588
+ *
3589
+ * The Entity's Transform affects the MeshCollider, scaling it and rotating it appropriately. If
3590
+ * the Transform for the collision mesh must be different than the Transform for rendering the Entity,
3591
+ * two different Entities must be used.
3592
+ *
3593
+ * More complex shapes require the use of a `GltfContainer` component.
3594
+ */
3445
3595
  /**
3446
3596
  * @public
3447
3597
  */
3448
3598
  export declare interface PBMeshCollider {
3449
- /** default = ColliderLayer.Physics | ColliderLayer.Pointer */
3599
+ /** enabled ColliderLayers (default CL_POINTER | CL_PHYSICS) */
3450
3600
  collisionMask?: number | undefined;
3451
3601
  mesh?: {
3452
3602
  $case: "box";
@@ -3463,34 +3613,48 @@ export declare interface PBMeshCollider {
3463
3613
  };
3464
3614
  }
3465
3615
 
3616
+ /** BoxMesh is a prism shape that contains the Entity. */
3466
3617
  /**
3467
3618
  * @public
3468
3619
  */
3469
3620
  export declare interface PBMeshCollider_BoxMesh {
3470
3621
  }
3471
3622
 
3623
+ /** CylinderMesh is a truncated cone shape that contains the Entity. */
3472
3624
  /**
3473
3625
  * @public
3474
3626
  */
3475
3627
  export declare interface PBMeshCollider_CylinderMesh {
3476
- /** default=1.0 */
3628
+ /** (default 1.0) */
3477
3629
  radiusTop?: number | undefined;
3478
- /** default=1.0 */
3630
+ /** (default 1.0) */
3479
3631
  radiusBottom?: number | undefined;
3480
3632
  }
3481
3633
 
3634
+ /** PlaneMesh is a 2D rectangle described by the Entity's Transform. */
3482
3635
  /**
3483
3636
  * @public
3484
3637
  */
3485
3638
  export declare interface PBMeshCollider_PlaneMesh {
3486
3639
  }
3487
3640
 
3641
+ /** SphereMesh is a sphere shape that contains the Entity. */
3488
3642
  /**
3489
3643
  * @public
3490
3644
  */
3491
3645
  export declare interface PBMeshCollider_SphereMesh {
3492
3646
  }
3493
3647
 
3648
+ /**
3649
+ * The MeshRenderer component renders a basic geometric shape for an Entity. It can be a cube, a
3650
+ * plane, a sphere or a cylinder.
3651
+ *
3652
+ * The cube and plane variants can include a UV texture mapping, so specific areas of a material
3653
+ * texture are rendered on different faces of the shape. They are serialized as a sequence of 2D
3654
+ * `float` coordinates, one for each corner of each side of each face.
3655
+ *
3656
+ * More complex shapes require the use of a `GltfContainer` component.
3657
+ */
3494
3658
  /**
3495
3659
  * @public
3496
3660
  */
@@ -3510,51 +3674,83 @@ export declare interface PBMeshRenderer {
3510
3674
  };
3511
3675
  }
3512
3676
 
3677
+ /** BoxMesh renders a prism shape. */
3513
3678
  /**
3514
3679
  * @public
3515
3680
  */
3516
3681
  export declare interface PBMeshRenderer_BoxMesh {
3682
+ /** 96-value texture map (2D * 6 faces * 2 sides * 4 vertices) */
3517
3683
  uvs: number[];
3518
3684
  }
3519
3685
 
3686
+ /** CylinderMesh renders a truncated cone shape. */
3520
3687
  /**
3521
3688
  * @public
3522
3689
  */
3523
3690
  export declare interface PBMeshRenderer_CylinderMesh {
3524
- /** default=1.0 */
3691
+ /** (default 1.0) */
3525
3692
  radiusTop?: number | undefined;
3526
- /** default=1.0 */
3693
+ /** (default 1.0) */
3527
3694
  radiusBottom?: number | undefined;
3528
3695
  }
3529
3696
 
3697
+ /** PlaneMesh renders a 2D rectangular shape. */
3530
3698
  /**
3531
3699
  * @public
3532
3700
  */
3533
3701
  export declare interface PBMeshRenderer_PlaneMesh {
3702
+ /** 16-value texture map (2D * 1 face * 2 sides * 4 vertices) */
3534
3703
  uvs: number[];
3535
3704
  }
3536
3705
 
3706
+ /** SphereMesh renders a spherical shape. */
3537
3707
  /**
3538
3708
  * @public
3539
3709
  */
3540
3710
  export declare interface PBMeshRenderer_SphereMesh {
3541
3711
  }
3542
3712
 
3713
+ /**
3714
+ * The NftShape component renders a framed picture from an NFT. It supports PNG, JPEG and GIF files.
3715
+ *
3716
+ * The `src` field is the URI of the NFT, which includes its parent contract and index, using
3717
+ * the `https:` or `ethereum:` schemes.
3718
+ *
3719
+ * The picture frame can have several different styles, plus a background color for images that have
3720
+ * transparent pixels.
3721
+ */
3543
3722
  /**
3544
3723
  * @public
3545
3724
  */
3546
3725
  export declare interface PBNftShape {
3726
+ /** the URI of the NFT */
3547
3727
  src: string;
3548
- /** default = PictureFrameStyle.Classic */
3728
+ /** the frame style (default NFT_CLASSIC) */
3549
3729
  style?: NftFrameType | undefined;
3550
- /** default = decentraland.common.Color3(0.6404918, 0.611472, 0.8584906) */
3730
+ /** RGB background (default [0.6404918, 0.611472, 0.8584906]) */
3551
3731
  color?: PBColor3 | undefined;
3552
3732
  }
3553
3733
 
3734
+ /**
3735
+ * PointerEvents adds configurable pointer-based interactions to the attached Entity.
3736
+ *
3737
+ * Events that match the criteria defined in the PointerEvents structure are reported back to the
3738
+ * Entity via the PointerEventsResult component.
3739
+ *
3740
+ * Some examples of events that can be detected:
3741
+ * - Pointer hovering over the Entity.
3742
+ * - Held mouse button released over the Entity.
3743
+ * - Controller button pressed while targeting the Entity.
3744
+ * - Key pressed while targeting the Entity, but only in close range.
3745
+ *
3746
+ * It also supports simple visual feedback when interactions occur, by showing floating text.
3747
+ * More sophisticated feedback requires the use of other components.
3748
+ */
3554
3749
  /**
3555
3750
  * @public
3556
3751
  */
3557
3752
  export declare interface PBPointerEvents {
3753
+ /** the list of relevant events to detect */
3558
3754
  pointerEvents: PBPointerEvents_Entry[];
3559
3755
  }
3560
3756
 
@@ -3562,7 +3758,9 @@ export declare interface PBPointerEvents {
3562
3758
  * @public
3563
3759
  */
3564
3760
  export declare interface PBPointerEvents_Entry {
3761
+ /** the kind of interaction to detect */
3565
3762
  eventType: PointerEventType;
3763
+ /** additional configuration for this detection */
3566
3764
  eventInfo: PBPointerEvents_Info | undefined;
3567
3765
  }
3568
3766
 
@@ -3570,13 +3768,13 @@ export declare interface PBPointerEvents_Entry {
3570
3768
  * @public
3571
3769
  */
3572
3770
  export declare interface PBPointerEvents_Info {
3573
- /** default=InputAction.ANY */
3771
+ /** key/button in use (default IA_ANY) */
3574
3772
  button?: InputAction | undefined;
3575
- /** default='Interact' */
3773
+ /** feedback on hover (default 'Interact') */
3576
3774
  hoverText?: string | undefined;
3577
- /** default=10 */
3775
+ /** range of interaction (default 10) */
3578
3776
  maxDistance?: number | undefined;
3579
- /** default=true */
3777
+ /** enable or disable hover text (default true) */
3580
3778
  showFeedback?: boolean | undefined;
3581
3779
  }
3582
3780
 
@@ -3595,10 +3793,15 @@ export declare interface PBPointerEventsResult {
3595
3793
  analog?: number | undefined;
3596
3794
  }
3597
3795
 
3796
+ /**
3797
+ * PointerLock indicates whether the mouse pointer is automatically following the camera’s point of
3798
+ * focus (locked), or can move freely on the screen (unlocked).
3799
+ */
3598
3800
  /**
3599
3801
  * @public
3600
3802
  */
3601
3803
  export declare interface PBPointerLock {
3804
+ /** whether the pointer is locked */
3602
3805
  isPointerLocked: boolean;
3603
3806
  }
3604
3807
 
@@ -3611,61 +3814,123 @@ export declare interface PBPosition {
3611
3814
  z: number;
3612
3815
  }
3613
3816
 
3817
+ /**
3818
+ * The PBRaycast component and PBRaycastResult are defined in https://adr.decentraland.org/adr/ADR-200
3819
+ *
3820
+ * The Raycast component allows scenes to request raycasting from the game engine. The results will
3821
+ * be available in a RaycastResult component set later on the same Entity.
3822
+ */
3614
3823
  /**
3615
3824
  * @public
3616
3825
  */
3617
3826
  export declare interface PBRaycast {
3618
- origin: PBVector3 | undefined;
3619
- direction: PBVector3 | undefined;
3827
+ /** Correlation ID, defined by the scene and used internally by the scene */
3828
+ timestamp?: number | undefined;
3829
+ /**
3830
+ * How much to offset the starting point of the ray, relative to the entity's transform.
3831
+ * Defaults to vec3(0,0,0)
3832
+ */
3833
+ originOffset?: PBVector3 | undefined;
3834
+ direction?: {
3835
+ $case: "localDirection";
3836
+ localDirection: PBVector3;
3837
+ } | {
3838
+ $case: "globalDirection";
3839
+ globalDirection: PBVector3;
3840
+ } | {
3841
+ $case: "globalTarget";
3842
+ globalTarget: PBVector3;
3843
+ } | {
3844
+ $case: "targetEntity";
3845
+ targetEntity: number;
3846
+ };
3847
+ /** Maximum length of the ray in virtual meters (global space) */
3620
3848
  maxDistance: number;
3849
+ /** the RaycastQueryType behavior */
3621
3850
  queryType: RaycastQueryType;
3851
+ /**
3852
+ * Indicates the renderer to perform the raycast on every scene tick (ADR-148),
3853
+ * otherwise it will be performed only once, defaults to false
3854
+ */
3855
+ continuous?: boolean | undefined;
3856
+ /** Collision mask, by default all bits are 1 (0xFFFF_FFFF) */
3857
+ collisionMask?: number | undefined;
3622
3858
  }
3623
3859
 
3860
+ /**
3861
+ * The PBRaycast component and PBRaycastResult are defined in https://adr.decentraland.org/adr/ADR-200
3862
+ *
3863
+ * The RaycastResult component is added to an Entity when the results of a previously attached
3864
+ * Raycast component are available. It contains information about the ray and any objects it
3865
+ * collided with.
3866
+ */
3624
3867
  /**
3625
3868
  * @public
3626
3869
  */
3627
3870
  export declare interface PBRaycastResult {
3628
- timestamp: number;
3629
- origin: PBVector3 | undefined;
3871
+ /** timestamp is a correlation id, copied from the PBRaycast */
3872
+ timestamp?: number | undefined;
3873
+ /** the starting point of the ray in global coordinates */
3874
+ globalOrigin: PBVector3 | undefined;
3875
+ /** the direction vector of the ray in global coordinates */
3630
3876
  direction: PBVector3 | undefined;
3877
+ /** zero or more hits */
3631
3878
  hits: RaycastHit[];
3632
3879
  }
3633
3880
 
3881
+ /**
3882
+ * The TextShape component renders customizable floating text.
3883
+ *
3884
+ * The position and rotation of the text are defined by the Entity's Transform, while its size
3885
+ * can either scale with the Transform or be fixed by a font size.
3886
+ *
3887
+ * Several options can be configured, including color, padding, line spacing and drop shadows.
3888
+ */
3634
3889
  /**
3635
3890
  * @public
3636
3891
  */
3637
3892
  export declare interface PBTextShape {
3893
+ /** the content */
3638
3894
  text: string;
3639
- /** default=F_SANS_SERIF */
3895
+ /** the font (default F_SANS_SERIF) */
3640
3896
  font?: Font | undefined;
3641
- /** default=10 */
3897
+ /** the font size (default 10) */
3642
3898
  fontSize?: number | undefined;
3899
+ /** override `font_size` to automatically fit in `width`/`height` */
3643
3900
  fontAutoSize?: boolean | undefined;
3644
- /** default=TAM_CENTER_CENTER */
3901
+ /** X and Y alignment (default TAM_CENTER_CENTER) */
3645
3902
  textAlign?: TextAlignMode | undefined;
3646
- /** default=1 */
3903
+ /** available horizontal space (default 1) */
3647
3904
  width?: number | undefined;
3648
- /** default=1 */
3905
+ /** available vertical space (default 1) */
3649
3906
  height?: number | undefined;
3907
+ /** distance from text to top border (default 0) */
3650
3908
  paddingTop?: number | undefined;
3909
+ /** distance from text to right border (default 0) */
3651
3910
  paddingRight?: number | undefined;
3911
+ /** distance from text to bottom border (default 0) */
3652
3912
  paddingBottom?: number | undefined;
3913
+ /** distance from text to left border (default 0) */
3653
3914
  paddingLeft?: number | undefined;
3654
- /** The amount of additional spacing to add between each lines of text. */
3915
+ /** extra distance between lines (default 0) */
3655
3916
  lineSpacing?: number | undefined;
3656
- /** Allows control over how many lines of text are displayed. */
3917
+ /** maximum number of lines to display */
3657
3918
  lineCount?: number | undefined;
3658
- /** Enables text wrapping */
3919
+ /** wrap text when the border is reached (default false) */
3659
3920
  textWrapping?: boolean | undefined;
3921
+ /** blurriness of the drop shadow (default 0) */
3660
3922
  shadowBlur?: number | undefined;
3923
+ /** horizontal length of the shadow (default 0) */
3661
3924
  shadowOffsetX?: number | undefined;
3925
+ /** vertical length of the shadow (default 0) */
3662
3926
  shadowOffsetY?: number | undefined;
3927
+ /** width of the stroke outlining each letter (default 0) */
3663
3928
  outlineWidth?: number | undefined;
3664
- /** default=(1.0,1.0,1.0) */
3929
+ /** drop shadow color (default [1.0, 1.0, 1.0]) */
3665
3930
  shadowColor?: PBColor3 | undefined;
3666
- /** default=(1.0,1.0,1.0) */
3931
+ /** outline stroke color (default [1.0, 1.0, 1.0]) */
3667
3932
  outlineColor?: PBColor3 | undefined;
3668
- /** default=(1.0,1.0,1.0) */
3933
+ /** text color (default [1.0, 1.0, 1.0]) */
3669
3934
  textColor?: PBColor4 | undefined;
3670
3935
  }
3671
3936
 
@@ -3740,14 +4005,15 @@ export declare interface PBUiInputResult {
3740
4005
  * @public
3741
4006
  */
3742
4007
  export declare interface PBUiText {
4008
+ /** the text content */
3743
4009
  value: string;
3744
- /** default=(1.0,1.0,1.0,1.0) */
4010
+ /** RGBA color (default: opaque white) */
3745
4011
  color?: PBColor4 | undefined;
3746
- /** default='center' */
4012
+ /** alignment within the bounds (default: center) */
3747
4013
  textAlign?: TextAlignMode | undefined;
3748
- /** default=0 */
4014
+ /** font for the text (default: sans-serif) */
3749
4015
  font?: Font | undefined;
3750
- /** default=10 */
4016
+ /** size of the text (default: 10) */
3751
4017
  fontSize?: number | undefined;
3752
4018
  }
3753
4019
 
@@ -4044,6 +4310,7 @@ export declare interface PointerEventsSystem {
4044
4310
  */
4045
4311
  export declare const pointerEventsSystem: PointerEventsSystem;
4046
4312
 
4313
+ /** PointerEventType is a kind of interaction that can be detected. */
4047
4314
  /**
4048
4315
  * @public
4049
4316
  */
@@ -4440,26 +4707,38 @@ export declare const RAD2DEG: number;
4440
4707
  /** @public */
4441
4708
  export declare const Raycast: LastWriteWinElementSetComponentDefinition<PBRaycast>;
4442
4709
 
4443
- /** Position will be relative to the scene */
4710
+ /** RaycastHit contains information about the intersection of a ray with a mesh. */
4444
4711
  /**
4445
4712
  * @public
4446
4713
  */
4447
4714
  export declare interface RaycastHit {
4715
+ /** Position will be relative to the scene */
4448
4716
  position: PBVector3 | undefined;
4449
- origin: PBVector3 | undefined;
4717
+ /** the starting point of the ray in global coordinates */
4718
+ globalOrigin: PBVector3 | undefined;
4719
+ /** the direction vector of the ray in global coordinates */
4450
4720
  direction: PBVector3 | undefined;
4721
+ /** normal of the hit surface in global coordinates */
4451
4722
  normalHit: PBVector3 | undefined;
4723
+ /** the distance between the ray origin and the hit position */
4452
4724
  length: number;
4725
+ /** mesh name, if collision happened inside a GltfContainer */
4453
4726
  meshName?: string | undefined;
4727
+ /** the ID of the Entity that has the impacted mesh attached */
4454
4728
  entityId?: number | undefined;
4455
4729
  }
4456
4730
 
4731
+ /** RaycastQueryType indicates whether the ray should stop on the first collition, or continue. */
4457
4732
  /**
4458
4733
  * @public
4459
4734
  */
4460
4735
  export declare const enum RaycastQueryType {
4736
+ /** RQT_HIT_FIRST - Pick the first (not necessarily the closest) hit within the range */
4461
4737
  RQT_HIT_FIRST = 0,
4462
- RQT_QUERY_ALL = 1
4738
+ /** RQT_QUERY_ALL - Pick all hits within the range */
4739
+ RQT_QUERY_ALL = 1,
4740
+ /** RQT_NONE - Do not perform the raycast, only set the raycast result with empty hits */
4741
+ RQT_NONE = 2
4463
4742
  }
4464
4743
 
4465
4744
  export declare type RaycastResponsePayload<T> = {