@dcl/sdk 7.0.0-3205931709.commit-049924f → 7.0.0-3220317770.commit-748a07b

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.
@@ -50,9 +50,6 @@ export declare const AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PB
50
50
  /** @public */
51
51
  export declare const Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
52
52
 
53
- /** @public */
54
- export declare const BoxShape: ComponentDefinition<ISchema<PBBoxShape>, PBBoxShape>;
55
-
56
53
  /**
57
54
  * @public
58
55
  */
@@ -70,6 +67,13 @@ declare const enum CameraModeValue {
70
67
  UNRECOGNIZED = -1
71
68
  }
72
69
 
70
+ export declare const enum ColliderLayer {
71
+ None = 0,
72
+ Pointer = 1,
73
+ Physics = 2,
74
+ UNRECOGNIZED = -1
75
+ }
76
+
73
77
  declare interface Color3 {
74
78
  r: number;
75
79
  g: number;
@@ -226,14 +230,10 @@ export declare namespace Components {
226
230
  /** @public */
227
231
  const Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
228
232
  /** @public */
229
- const BoxShape: ComponentDefinition<ISchema<PBBoxShape>, PBBoxShape>;
230
- /** @public */
231
233
  const CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
232
234
  /** @public */
233
235
  const CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
234
236
  /** @public */
235
- const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>, PBCylinderShape>;
236
- /** @public */
237
237
  const GltfContainer: ComponentDefinition<ISchema<PBGltfContainer>, PBGltfContainer>;
238
238
  /** @public */
239
239
  const Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
@@ -252,8 +252,6 @@ export declare namespace Components {
252
252
  /** @public */
253
253
  const OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>, PBOnPointerUpResult>;
254
254
  /** @public */
255
- const PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>, PBPlaneShape>;
256
- /** @public */
257
255
  const PointerEvents: ComponentDefinition<ISchema<PBPointerEvents>, PBPointerEvents>;
258
256
  /** @public */
259
257
  const PointerEventsResult: ComponentDefinition<ISchema<PBPointerEventsResult>, PBPointerEventsResult>;
@@ -264,8 +262,6 @@ export declare namespace Components {
264
262
  /** @public */
265
263
  const RaycastResult: ComponentDefinition<ISchema<PBRaycastResult>, PBRaycastResult>;
266
264
  /** @public */
267
- const SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
268
- /** @public */
269
265
  const TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
270
266
  /** @public */
271
267
  const UiStyles: ComponentDefinition<ISchema<PBUiStyles>, PBUiStyles>;
@@ -444,9 +440,6 @@ declare interface CreateByteBufferOptions {
444
440
  */
445
441
  export declare function cyclicParentingChecker(engine: IEngine): () => void;
446
442
 
447
- /** @public */
448
- export declare const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>, PBCylinderShape>;
449
-
450
443
  /**
451
444
  * @public
452
445
  */
@@ -479,10 +472,8 @@ declare function defineSdkComponents(engine: PreEngine): {
479
472
  AvatarModifierArea: ComponentDefinition<ISchema<PBAvatarModifierArea>, PBAvatarModifierArea>;
480
473
  AvatarShape: ComponentDefinition<ISchema<PBAvatarShape>, PBAvatarShape>;
481
474
  Billboard: ComponentDefinition<ISchema<PBBillboard>, PBBillboard>;
482
- BoxShape: ComponentDefinition<ISchema<PBBoxShape>, PBBoxShape>;
483
475
  CameraMode: ComponentDefinition<ISchema<PBCameraMode>, PBCameraMode>;
484
476
  CameraModeArea: ComponentDefinition<ISchema<PBCameraModeArea>, PBCameraModeArea>;
485
- CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>, PBCylinderShape>;
486
477
  GltfContainer: ComponentDefinition<ISchema<PBGltfContainer>, PBGltfContainer>;
487
478
  Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
488
479
  NFTShape: ComponentDefinition<ISchema<PBNFTShape>, PBNFTShape>;
@@ -490,13 +481,11 @@ declare function defineSdkComponents(engine: PreEngine): {
490
481
  OnPointerDownResult: ComponentDefinition<ISchema<PBOnPointerDownResult>, PBOnPointerDownResult>;
491
482
  OnPointerUp: ComponentDefinition<ISchema<PBOnPointerUp>, PBOnPointerUp>;
492
483
  OnPointerUpResult: ComponentDefinition<ISchema<PBOnPointerUpResult>, PBOnPointerUpResult>;
493
- PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>, PBPlaneShape>;
494
484
  PointerEvents: ComponentDefinition<ISchema<PBPointerEvents>, PBPointerEvents>;
495
485
  PointerEventsResult: ComponentDefinition<ISchema<PBPointerEventsResult>, PBPointerEventsResult>;
496
486
  PointerLock: ComponentDefinition<ISchema<PBPointerLock>, PBPointerLock>;
497
487
  Raycast: ComponentDefinition<ISchema<PBRaycast>, PBRaycast>;
498
488
  RaycastResult: ComponentDefinition<ISchema<PBRaycastResult>, PBRaycastResult>;
499
- SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
500
489
  TextShape: ComponentDefinition<ISchema<PBTextShape>, PBTextShape>;
501
490
  UiStyles: ComponentDefinition<ISchema<PBUiStyles>, PBUiStyles>;
502
491
  UiText: ComponentDefinition<ISchema<PBUiText>, PBUiText>;
@@ -590,8 +579,8 @@ export declare type IEngine = {
590
579
  * Example:
591
580
  * ```ts
592
581
  * function mySystem(dt: number) {
593
- * const entitiesWithBoxShapes = engine.getEntitiesWith(BoxShape, Transform)
594
- * for (const [entity, _boxShape, _transform] of engine.getEntitiesWith(BoxShape, Transform)) {
582
+ * const entitiesWithMeshRenderer = engine.getEntitiesWith(MeshRenderer, Transform)
583
+ * for (const [entity, _meshRenderer, _transform] of engine.getEntitiesWith(MeshRenderer, Transform)) {
595
584
  * // do stuffs
596
585
  * }
597
586
  * }
@@ -651,8 +640,8 @@ export declare type IEngine = {
651
640
  *
652
641
  * Example:
653
642
  * ```ts
654
- * for (const [entity, boxShape, transform] of engine.getEntitiesWith(BoxShape, Transform)) {
655
- * // the properties of boxShape and transform are read only
643
+ * for (const [entity, meshRenderer, transform] of engine.getEntitiesWith(MeshRenderer, Transform)) {
644
+ * // the properties of meshRenderer and transform are read only
656
645
  * }
657
646
  * ```
658
647
  */
@@ -724,6 +713,25 @@ export declare function isPointerEventActiveGenerator(engine: IEngine): (entity:
724
713
 
725
714
  export declare const log: (...a: any[]) => void;
726
715
 
716
+ /**
717
+ * @public
718
+ * Make the collision mask with some collider layers
719
+ * @param layers a array layers to be assigned
720
+ * @returns collisionMask to be used in the MeshCollider field
721
+ * @example
722
+ * ```ts
723
+ * // Physics and Pointer are the defaults
724
+ * MeshCollider.create(entity, {
725
+ * collisionMask: makeCollisionMask(
726
+ * ColliderLayer.Physics,
727
+ * ColliderLayer.Pointer
728
+ * ),
729
+ * box: {}
730
+ * })
731
+ * ```
732
+ */
733
+ export declare function makeCollisionMask(...layers: ColliderLayer[]): number;
734
+
727
735
  /** @public */
728
736
  export declare const Material: ComponentDefinition<ISchema<PBMaterial>, PBMaterial>;
729
737
 
@@ -1878,16 +1886,6 @@ declare interface PBBillboard {
1878
1886
  z?: boolean | undefined;
1879
1887
  }
1880
1888
 
1881
- declare interface PBBoxShape {
1882
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
1883
- withCollisions?: boolean | undefined;
1884
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
1885
- isPointerBlocker?: boolean | undefined;
1886
- /** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
1887
- visible?: boolean | undefined;
1888
- uvs: number[];
1889
- }
1890
-
1891
1889
  declare interface PBCameraMode {
1892
1890
  mode: CameraModeValue;
1893
1891
  }
@@ -1897,19 +1895,6 @@ declare interface PBCameraModeArea {
1897
1895
  mode: CameraModeValue;
1898
1896
  }
1899
1897
 
1900
- declare interface PBCylinderShape {
1901
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
1902
- withCollisions?: boolean | undefined;
1903
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
1904
- isPointerBlocker?: boolean | undefined;
1905
- /** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
1906
- visible?: boolean | undefined;
1907
- /** default=1.0 */
1908
- radiusTop?: number | undefined;
1909
- /** default=1.0 */
1910
- radiusBottom?: number | undefined;
1911
- }
1912
-
1913
1898
  declare interface PBGltfContainer {
1914
1899
  /** which file to load */
1915
1900
  src: string;
@@ -2087,16 +2072,6 @@ declare interface PBOnPointerUpResult {
2087
2072
  timestamp: number;
2088
2073
  }
2089
2074
 
2090
- declare interface PBPlaneShape {
2091
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
2092
- withCollisions?: boolean | undefined;
2093
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
2094
- isPointerBlocker?: boolean | undefined;
2095
- /** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
2096
- visible?: boolean | undefined;
2097
- uvs: number[];
2098
- }
2099
-
2100
2075
  declare interface PBPointerEvents {
2101
2076
  pointerEvents: PBPointerEvents_Entry[];
2102
2077
  }
@@ -2154,15 +2129,6 @@ declare interface PBRaycastResult {
2154
2129
  hits: RaycastHit[];
2155
2130
  }
2156
2131
 
2157
- declare interface PBSphereShape {
2158
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
2159
- withCollisions?: boolean | undefined;
2160
- /** @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366 */
2161
- isPointerBlocker?: boolean | undefined;
2162
- /** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
2163
- visible?: boolean | undefined;
2164
- }
2165
-
2166
2132
  declare interface PBTextShape {
2167
2133
  text: string;
2168
2134
  /** @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353 */
@@ -2401,9 +2367,6 @@ declare namespace Plane {
2401
2367
  function signedDistanceTo(plane: ReadonlyPlane, point: Vector3.ReadonlyVector3): number;
2402
2368
  }
2403
2369
 
2404
- /** @public */
2405
- export declare const PlaneShape: ComponentDefinition<ISchema<PBPlaneShape>, PBPlaneShape>;
2406
-
2407
2370
  /** @public */
2408
2371
  export declare const PointerEvents: ComponentDefinition<ISchema<PBPointerEvents>, PBPointerEvents>;
2409
2372
 
@@ -2721,9 +2684,6 @@ export declare interface Spec {
2721
2684
  [key: string]: ISchema;
2722
2685
  }
2723
2686
 
2724
- /** @public */
2725
- export declare const SphereShape: ComponentDefinition<ISchema<PBSphereShape>, PBSphereShape>;
2726
-
2727
2687
  /**
2728
2688
  * @public
2729
2689
  */