@dcl/playground-assets 7.31.1-41498712919.commit-5e4cada → 7.32.0

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.31.1-41498712919.commit-5e4cada",
4
+ "version": "7.32.0",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
7
  "@dcl/ecs": "file:../ecs",
@@ -33,5 +33,5 @@
33
33
  },
34
34
  "types": "./index.d.ts",
35
35
  "typings": "./index.d.ts",
36
- "commit": "5e4cadacd85ac2d2629b68e4bc4ad67a6ff66df9"
36
+ "commit": "c7c08464f277fd6df22e7c20b0c21a9855c3077d"
37
37
  }
@@ -245,42 +245,6 @@ export declare interface AudioStreamComponentDefinitionExtended extends LastWrit
245
245
  getAudioState(entity: Entity): PBAudioEvent | undefined;
246
246
  }
247
247
 
248
- /**
249
- * @public
250
- */
251
- export declare type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
252
-
253
- /**
254
- * Server authoritative message - identical to PutComponentMessageBody but with forced processing
255
- * Min. length = header (8 bytes) + 16 bytes = 24 bytes
256
- *
257
- * @param entity - Uint32 number of the entity
258
- * @param componentId - Uint32 number of id
259
- * @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
260
- * @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
261
- * @public
262
- */
263
- export declare type AuthoritativePutComponentMessageBody = {
264
- type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
265
- entityId: Entity;
266
- componentId: number;
267
- timestamp: number;
268
- data: Uint8Array;
269
- };
270
-
271
- /**
272
- * @public
273
- */
274
- export declare namespace AuthoritativePutComponentOperation {
275
- const MESSAGE_HEADER_LENGTH = 16;
276
- /**
277
- * Call this function for an optimal writing data passing the ByteBuffer
278
- * already allocated
279
- */
280
- export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
281
- export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
282
- }
283
-
284
248
  /** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
285
249
  /**
286
250
  * @public
@@ -456,22 +420,6 @@ export declare interface BaseComponent<T> {
456
420
  * If the value is undefined, the component was deleted.
457
421
  */
458
422
  onChange(entity: Entity, cb: (value: T | undefined) => void): void;
459
- /**
460
- * @public
461
- *
462
- */
463
- validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
464
- validateBeforeChange(cb: ValidateCallback<T>): void;
465
- /**
466
- * Get the CRDT state for an entity (serialized data and timestamp)
467
- * @param entity - Entity to get the CRDT state for
468
- * @returns Object with serialized data and timestamp, or null if entity doesn't have the component
469
- * @public
470
- */
471
- getCrdtState(entity: Entity): {
472
- data: Uint8Array;
473
- timestamp: number;
474
- } | null;
475
423
  }
476
424
 
477
425
  /** @public */
@@ -1439,6 +1387,44 @@ export declare type Color4Type = {
1439
1387
  a: number;
1440
1388
  };
1441
1389
 
1390
+ /**
1391
+ * Piecewise-linear, with keys interpolated in ascending order of `time`. Positions before the first key
1392
+ * or after the last key take that key's color. No keys means the gradient is unset.
1393
+ * If two keys have the same `time`, then the gradient keeps the key that comes later in `keys`.
1394
+ */
1395
+ /**
1396
+ * @public
1397
+ */
1398
+ export declare interface ColorGradient {
1399
+ keys: ColorKey[];
1400
+ }
1401
+
1402
+ /**
1403
+ * @public
1404
+ */
1405
+ export declare namespace ColorGradient {
1406
+ export function encode(message: ColorGradient, writer?: _m0.Writer): _m0.Writer;
1407
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): ColorGradient;
1408
+ }
1409
+
1410
+ /**
1411
+ * @public
1412
+ */
1413
+ export declare interface ColorKey {
1414
+ /** position along the gradient, from 0 to 1. Values outside that range clamp to it */
1415
+ time: number;
1416
+ /** linear color. Values above 1 are allowed (HDR) */
1417
+ color: PBColor4 | undefined;
1418
+ }
1419
+
1420
+ /**
1421
+ * @public
1422
+ */
1423
+ export declare namespace ColorKey {
1424
+ export function encode(message: ColorKey, writer?: _m0.Writer): _m0.Writer;
1425
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): ColorKey;
1426
+ }
1427
+
1442
1428
  /** A range of Color4 values. Randomized or lerped between start and end. */
1443
1429
  /**
1444
1430
  * @public
@@ -1505,6 +1491,7 @@ export declare const componentDefinitionByName: {
1505
1491
  "core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
1506
1492
  "core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
1507
1493
  "core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
1494
+ "core::EnvironmentFog": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEnvironmentFog>>;
1508
1495
  "core::ExplorerItemPurchaseResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>>;
1509
1496
  "core::ExplorerUiEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>>;
1510
1497
  "core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
@@ -1528,7 +1515,9 @@ export declare const componentDefinitionByName: {
1528
1515
  "core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
1529
1516
  "core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
1530
1517
  "core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
1518
+ "core::Skybox": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkybox>>;
1531
1519
  "core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
1520
+ "core::Sun": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSun>>;
1532
1521
  "core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
1533
1522
  "core::TouchScreenControls": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>>;
1534
1523
  "core::TriggerArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
@@ -1715,12 +1704,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
1715
1704
  /**
1716
1705
  * @public
1717
1706
  */
1718
- export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1707
+ export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
1719
1708
 
1720
1709
  /**
1721
1710
  * @public
1722
1711
  */
1723
- export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1712
+ export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
1724
1713
 
1725
1714
  /**
1726
1715
  * Min length = 8 bytes
@@ -1775,8 +1764,7 @@ export declare enum CrdtMessageType {
1775
1764
  PUT_COMPONENT_NETWORK = 5,
1776
1765
  DELETE_COMPONENT_NETWORK = 6,
1777
1766
  DELETE_ENTITY_NETWORK = 7,
1778
- AUTHORITATIVE_PUT_COMPONENT = 8,
1779
- MAX_MESSAGE_TYPE = 9
1767
+ MAX_MESSAGE_TYPE = 8
1780
1768
  }
1781
1769
 
1782
1770
  /**
@@ -1784,8 +1772,6 @@ export declare enum CrdtMessageType {
1784
1772
  */
1785
1773
  export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
1786
1774
 
1787
- export declare const CreatedBy: ICreatedBy;
1788
-
1789
1775
  /**
1790
1776
  * @public
1791
1777
  */
@@ -2222,6 +2208,9 @@ export declare namespace EntityUtils {
2222
2208
  export function toEntityId(entityNumber: number, entityVersion: number): Entity;
2223
2209
  }
2224
2210
 
2211
+ /** @public */
2212
+ export declare const EnvironmentFog: LastWriteWinElementSetComponentDefinition<PBEnvironmentFog>;
2213
+
2225
2214
  /**
2226
2215
  * Constant used to define the minimal number value in Babylon.js
2227
2216
  * @public
@@ -2562,12 +2551,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
2562
2551
 
2563
2552
  export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
2564
2553
 
2565
- export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
2566
-
2567
- export declare interface ICreatedByType {
2568
- address: string;
2569
- }
2570
-
2571
2554
  /**
2572
2555
  * @public
2573
2556
  */
@@ -3054,35 +3037,6 @@ export declare const enum InteractionType {
3054
3037
  PROXIMITY = 1
3055
3038
  }
3056
3039
 
3057
- /**
3058
- * Internal component interface that exposes all internal methods for SDK use
3059
- * This is not exposed to users, only for internal SDK operations
3060
- */
3061
- export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
3062
- /**
3063
- * @public
3064
- * Dry run update to check if a CRDT message would be accepted without actually applying it
3065
- */
3066
- __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
3067
- /**
3068
- * @public
3069
- * Get the iterator to every entity has the component
3070
- */
3071
- iterator(): Iterable<[Entity, any]>;
3072
- /**
3073
- * @public
3074
- */
3075
- dirtyIterator(): Iterable<Entity>;
3076
- /**
3077
- * @public
3078
- */
3079
- __onChangeCallbacks(entity: Entity, value: T): void;
3080
- /**
3081
- * @public
3082
- */
3083
- __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
3084
- }
3085
-
3086
3040
  /**
3087
3041
  * @public
3088
3042
  */
@@ -5371,6 +5325,34 @@ export declare namespace PBEngineInfo {
5371
5325
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBEngineInfo;
5372
5326
  }
5373
5327
 
5328
+ /**
5329
+ * PBEnvironmentFog overrides the environment fog while the player is inside the scene.
5330
+ * Valid only on the scene root entity (`engine.RootEntity`).
5331
+ *
5332
+ * An unset field keeps the time-of-day default.
5333
+ * Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
5334
+ * Gradients do not wrap around midnight.
5335
+ * A scene cannot turn fog on or off. That is a user quality setting.
5336
+ *
5337
+ * While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
5338
+ */
5339
+ /**
5340
+ * @public
5341
+ */
5342
+ export declare interface PBEnvironmentFog {
5343
+ color?: ColorGradient | undefined;
5344
+ /** default = 0.0005, per meter: fog = 1 - e^(-density * distance). Negative values clamp to 0 */
5345
+ density?: number | undefined;
5346
+ }
5347
+
5348
+ /**
5349
+ * @public
5350
+ */
5351
+ export declare namespace PBEnvironmentFog {
5352
+ export function encode(message: PBEnvironmentFog, writer?: _m0.Writer): _m0.Writer;
5353
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBEnvironmentFog;
5354
+ }
5355
+
5374
5356
  /**
5375
5357
  * Grow-only value set appended to the scene root entity.
5376
5358
  * Reports the outcome of an EU_ITEM_PURCHASE flow triggered via OpenExplorerUi.
@@ -6728,6 +6710,105 @@ export declare namespace PBRealmInfo {
6728
6710
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBRealmInfo;
6729
6711
  }
6730
6712
 
6713
+ /**
6714
+ * PBSkybox overrides the visible sky while the player is inside the scene.
6715
+ * Valid only on the scene root entity (`engine.RootEntity`).
6716
+ *
6717
+ * An unset field keeps the time-of-day default.
6718
+ * Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
6719
+ * Gradients do not wrap around midnight.
6720
+ * The sun is controlled by `PBSun` and the fog by `PBEnvironmentFog`.
6721
+ *
6722
+ * While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
6723
+ */
6724
+ /**
6725
+ * @public
6726
+ */
6727
+ export declare interface PBSkybox {
6728
+ /**
6729
+ * Replaces the visible sky with an image, given as its source path with the same rules as `Texture.src`.
6730
+ * It must be an equirectangular (latitude-longitude) image with a 2:1 aspect ratio:
6731
+ * the image centre faces +Z, the top row is the zenith and the bottom row the nadir.
6732
+ * Cube cross, 3x2 and six-face layouts are not supported.
6733
+ * The sun, the fog and the ambient lighting do not change: the ambient still follows `sky_colors`.
6734
+ */
6735
+ skyboxTexture?: string | undefined;
6736
+ /**
6737
+ * Procedural sky colors. They also drive the ambient lighting, also while `skybox_texture` is set.
6738
+ * While `skybox_texture` is set they no longer color the visible sky.
6739
+ */
6740
+ skyColors?: PBSkybox_SkyColors | undefined;
6741
+ /** Ignored while `skybox_texture` is set. */
6742
+ clouds?: PBSkybox_Clouds | undefined;
6743
+ /** Ignored while `skybox_texture` is set. */
6744
+ stars?: PBSkybox_Stars | undefined;
6745
+ }
6746
+
6747
+ /**
6748
+ * @public
6749
+ */
6750
+ export declare namespace PBSkybox {
6751
+ export function encode(message: PBSkybox, writer?: _m0.Writer): _m0.Writer;
6752
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox;
6753
+ }
6754
+
6755
+ /**
6756
+ * @public
6757
+ */
6758
+ export declare interface PBSkybox_Clouds {
6759
+ /** default = 1, from 0 to 1 */
6760
+ opacity?: number | undefined;
6761
+ /** default = 0.01, in radians per second around the sky axis (0.01 is one turn every ~10 minutes). 0 = static, negative reverses the direction */
6762
+ speed?: number | undefined;
6763
+ color?: ColorGradient | undefined;
6764
+ }
6765
+
6766
+ /**
6767
+ * @public
6768
+ */
6769
+ export declare namespace PBSkybox_Clouds {
6770
+ export function encode(message: PBSkybox_Clouds, writer?: _m0.Writer): _m0.Writer;
6771
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Clouds;
6772
+ }
6773
+
6774
+ /**
6775
+ * @public
6776
+ */
6777
+ export declare interface PBSkybox_SkyColors {
6778
+ /** the sky straight up */
6779
+ zenith?: ColorGradient | undefined;
6780
+ /** the broad band of sky around the horizon */
6781
+ horizon?: ColorGradient | undefined;
6782
+ /** The sky below the horizon, visible wherever no terrain covers it (landscape disabled, high altitude). */
6783
+ nadir?: ColorGradient | undefined;
6784
+ /** Narrow glow right on the horizon line, like a sunset glow. Unset = follows `horizon` when that is set. */
6785
+ rim?: ColorGradient | undefined;
6786
+ }
6787
+
6788
+ /**
6789
+ * @public
6790
+ */
6791
+ export declare namespace PBSkybox_SkyColors {
6792
+ export function encode(message: PBSkybox_SkyColors, writer?: _m0.Writer): _m0.Writer;
6793
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_SkyColors;
6794
+ }
6795
+
6796
+ /**
6797
+ * @public
6798
+ */
6799
+ export declare interface PBSkybox_Stars {
6800
+ /** default = 4.62, multiplier on the star texture (1 = as authored, values above 1 are HDR). 0 hides the stars, negative values clamp to 0. Stars are visible only at night */
6801
+ brightness?: number | undefined;
6802
+ }
6803
+
6804
+ /**
6805
+ * @public
6806
+ */
6807
+ export declare namespace PBSkybox_Stars {
6808
+ export function encode(message: PBSkybox_Stars, writer?: _m0.Writer): _m0.Writer;
6809
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Stars;
6810
+ }
6811
+
6731
6812
  /**
6732
6813
  * The SkyboxTime component allows controlling the time of day for the skybox,
6733
6814
  * affecting the lighting and appearance of the sky in the scene.
@@ -6750,6 +6831,42 @@ export declare namespace PBSkyboxTime {
6750
6831
  export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkyboxTime;
6751
6832
  }
6752
6833
 
6834
+ /**
6835
+ * PBSun overrides the directional light (sun and moon) while the player is inside the scene.
6836
+ * Valid only on the scene root entity (`engine.RootEntity`).
6837
+ *
6838
+ * An unset field keeps the time-of-day default.
6839
+ * Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
6840
+ * Gradients do not wrap around midnight.
6841
+ *
6842
+ * While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
6843
+ */
6844
+ /**
6845
+ * @public
6846
+ */
6847
+ export declare interface PBSun {
6848
+ /** tints the directional light and the sun disc */
6849
+ color?: ColorGradient | undefined;
6850
+ /** default = true. false hides the sun and moon discs and the lens flare, but not their light */
6851
+ visible?: boolean | undefined;
6852
+ /** default = 1, multiplier on the renderer's time-of-day light intensity. Negative values clamp to 0 */
6853
+ intensity?: number | undefined;
6854
+ /**
6855
+ * Direction the sunlight travels, in scene space: (0,-1,0) = sun straight overhead. Normalized by the renderer.
6856
+ * Set = the sun stays fixed at every time of day; its color and intensity still follow the time of day.
6857
+ * Unset or zero = the time-of-day path.
6858
+ */
6859
+ direction?: PBVector3 | undefined;
6860
+ }
6861
+
6862
+ /**
6863
+ * @public
6864
+ */
6865
+ export declare namespace PBSun {
6866
+ export function encode(message: PBSun, writer?: _m0.Writer): _m0.Writer;
6867
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSun;
6868
+ }
6869
+
6753
6870
  /**
6754
6871
  * The TextShape component renders customizable floating text.
6755
6872
  *
@@ -9182,6 +9299,9 @@ export declare interface SetMoveRotateScaleParams extends MoveRotateScaleModePar
9182
9299
  easingFunction?: EasingFunction;
9183
9300
  }
9184
9301
 
9302
+ /** @public */
9303
+ export declare const Skybox: LastWriteWinElementSetComponentDefinition<PBSkybox>;
9304
+
9185
9305
  /** @public */
9186
9306
  export declare const SkyboxTime: LastWriteWinElementSetComponentDefinition<PBSkyboxTime>;
9187
9307
 
@@ -9192,6 +9312,9 @@ export declare interface Spec {
9192
9312
  [key: string]: ISchema;
9193
9313
  }
9194
9314
 
9315
+ /** @public */
9316
+ export declare const Sun: LastWriteWinElementSetComponentDefinition<PBSun>;
9317
+
9195
9318
  /**
9196
9319
  * @alpha
9197
9320
  * This is going to be used for sync components through a server.
@@ -9541,6 +9664,12 @@ export declare interface TouchScreenControlsComponentDefinitionExtended extends
9541
9664
  * Does NOT change the joystick/crosshair — use `showJoystick()` / `showCrosshair()` for those.
9542
9665
  */
9543
9666
  showAll(): void;
9667
+ /**
9668
+ * Show the default button set: jump, pointer and primary visible, secondary and
9669
+ * actions 3-6 hidden. This is the state every scene starts in.
9670
+ * Does NOT change the joystick/crosshair, the main action or custom icons.
9671
+ */
9672
+ showDefault(): void;
9544
9673
  /** Hide the given on-screen buttons (merged into the current config). */
9545
9674
  hide(actions: InputAction[]): void;
9546
9675
  /** Set which action the large central button triggers. */
@@ -9633,16 +9762,6 @@ export declare type Transport = {
9633
9762
  onmessage?(message: Uint8Array): void;
9634
9763
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
9635
9764
  type?: string;
9636
- /**
9637
- * Whether this transport is allowed to mutate reserved-range entities
9638
- * (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
9639
- * Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
9640
- * or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
9641
- * AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
9642
- * this flag (a comms peer, or any scene-added transport) is rejected — see
9643
- * `receiveMessages`.
9644
- */
9645
- allowReservedEntities?: boolean;
9646
9765
  };
9647
9766
 
9648
9767
  /**
@@ -10224,14 +10343,6 @@ export declare interface UiTransformProps {
10224
10343
  */
10225
10344
  export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
10226
10345
 
10227
- export declare type ValidateCallback<T> = (value: {
10228
- entity: Entity;
10229
- currentValue: T | undefined;
10230
- newValue: T | undefined;
10231
- senderAddress: string;
10232
- createdBy: string;
10233
- }) => boolean;
10234
-
10235
10346
  /**
10236
10347
  * @public
10237
10348
  */