@dcl/playground-assets 7.1.18-5157707330.commit-091fce4 → 7.1.18-5158875305.commit-8967d79

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,12 +1,12 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
3
  "description": "",
4
- "version": "7.1.18-5157707330.commit-091fce4",
4
+ "version": "7.1.18-5158875305.commit-8967d79",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
8
8
  "@dcl/ecs-math": "2.0.1",
9
- "@dcl/explorer": "1.0.115491-20230522161611.commit-e2a80f5",
9
+ "@dcl/explorer": "1.0.119383-20230601164229.commit-d963542",
10
10
  "@dcl/js-runtime": "file:../js-runtime",
11
11
  "@dcl/react-ecs": "file:../react-ecs",
12
12
  "@dcl/sdk-commands": "file:../sdk-commands"
@@ -34,5 +34,5 @@
34
34
  },
35
35
  "types": "./index.d.ts",
36
36
  "typings": "./index.d.ts",
37
- "commit": "091fce4615f18681efcef4556b5fc76652a79639"
37
+ "commit": "8967d7964605ee1a45574e479d5f51ade8f59292"
38
38
  }
@@ -27,11 +27,10 @@ function circularSystem(dt: number) {
27
27
  // Init
28
28
  const initEntity = createCube(8, 1, 8)
29
29
  pointerEventsSystem.onPointerDown(
30
- initEntity,
30
+ { entity: initEntity, opts: { button: InputAction.IA_PRIMARY, hoverText: 'Press E to spawn' } },
31
31
  () => {
32
32
  createCube(1 + Math.random() * 8, Math.random() * 8, 1 + Math.random() * 8)
33
- },
34
- { button: InputAction.IA_PRIMARY, hoverText: 'Press E to spawn' }
33
+ }
35
34
  )
36
35
 
37
36
  engine.addSystem(circularSystem)
@@ -32,7 +32,7 @@ const raycastEntity = engine.addEntity()
32
32
 
33
33
  // Add OnPointerDown component to cube entity to trigger ray casting on interaction
34
34
  pointerEventsSystem.onPointerDown(
35
- cubeEntity,
35
+ { entity: cubeEntity, opts: { button: InputAction.IA_POINTER, hoverText: 'CAST RAY' } },
36
36
  () => {
37
37
  Raycast.createOrReplace(raycastEntity, {
38
38
  direction: {
@@ -42,10 +42,6 @@ pointerEventsSystem.onPointerDown(
42
42
  maxDistance: 16,
43
43
  queryType: RaycastQueryType.RQT_QUERY_ALL
44
44
  })
45
- },
46
- {
47
- button: InputAction.IA_POINTER,
48
- hoverText: 'CAST RAY'
49
45
  }
50
46
  )
51
47
 
@@ -31,7 +31,7 @@ const raycastEntity = engine.addEntity()
31
31
 
32
32
  // Add OnPointerDown component to cube entity to trigger ray casting on interaction
33
33
  pointerEventsSystem.onPointerDown(
34
- cubeEntity,
34
+ { entity: cubeEntity, opts: { button: InputAction.IA_POINTER, hoverText: 'CAST RAY' } },
35
35
  () => {
36
36
  Raycast.createOrReplace(raycastEntity, {
37
37
  continuous: true,
@@ -43,10 +43,6 @@ pointerEventsSystem.onPointerDown(
43
43
  maxDistance: 16,
44
44
  queryType: RaycastQueryType.RQT_HIT_FIRST
45
45
  })
46
- },
47
- {
48
- button: InputAction.IA_POINTER,
49
- hoverText: 'CAST RAY'
50
46
  }
51
47
  )
52
48
 
@@ -4941,6 +4941,15 @@ export declare interface PointerEventsSystem {
4941
4941
  /**
4942
4942
  * @public
4943
4943
  * Execute callback when the user press the InputButton pointing at the entity
4944
+ * @param pointerData - Entity to attach the callback, Opts to trigger Feedback and Button
4945
+ * @param cb - Function to execute when click fires
4946
+ */
4947
+ onPointerDown(pointerData: {
4948
+ entity: Entity;
4949
+ opts?: Partial<EventSystemOptions>;
4950
+ }, cb: EventSystemCallback): void;
4951
+ /**
4952
+ * @deprecated Use onPointerDown with (pointerData, cb)
4944
4953
  * @param entity - Entity to attach the callback
4945
4954
  * @param cb - Function to execute when click fires
4946
4955
  * @param opts - Opts to trigger Feedback and Button
@@ -4949,6 +4958,15 @@ export declare interface PointerEventsSystem {
4949
4958
  /**
4950
4959
  * @public
4951
4960
  * Execute callback when the user releases the InputButton pointing at the entity
4961
+ * @param pointerData - Entity to attach the callback - Opts to trigger Feedback and Button
4962
+ * @param cb - Function to execute when click fires
4963
+ */
4964
+ onPointerUp(pointerData: {
4965
+ entity: Entity;
4966
+ opts?: Partial<EventSystemOptions>;
4967
+ }, cb: EventSystemCallback): void;
4968
+ /**
4969
+ * @deprecated Use onPointerUp with (pointerData, cb)
4952
4970
  * @param entity - Entity to attach the callback
4953
4971
  * @param cb - Function to execute when click fires
4954
4972
  * @param opts - Opts to trigger Feedback and Button
@@ -5424,6 +5442,15 @@ export declare interface RaycastSystem {
5424
5442
  * @public
5425
5443
  * Execute callback when the entity receives a RaycastResult component update.
5426
5444
  * Uses a Vector3 entity-local direction value to calculate the ray direction
5445
+ * @param raycastData - Entity to attach the callback and Raycast configuration options
5446
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
5447
+ */
5448
+ registerLocalDirectionRaycast(raycastData: {
5449
+ entity: Entity;
5450
+ opts?: Partial<LocalDirectionRaycastOptions>;
5451
+ }, callback: RaycastSystemCallback): void;
5452
+ /**
5453
+ * @deprecated use registerLocalDirectionRaycast(raycastData, cb) instead
5427
5454
  * @param entity - Entity to attach the callback
5428
5455
  * @param callback - Function to execute when the entity's RaycastResult component is updated
5429
5456
  * @param options - Raycast configuration options
@@ -5433,6 +5460,15 @@ export declare interface RaycastSystem {
5433
5460
  * @public
5434
5461
  * Execute callback when the entity receives a RaycastResult component update.
5435
5462
  * Uses a Vector3 global direction value to calculate the ray direction
5463
+ * @param raycastData - Entity to attach the callback
5464
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
5465
+ */
5466
+ registerGlobalDirectionRaycast(raycastData: {
5467
+ entity: Entity;
5468
+ opts?: Partial<GlobalDirectionRaycastOptions>;
5469
+ }, callback: RaycastSystemCallback): void;
5470
+ /**
5471
+ * @deprecated use registerGlobalDirectionRaycast(raycastData, cb) instead
5436
5472
  * @param entity - Entity to attach the callback
5437
5473
  * @param callback - Function to execute when the entity's RaycastResult component is updated
5438
5474
  * @param options - Raycast configuration options
@@ -5442,6 +5478,15 @@ export declare interface RaycastSystem {
5442
5478
  * @public
5443
5479
  * Execute callback when the entity receives a RaycastResult component update.
5444
5480
  * Uses a Vector3 global target position to calculate the ray direction
5481
+ * @param raycastData - Entity to attach the callback and Raycast configuration options
5482
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
5483
+ */
5484
+ registerGlobalTargetRaycast(raycastData: {
5485
+ entity: Entity;
5486
+ opts?: Partial<GlobalTargetRaycastOptions>;
5487
+ }, callback: RaycastSystemCallback): void;
5488
+ /**
5489
+ * @deprecated use registerGlobalTargetRaycast(raycastData, cb) instead
5445
5490
  * @param entity - Entity to attach the callback
5446
5491
  * @param callback - Function to execute when the entity's RaycastResult component is updated
5447
5492
  * @param options - Raycast configuration options
@@ -5451,11 +5496,48 @@ export declare interface RaycastSystem {
5451
5496
  * @public
5452
5497
  * Execute callback when the entity receives a RaycastResult component update.
5453
5498
  * Uses an target Entity value to calculate the ray direction
5499
+ * @param raycastData - Entity to attach the callback
5500
+ * @param callback - Function to execute when the entity's RaycastResult component is updated
5501
+ * @param options - Raycast configuration options
5502
+ */
5503
+ registerTargetEntityRaycast(raycastData: {
5504
+ entity: Entity;
5505
+ opts?: Partial<TargetEntityRaycastOptions>;
5506
+ }, callback: RaycastSystemCallback): void;
5507
+ /**
5508
+ * @deprecated use registerTargetEntityRaycast(raycastData, cb) instead
5454
5509
  * @param entity - Entity to attach the callback
5455
5510
  * @param callback - Function to execute when the entity's RaycastResult component is updated
5456
5511
  * @param options - Raycast configuration options
5457
5512
  */
5458
5513
  registerTargetEntityRaycast(entity: Entity, callback: RaycastSystemCallback, options?: Partial<TargetEntityRaycastOptions>): void;
5514
+ /**
5515
+ * @public
5516
+ * Creates Raycast local direction opts with defaults
5517
+ */
5518
+ localDirectionOptions(options?: Partial<LocalDirectionRaycastOptions>): RaycastSystemOptions;
5519
+ /**
5520
+ * @public
5521
+ * Creates Raycast global direction opts with defaults
5522
+ */
5523
+ globalDirectionOptions(options?: Partial<GlobalDirectionRaycastOptions>): RaycastSystemOptions;
5524
+ /**
5525
+ * @public
5526
+ * Creates Raycast global target direction opts with defaults
5527
+ */
5528
+ globalTargetOptions(options?: Partial<GlobalTargetRaycastOptions>): RaycastSystemOptions;
5529
+ /**
5530
+ * @public
5531
+ * Creates Raycast target entity opts with defaults
5532
+ */
5533
+ targetEntitytOptions(options?: Partial<TargetEntityRaycastOptions>): RaycastSystemOptions;
5534
+ /**
5535
+ * @public
5536
+ * Immediate mode Raycast to be used on a sytem rather than callbacks
5537
+ *
5538
+ * Use the options helper to create the specified raycast i.e. localDirectionOptions(opts)
5539
+ */
5540
+ registerRaycast(entity: Entity, options: RaycastSystemOptions): DeepReadonlyObject<PBRaycastResult> | null;
5459
5541
  }
5460
5542
 
5461
5543
  /**
@@ -6884,6 +6966,11 @@ export declare interface VideoEventsSystem {
6884
6966
  removeVideoEventsEntity(entity: Entity): void;
6885
6967
  registerVideoEventsEntity(entity: Entity, callback: VideoEventsSystemCallback): void;
6886
6968
  hasVideoEventsEntity(entity: Entity): boolean;
6969
+ /**
6970
+ * Returns the latest state of the VideoEvent
6971
+ * @param entity - Entity to retrieve the video status
6972
+ */
6973
+ getVideoState(entity: Entity): DeepReadonlyObject<PBVideoEvent> | undefined;
6887
6974
  }
6888
6975
 
6889
6976
  /**