@dcl/playground-assets 7.25.1-30310486734.commit-5ffe873 → 7.25.1-30391610123.commit-26cb925

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.
@@ -1281,6 +1281,34 @@ declare module "~system/RestrictedActions" {
1281
1281
  }
1282
1282
 
1283
1283
  // Function declaration section
1284
+ /**
1285
+ * Identifies which fullscreen explorer panel OpenExplorerUi targets.
1286
+ * EU_SETTINGS holds 0 so an unset `ui` field defaults to the least-intrusive panel.
1287
+ */
1288
+ export enum ExplorerUi {
1289
+ EU_SETTINGS = 0,
1290
+ EU_MAP = 1,
1291
+ EU_BACKPACK = 2,
1292
+ EU_CAMERA_REEL = 3,
1293
+ EU_COMMUNITIES = 4,
1294
+ EU_PLACES = 5,
1295
+ EU_EVENTS = 6,
1296
+ UNRECOGNIZED = -1
1297
+ }
1298
+ /** Verdict of an OpenExplorerUi request (enum rather than a bool so new outcomes stay expressible). */
1299
+ export enum OpenExplorerUiResult {
1300
+ UNSPECIFIED = 0,
1301
+ OPENED = 1,
1302
+ /** WAS_ALREADY_OPEN - a fullscreen panel is already open */
1303
+ WAS_ALREADY_OPEN = 2,
1304
+ /** REJECTED_NOT_CURRENT_SCENE - the standard restricted-actions current-scene gate rejected the call */
1305
+ REJECTED_NOT_CURRENT_SCENE = 3,
1306
+ /** REJECTED_FEATURE_DISABLED - the requested section is hidden by feature flags or client doesn't have that feature */
1307
+ REJECTED_FEATURE_DISABLED = 4,
1308
+ /** REJECTED_NO_USER_GESTURE - rejected: the call did not originate from a user gesture */
1309
+ REJECTED_NO_USER_GESTURE = 5,
1310
+ UNRECOGNIZED = -1
1311
+ }
1284
1312
  export interface MovePlayerToRequest {
1285
1313
  newRelativePosition: Vector3 | undefined;
1286
1314
  cameraTarget?: Vector3 | undefined;
@@ -1331,6 +1359,13 @@ declare module "~system/RestrictedActions" {
1331
1359
  export interface EmptyResponse {
1332
1360
  }
1333
1361
  export interface StopEmoteRequest {
1362
+ }
1363
+ export interface OpenExplorerUiRequest {
1364
+ ui: ExplorerUi;
1365
+ }
1366
+ export interface OpenExplorerUiResponse {
1367
+ /** Carries only the verdict of the open action. */
1368
+ openResult: OpenExplorerUiResult;
1334
1369
  }
1335
1370
 
1336
1371
  // Function declaration section
@@ -1361,6 +1396,8 @@ declare module "~system/RestrictedActions" {
1361
1396
  export function copyToClipboard(body: CopyToClipboardRequest): Promise<EmptyResponse>;
1362
1397
  /** StopEmote will stop the current emote */
1363
1398
  export function stopEmote(body: StopEmoteRequest): Promise<SuccessResponse>;
1399
+ /** OpenExplorerUi opens a specific fullscreen explorer panel and returns the open verdict. */
1400
+ export function openExplorerUi(body: OpenExplorerUiRequest): Promise<OpenExplorerUiResponse>;
1364
1401
 
1365
1402
  }
1366
1403
  /**
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
3
  "description": "",
4
- "version": "7.25.1-30310486734.commit-5ffe873",
4
+ "version": "7.25.1-30391610123.commit-26cb925",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -9,8 +9,7 @@
9
9
  "@dcl/explorer": "1.0.164509-20240802172549.commit-fb95b9b",
10
10
  "@dcl/js-runtime": "file:../js-runtime",
11
11
  "@dcl/react-ecs": "file:../react-ecs",
12
- "@dcl/sdk-commands": "file:../sdk-commands",
13
- "text-encoding": "0.7.0"
12
+ "@dcl/sdk-commands": "file:../sdk-commands"
14
13
  },
15
14
  "keywords": [],
16
15
  "license": "Apache-2.0",
@@ -35,5 +34,5 @@
35
34
  },
36
35
  "types": "./index.d.ts",
37
36
  "typings": "./index.d.ts",
38
- "commit": "5ffe873b452ad7f5eec206893cc39f4326718657"
37
+ "commit": "26cb92516659d446b74945096eb4b7b48b7f06b1"
39
38
  }
@@ -220,42 +220,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
220
220
  getAudioState(entity: Entity): PBAudioEvent | undefined;
221
221
  }
222
222
 
223
- /**
224
- * @public
225
- */
226
- export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
227
-
228
- /**
229
- * Server authoritative message - identical to PutComponentMessageBody but with forced processing
230
- * Min. length = header (8 bytes) + 16 bytes = 24 bytes
231
- *
232
- * @param entity - Uint32 number of the entity
233
- * @param componentId - Uint32 number of id
234
- * @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
235
- * @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
236
- * @public
237
- */
238
- export declare type AuthoritativePutComponentMessageBody = {
239
- type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
240
- entityId: Entity;
241
- componentId: number;
242
- timestamp: number;
243
- data: Uint8Array;
244
- };
245
-
246
- /**
247
- * @public
248
- */
249
- export declare namespace AuthoritativePutComponentOperation {
250
- const MESSAGE_HEADER_LENGTH = 16;
251
- /**
252
- * Call this function for an optimal writing data passing the ByteBuffer
253
- * already allocated
254
- */
255
- export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
256
- export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
257
- }
258
-
259
223
  /** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
260
224
  /**
261
225
  * @public
@@ -428,22 +392,6 @@ export declare interface BaseComponent<T> {
428
392
  * If the value is undefined, the component was deleted.
429
393
  */
430
394
  onChange(entity: Entity, cb: (value: T | undefined) => void): void;
431
- /**
432
- * @public
433
- *
434
- */
435
- validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
436
- validateBeforeChange(cb: ValidateCallback<T>): void;
437
- /**
438
- * Get the CRDT state for an entity (serialized data and timestamp)
439
- * @param entity - Entity to get the CRDT state for
440
- * @returns Object with serialized data and timestamp, or null if entity doesn't have the component
441
- * @public
442
- */
443
- getCrdtState(entity: Entity): {
444
- data: Uint8Array;
445
- timestamp: number;
446
- } | null;
447
395
  }
448
396
 
449
397
  /** @public */
@@ -1499,6 +1447,7 @@ export declare const componentDefinitionByName: {
1499
1447
  "core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
1500
1448
  "core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
1501
1449
  "core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
1450
+ "core::TouchScreenControls": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>>;
1502
1451
  "core::TriggerArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
1503
1452
  "core::TriggerAreaResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBTriggerAreaResult>>;
1504
1453
  "core::Tween": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTween>>;
@@ -1509,6 +1458,7 @@ export declare const componentDefinitionByName: {
1509
1458
  "core::UiDropdown": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdown>>;
1510
1459
  "core::UiDropdownResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiDropdownResult>>;
1511
1460
  "core::UiInput": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInput>>;
1461
+ "core::UiInputBinding": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputBinding>>;
1512
1462
  "core::UiInputResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiInputResult>>;
1513
1463
  "core::UiText": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiText>>;
1514
1464
  "core::UiTransform": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBUiTransform>>;
@@ -1682,12 +1632,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
1682
1632
  /**
1683
1633
  * @public
1684
1634
  */
1685
- export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1635
+ export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1686
1636
 
1687
1637
  /**
1688
1638
  * @public
1689
1639
  */
1690
- export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1640
+ export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1691
1641
 
1692
1642
  /**
1693
1643
  * Min length = 8 bytes
@@ -1742,8 +1692,7 @@ export declare enum CrdtMessageType {
1742
1692
  PUT_COMPONENT_NETWORK = 5,
1743
1693
  DELETE_COMPONENT_NETWORK = 6,
1744
1694
  DELETE_ENTITY_NETWORK = 7,
1745
- AUTHORITATIVE_PUT_COMPONENT = 8,
1746
- MAX_MESSAGE_TYPE = 9
1695
+ MAX_MESSAGE_TYPE = 8
1747
1696
  }
1748
1697
 
1749
1698
  /**
@@ -1751,8 +1700,6 @@ export declare enum CrdtMessageType {
1751
1700
  */
1752
1701
  export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
1753
1702
 
1754
- export declare const CreatedBy: ICreatedBy;
1755
-
1756
1703
  /**
1757
1704
  * @public
1758
1705
  */
@@ -2479,12 +2426,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
2479
2426
 
2480
2427
  export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
2481
2428
 
2482
- export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
2483
-
2484
- export declare interface ICreatedByType {
2485
- address: string;
2486
- }
2487
-
2488
2429
  /**
2489
2430
  * @public
2490
2431
  */
@@ -2960,35 +2901,6 @@ export declare const enum InteractionType {
2960
2901
  PROXIMITY = 1
2961
2902
  }
2962
2903
 
2963
- /**
2964
- * Internal component interface that exposes all internal methods for SDK use
2965
- * This is not exposed to users, only for internal SDK operations
2966
- */
2967
- export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
2968
- /**
2969
- * @public
2970
- * Dry run update to check if a CRDT message would be accepted without actually applying it
2971
- */
2972
- __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
2973
- /**
2974
- * @public
2975
- * Get the iterator to every entity has the component
2976
- */
2977
- iterator(): Iterable<[Entity, any]>;
2978
- /**
2979
- * @public
2980
- */
2981
- dirtyIterator(): Iterable<Entity>;
2982
- /**
2983
- * @public
2984
- */
2985
- __onChangeCallbacks(entity: Entity, value: T): void;
2986
- /**
2987
- * @public
2988
- */
2989
- __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
2990
- }
2991
-
2992
2904
  /**
2993
2905
  * @public
2994
2906
  */
@@ -4911,8 +4823,9 @@ export declare namespace PBAvatarBase {
4911
4823
  }
4912
4824
 
4913
4825
  /**
4914
- * AvatarEmoteCommand is a grow only value set, used to signal the renderer about
4915
- * avatar emotes playback.
4826
+ * AvatarEmoteCommand is a grow only value set, written by the explorer to report
4827
+ * avatar emote playback to the scene. It is appended to every player entity in the
4828
+ * scene (the local player and remote avatars alike).
4916
4829
  */
4917
4830
  /**
4918
4831
  * @public
@@ -6523,6 +6436,70 @@ export declare namespace PBTextShape {
6523
6436
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTextShape;
6524
6437
  }
6525
6438
 
6439
+ /**
6440
+ * The TouchScreenControls component lets a scene configure the native on-screen touch
6441
+ * controls (the mobile joystick + gamepad). It must be set on the RootEntity.
6442
+ *
6443
+ * By default every on-screen button is shown; list a button in `touch_inputs` with
6444
+ * `hide = true` to remove it (declutter). `main_action` picks which action the large
6445
+ * central button triggers, and `hide_joystick` removes the native virtual joystick. It is
6446
+ * a no-op on platforms without native on-screen controls (e.g. desktop).
6447
+ *
6448
+ * Accepted actions: only the on-screen gamepad actions map to a button — `IA_POINTER`,
6449
+ * `IA_PRIMARY`, `IA_SECONDARY`, `IA_JUMP`, and `IA_ACTION_3`..`IA_ACTION_6`. Any other
6450
+ * `InputAction` (movement actions, `IA_ANY`, `IA_MODIFIER`, or unknown/future values) is
6451
+ * ignored: a `TouchInput` entry naming a non-button action has no effect, and a `main_action`
6452
+ * that isn't a valid gamepad action falls back to the default central button (`IA_JUMP`).
6453
+ */
6454
+ /**
6455
+ * @public
6456
+ */
6457
+ export declare interface PBTouchScreenControls {
6458
+ touchInputs: PBTouchScreenControls_TouchInput[];
6459
+ /**
6460
+ * The large central button's action. Only the gamepad actions are valid:
6461
+ * jump / pointer / primary (E) / secondary (F) / action_3..action_6 (1/2/3/4).
6462
+ * When unset, the default central button (jump) is kept.
6463
+ */
6464
+ mainAction?: InputAction | undefined;
6465
+ /** hide the native virtual joystick */
6466
+ hideJoystick: boolean;
6467
+ /** hide the on-screen crosshair / reticle */
6468
+ hideCrosshair: boolean;
6469
+ }
6470
+
6471
+ /**
6472
+ * @public
6473
+ */
6474
+ export declare namespace PBTouchScreenControls {
6475
+ export function encode(message: PBTouchScreenControls, writer?: _m0.Writer): _m0.Writer;
6476
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTouchScreenControls;
6477
+ }
6478
+
6479
+ /** Per-button configuration. A button not listed here keeps its default (shown). */
6480
+ /**
6481
+ * @public
6482
+ */
6483
+ export declare interface PBTouchScreenControls_TouchInput {
6484
+ /** which on-screen button this configures */
6485
+ inputAction: InputAction;
6486
+ /** hide this button (default: shown) */
6487
+ hide: boolean;
6488
+ /**
6489
+ * Override the button glyph with this texture. For the jump button it replaces all
6490
+ * of its dynamic states (jump / double-jump / glide).
6491
+ */
6492
+ icon?: TextureUnion | undefined;
6493
+ }
6494
+
6495
+ /**
6496
+ * @public
6497
+ */
6498
+ export declare namespace PBTouchScreenControls_TouchInput {
6499
+ export function encode(message: PBTouchScreenControls_TouchInput, writer?: _m0.Writer): _m0.Writer;
6500
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBTouchScreenControls_TouchInput;
6501
+ }
6502
+
6526
6503
  /**
6527
6504
  * The PBTriggerArea component is used to raise collision triggering events (through the TriggerAreaResult component)
6528
6505
  * when entities enter this component's defined area.
@@ -6811,6 +6788,42 @@ export declare namespace PBUiInput {
6811
6788
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInput;
6812
6789
  }
6813
6790
 
6791
+ /**
6792
+ * The UiInputBinding component binds a UI entity to one or more InputActions. While the
6793
+ * element is pressed (touch or pointer) the listed actions are held down, driving both
6794
+ * the local player input and scene InputAction listeners, just like the native on-screen
6795
+ * buttons. It is typically combined with PBTouchScreenControls to replace the native
6796
+ * controls with a custom touch UI.
6797
+ *
6798
+ * Release semantics: the held actions are released as soon as the press that started them
6799
+ * ends. A renderer MUST release all actions held by this binding when any of the following
6800
+ * happens: the press/touch is lifted or cancelled, the pointer/touch leaves the element
6801
+ * (loses press ownership), the actions list changes (the previous set is released before
6802
+ * the new set is applied), the component is removed or its actions list becomes empty, the
6803
+ * UI element is hidden, disabled or removed from the tree, or the scene unloads. In short,
6804
+ * no action may remain held once the element is no longer both present and actively pressed.
6805
+ *
6806
+ * Multi-touch: the binding is a single held state, not reference-counted per pointer. The
6807
+ * actions are held while the element is pressed and released when that press ends; a second
6808
+ * simultaneous press on the same element does not stack, and does not extend the hold past
6809
+ * the first release.
6810
+ */
6811
+ /**
6812
+ * @public
6813
+ */
6814
+ export declare interface PBUiInputBinding {
6815
+ /** the input actions fired while this element is pressed */
6816
+ actions: InputAction[];
6817
+ }
6818
+
6819
+ /**
6820
+ * @public
6821
+ */
6822
+ export declare namespace PBUiInputBinding {
6823
+ export function encode(message: PBUiInputBinding, writer?: _m0.Writer): _m0.Writer;
6824
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBUiInputBinding;
6825
+ }
6826
+
6814
6827
  /**
6815
6828
  * @public
6816
6829
  */
@@ -7079,6 +7092,7 @@ export declare namespace PBVideoPlayer {
7079
7092
  * an 'instant' transition (like using speed/time = 0)
7080
7093
  * * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
7081
7094
  * the holding entity transform).
7095
+ * * The fov defines the Field of View of the virtual camera
7082
7096
  */
7083
7097
  /**
7084
7098
  * @public
@@ -7086,6 +7100,8 @@ export declare namespace PBVideoPlayer {
7086
7100
  export declare interface PBVirtualCamera {
7087
7101
  defaultTransition?: CameraTransition | undefined;
7088
7102
  lookAtEntity?: number | undefined;
7103
+ /** default: 60 */
7104
+ fov?: number | undefined;
7089
7105
  }
7090
7106
 
7091
7107
  /**
@@ -9111,6 +9127,9 @@ export declare const ToLinearSpace = 2.2;
9111
9127
  */
9112
9128
  export declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
9113
9129
 
9130
+ /** @public */
9131
+ export declare const TouchScreenControls: LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>;
9132
+
9114
9133
  export declare const Transform: TransformComponentExtended;
9115
9134
 
9116
9135
  /**
@@ -9557,6 +9576,9 @@ export declare type UiFontType = 'sans-serif' | 'serif' | 'monospace';
9557
9576
  /** @public */
9558
9577
  export declare const UiInput: LastWriteWinElementSetComponentDefinition<PBUiInput>;
9559
9578
 
9579
+ /** @public */
9580
+ export declare const UiInputBinding: LastWriteWinElementSetComponentDefinition<PBUiInputBinding>;
9581
+
9560
9582
  /**
9561
9583
  * @public
9562
9584
  */
@@ -9736,14 +9758,6 @@ export declare interface UiTransformProps {
9736
9758
  */
9737
9759
  export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
9738
9760
 
9739
- export declare type ValidateCallback<T> = (value: {
9740
- entity: Entity;
9741
- currentValue: T | undefined;
9742
- newValue: T | undefined;
9743
- senderAddress: string;
9744
- createdBy: string;
9745
- }) => boolean;
9746
-
9747
9761
  /**
9748
9762
  * @public
9749
9763
  */