@dcl/playground-assets 7.1.8-4756315995.commit-6d7fbd0 → 7.1.8-4757726595.commit-28cb54f

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.1.8-4756315995.commit-6d7fbd0",
4
+ "version": "7.1.8-4757726595.commit-28cb54f",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -30,5 +30,5 @@
30
30
  },
31
31
  "types": "./index.d.ts",
32
32
  "typings": "./index.d.ts",
33
- "commit": "6d7fbd0161e9d081ffb08992f9b6695f5ee026ab"
33
+ "commit": "28cb54f0e017f80c02592ebe17b35faaef720882"
34
34
  }
@@ -1667,10 +1667,22 @@ export declare type GizmoSelectedEvent = {
1667
1667
  entities: string[];
1668
1668
  };
1669
1669
 
1670
+ export declare type GlobalDirectionRaycastOptions = RaycastSystemOptions & GlobalDirectionRaycastSystemOptions;
1671
+
1672
+ export declare type GlobalDirectionRaycastSystemOptions = {
1673
+ direction?: PBVector3;
1674
+ };
1675
+
1670
1676
  export declare type GlobalInputEventResult = InputEventResult & {
1671
1677
  type: 0 | 1;
1672
1678
  };
1673
1679
 
1680
+ export declare type GlobalTargetRaycastOptions = RaycastSystemOptions & GlobalTargetRaycastSystemOptions;
1681
+
1682
+ export declare type GlobalTargetRaycastSystemOptions = {
1683
+ target?: PBVector3;
1684
+ };
1685
+
1674
1686
  /** @public */
1675
1687
  export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
1676
1688
 
@@ -2279,6 +2291,12 @@ export declare type Listeners = {
2279
2291
  onMouseUp?: Callback;
2280
2292
  };
2281
2293
 
2294
+ export declare type LocalDirectionRaycastOptions = RaycastSystemOptions & LocalDirectionRaycastSystemOptions;
2295
+
2296
+ export declare type LocalDirectionRaycastSystemOptions = {
2297
+ direction?: PBVector3;
2298
+ };
2299
+
2282
2300
  export declare type LwwComponentGetter<T extends LastWriteWinElementSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineComponentFromSchema'>) => T;
2283
2301
 
2284
2302
  /**
@@ -4390,7 +4408,7 @@ export declare interface PointerEventsSystem {
4390
4408
 
4391
4409
  /**
4392
4410
  * @public
4393
- * Register callback functions to a particular entity.
4411
+ * Register callback functions to a particular entity on input events.
4394
4412
  */
4395
4413
  export declare const pointerEventsSystem: PointerEventsSystem;
4396
4414
 
@@ -4834,6 +4852,76 @@ export declare type RaycastResponsePayload<T> = {
4834
4852
  /** @public */
4835
4853
  export declare const RaycastResult: LastWriteWinElementSetComponentDefinition<PBRaycastResult>;
4836
4854
 
4855
+ /**
4856
+ * @public
4857
+ */
4858
+ export declare interface RaycastSystem {
4859
+ /**
4860
+ * @public
4861
+ * Remove the callback for raycast event
4862
+ * @param entity - Entity where the callback was attached
4863
+ */
4864
+ removeRaycasterEntity(entity: Entity): void;
4865
+ /**
4866
+ * @public
4867
+ * Execute callback when the entity receives a RaycastResult component update.
4868
+ * Uses a Vector3 entity-local direction value to calculate the ray direction
4869
+ * @param entity - Entity to attach the callback
4870
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
4871
+ * @param options - Raycast configuration options
4872
+ */
4873
+ registerLocalDirectionRaycast(entity: Entity, callback: RaycastSystemCallback, options?: Partial<LocalDirectionRaycastOptions>): void;
4874
+ /**
4875
+ * @public
4876
+ * Execute callback when the entity receives a RaycastResult component update.
4877
+ * Uses a Vector3 global direction value to calculate the ray direction
4878
+ * @param entity - Entity to attach the callback
4879
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
4880
+ * @param options - Raycast configuration options
4881
+ */
4882
+ registerGlobalDirectionRaycast(entity: Entity, callback: RaycastSystemCallback, options?: Partial<GlobalDirectionRaycastOptions>): void;
4883
+ /**
4884
+ * @public
4885
+ * Execute callback when the entity receives a RaycastResult component update.
4886
+ * Uses a Vector3 global target position to calculate the ray direction
4887
+ * @param entity - Entity to attach the callback
4888
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
4889
+ * @param options - Raycast configuration options
4890
+ */
4891
+ registerGlobalTargetRaycast(entity: Entity, callback: RaycastSystemCallback, options?: Partial<GlobalTargetRaycastOptions>): void;
4892
+ /**
4893
+ * @public
4894
+ * Execute callback when the entity receives a RaycastResult component update.
4895
+ * Uses an target Entity value to calculate the ray direction
4896
+ * @param entity - Entity to attach the callback
4897
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
4898
+ * @param options - Raycast configuration options
4899
+ */
4900
+ registerTargetEntityRaycast(entity: Entity, callback: RaycastSystemCallback, options?: Partial<TargetEntityRaycastOptions>): void;
4901
+ }
4902
+
4903
+ /**
4904
+ * @public
4905
+ * Register callback functions to a particular entity on raycast results.
4906
+ */
4907
+ export declare const raycastSystem: RaycastSystem;
4908
+
4909
+ /**
4910
+ * @public
4911
+ */
4912
+ export declare type RaycastSystemCallback = (event: DeepReadonlyObject<PBRaycastResult>) => void;
4913
+
4914
+ /**
4915
+ * @public
4916
+ */
4917
+ export declare type RaycastSystemOptions = {
4918
+ originOffset?: PBVector3 | undefined;
4919
+ maxDistance: number;
4920
+ queryType: RaycastQueryType;
4921
+ continuous?: boolean | undefined;
4922
+ collisionMask?: number | undefined;
4923
+ };
4924
+
4837
4925
  /**
4838
4926
  * @public
4839
4927
  */
@@ -5197,6 +5285,12 @@ export declare type SystemItem = {
5197
5285
  name?: string;
5198
5286
  };
5199
5287
 
5288
+ export declare type TargetEntityRaycastOptions = RaycastSystemOptions & TargetEntityRaycastSystemOptions;
5289
+
5290
+ export declare type TargetEntityRaycastSystemOptions = {
5291
+ targetEntity?: number;
5292
+ };
5293
+
5200
5294
  export declare type Task<T = unknown> = () => Promise<T>;
5201
5295
 
5202
5296
  /**