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

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.
@@ -136,6 +136,29 @@ export interface AudioStreamComponentDefinitionExtended extends LastWriteWinElem
136
136
  getAudioState(entity: Entity): PBAudioEvent | undefined;
137
137
  }
138
138
 
139
+ // @public (undocumented)
140
+ export type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
141
+
142
+ // Warning: (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag
143
+ //
144
+ // @public
145
+ export type AuthoritativePutComponentMessageBody = {
146
+ type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
147
+ entityId: Entity;
148
+ componentId: number;
149
+ timestamp: number;
150
+ data: Uint8Array;
151
+ };
152
+
153
+ // @public (undocumented)
154
+ export namespace AuthoritativePutComponentOperation {
155
+ const // (undocumented)
156
+ MESSAGE_HEADER_LENGTH = 16;
157
+ // (undocumented)
158
+ export function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
159
+ export function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
160
+ }
161
+
139
162
  // @public (undocumented)
140
163
  export const enum AvatarAnchorPointType {
141
164
  // (undocumented)
@@ -263,12 +286,20 @@ export interface BaseComponent<T> {
263
286
  dumpCrdtStateToBuffer(buffer: ByteBuffer, filterEntity?: (entity: Entity) => boolean): void;
264
287
  entityDeleted(entity: Entity, markAsDirty: boolean): void;
265
288
  get(entity: Entity): any;
289
+ getCrdtState(entity: Entity): {
290
+ data: Uint8Array;
291
+ timestamp: number;
292
+ } | null;
266
293
  getCrdtUpdates(): Iterable<CrdtMessageBody>;
267
294
  has(entity: Entity): boolean;
268
295
  onChange(entity: Entity, cb: (value: T | undefined) => void): void;
269
296
  // (undocumented)
270
297
  readonly schema: ISchema<T>;
271
298
  updateFromCrdt(body: CrdtMessageBody): [null | ConflictResolutionMessage, T | undefined];
299
+ // (undocumented)
300
+ validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
301
+ // (undocumented)
302
+ validateBeforeChange(cb: ValidateCallback<T>): void;
272
303
  }
273
304
 
274
305
  // @public (undocumented)
@@ -664,34 +695,6 @@ export type Color4Type = {
664
695
  a: number;
665
696
  };
666
697
 
667
- // @public (undocumented)
668
- export interface ColorGradient {
669
- // (undocumented)
670
- keys: ColorKey[];
671
- }
672
-
673
- // @public (undocumented)
674
- export namespace ColorGradient {
675
- // (undocumented)
676
- export function decode(input: _m0.Reader | Uint8Array, length?: number): ColorGradient;
677
- // (undocumented)
678
- export function encode(message: ColorGradient, writer?: _m0.Writer): _m0.Writer;
679
- }
680
-
681
- // @public (undocumented)
682
- export interface ColorKey {
683
- color: PBColor4 | undefined;
684
- time: number;
685
- }
686
-
687
- // @public (undocumented)
688
- export namespace ColorKey {
689
- // (undocumented)
690
- export function decode(input: _m0.Reader | Uint8Array, length?: number): ColorKey;
691
- // (undocumented)
692
- export function encode(message: ColorKey, writer?: _m0.Writer): _m0.Writer;
693
- }
694
-
695
698
  // @public (undocumented)
696
699
  export interface ColorRange {
697
700
  // (undocumented)
@@ -758,7 +761,6 @@ export const componentDefinitionByName: {
758
761
  "core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
759
762
  "core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
760
763
  "core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
761
- "core::EnvironmentFog": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEnvironmentFog>>;
762
764
  "core::ExplorerItemPurchaseResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>>;
763
765
  "core::ExplorerUiEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>>;
764
766
  "core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
@@ -782,9 +784,7 @@ export const componentDefinitionByName: {
782
784
  "core::Raycast": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycast>>;
783
785
  "core::RaycastResult": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRaycastResult>>;
784
786
  "core::RealmInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBRealmInfo>>;
785
- "core::Skybox": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkybox>>;
786
787
  "core::SkyboxTime": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSkyboxTime>>;
787
- "core::Sun": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBSun>>;
788
788
  "core::TextShape": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTextShape>>;
789
789
  "core::TouchScreenControls": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTouchScreenControls>>;
790
790
  "core::TriggerArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBTriggerArea>>;
@@ -940,10 +940,10 @@ export type Coords = {
940
940
  export const CRDT_MESSAGE_HEADER_LENGTH = 8;
941
941
 
942
942
  // @public (undocumented)
943
- export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
943
+ export type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
944
944
 
945
945
  // @public (undocumented)
946
- export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
946
+ export type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
947
947
 
948
948
  // @public
949
949
  export type CrdtMessageHeader = {
@@ -964,6 +964,8 @@ export enum CrdtMessageType {
964
964
  // (undocumented)
965
965
  APPEND_VALUE = 4,
966
966
  // (undocumented)
967
+ AUTHORITATIVE_PUT_COMPONENT = 8,
968
+ // (undocumented)
967
969
  DELETE_COMPONENT = 2,
968
970
  // (undocumented)
969
971
  DELETE_COMPONENT_NETWORK = 6,
@@ -972,7 +974,7 @@ export enum CrdtMessageType {
972
974
  // (undocumented)
973
975
  DELETE_ENTITY_NETWORK = 7,
974
976
  // (undocumented)
975
- MAX_MESSAGE_TYPE = 8,
977
+ MAX_MESSAGE_TYPE = 9,
976
978
  // (undocumented)
977
979
  PUT_COMPONENT = 1,
978
980
  // (undocumented)
@@ -984,6 +986,11 @@ export enum CrdtMessageType {
984
986
  // @public (undocumented)
985
987
  export type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
986
988
 
989
+ // Warning: (ae-missing-release-tag) "CreatedBy" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
990
+ //
991
+ // @public (undocumented)
992
+ export const CreatedBy: ICreatedBy;
993
+
987
994
  // @public (undocumented)
988
995
  export function createEntityContainer(opts?: {
989
996
  reservedStaticEntities: number;
@@ -1290,9 +1297,6 @@ export namespace EntityUtils {
1290
1297
  export function toEntityId(entityNumber: number, entityVersion: number): Entity;
1291
1298
  }
1292
1299
 
1293
- // @public (undocumented)
1294
- export const EnvironmentFog: LastWriteWinElementSetComponentDefinition<PBEnvironmentFog>;
1295
-
1296
1300
  // @public
1297
1301
  export const Epsilon = 0.000001;
1298
1302
 
@@ -1480,6 +1484,19 @@ export interface GrowOnlyValueSetComponentDefinition<T> extends BaseComponent<T>
1480
1484
  // @public (undocumented)
1481
1485
  export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
1482
1486
 
1487
+ // Warning: (ae-missing-release-tag) "ICreatedBy" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
1488
+ //
1489
+ // @public (undocumented)
1490
+ export type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
1491
+
1492
+ // Warning: (ae-missing-release-tag) "ICreatedByType" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
1493
+ //
1494
+ // @public (undocumented)
1495
+ export interface ICreatedByType {
1496
+ // (undocumented)
1497
+ address: string;
1498
+ }
1499
+
1483
1500
  // @public (undocumented)
1484
1501
  export interface IEngine {
1485
1502
  addEntity(): Entity;
@@ -1736,6 +1753,20 @@ export const enum InteractionType {
1736
1753
  PROXIMITY = 1
1737
1754
  }
1738
1755
 
1756
+ // Warning: (ae-missing-release-tag) "InternalBaseComponent" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
1757
+ //
1758
+ // @public
1759
+ export interface InternalBaseComponent<T> extends BaseComponent<T> {
1760
+ __dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
1761
+ // (undocumented)
1762
+ __onChangeCallbacks(entity: Entity, value: T): void;
1763
+ // (undocumented)
1764
+ __run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
1765
+ // (undocumented)
1766
+ dirtyIterator(): Iterable<Entity>;
1767
+ iterator(): Iterable<[Entity, any]>;
1768
+ }
1769
+
1739
1770
  // @public (undocumented)
1740
1771
  export interface ISchema<T = any> {
1741
1772
  // (undocumented)
@@ -2834,21 +2865,6 @@ export namespace PBEngineInfo {
2834
2865
  export function encode(message: PBEngineInfo, writer?: _m0.Writer): _m0.Writer;
2835
2866
  }
2836
2867
 
2837
- // @public (undocumented)
2838
- export interface PBEnvironmentFog {
2839
- // (undocumented)
2840
- color?: ColorGradient | undefined;
2841
- density?: number | undefined;
2842
- }
2843
-
2844
- // @public (undocumented)
2845
- export namespace PBEnvironmentFog {
2846
- // (undocumented)
2847
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBEnvironmentFog;
2848
- // (undocumented)
2849
- export function encode(message: PBEnvironmentFog, writer?: _m0.Writer): _m0.Writer;
2850
- }
2851
-
2852
2868
  // @public (undocumented)
2853
2869
  export interface PBExplorerItemPurchaseResult {
2854
2870
  requestId: number;
@@ -3800,67 +3816,6 @@ export namespace PBRealmInfo {
3800
3816
  export function encode(message: PBRealmInfo, writer?: _m0.Writer): _m0.Writer;
3801
3817
  }
3802
3818
 
3803
- // @public (undocumented)
3804
- export interface PBSkybox {
3805
- clouds?: PBSkybox_Clouds | undefined;
3806
- skyboxTexture?: string | undefined;
3807
- skyColors?: PBSkybox_SkyColors | undefined;
3808
- stars?: PBSkybox_Stars | undefined;
3809
- }
3810
-
3811
- // @public (undocumented)
3812
- export namespace PBSkybox {
3813
- // (undocumented)
3814
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox;
3815
- // (undocumented)
3816
- export function encode(message: PBSkybox, writer?: _m0.Writer): _m0.Writer;
3817
- }
3818
-
3819
- // @public (undocumented)
3820
- export interface PBSkybox_Clouds {
3821
- // (undocumented)
3822
- color?: ColorGradient | undefined;
3823
- opacity?: number | undefined;
3824
- speed?: number | undefined;
3825
- }
3826
-
3827
- // @public (undocumented)
3828
- export namespace PBSkybox_Clouds {
3829
- // (undocumented)
3830
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Clouds;
3831
- // (undocumented)
3832
- export function encode(message: PBSkybox_Clouds, writer?: _m0.Writer): _m0.Writer;
3833
- }
3834
-
3835
- // @public (undocumented)
3836
- export interface PBSkybox_SkyColors {
3837
- horizon?: ColorGradient | undefined;
3838
- nadir?: ColorGradient | undefined;
3839
- rim?: ColorGradient | undefined;
3840
- zenith?: ColorGradient | undefined;
3841
- }
3842
-
3843
- // @public (undocumented)
3844
- export namespace PBSkybox_SkyColors {
3845
- // (undocumented)
3846
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_SkyColors;
3847
- // (undocumented)
3848
- export function encode(message: PBSkybox_SkyColors, writer?: _m0.Writer): _m0.Writer;
3849
- }
3850
-
3851
- // @public (undocumented)
3852
- export interface PBSkybox_Stars {
3853
- brightness?: number | undefined;
3854
- }
3855
-
3856
- // @public (undocumented)
3857
- export namespace PBSkybox_Stars {
3858
- // (undocumented)
3859
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Stars;
3860
- // (undocumented)
3861
- export function encode(message: PBSkybox_Stars, writer?: _m0.Writer): _m0.Writer;
3862
- }
3863
-
3864
3819
  // @public (undocumented)
3865
3820
  export interface PBSkyboxTime {
3866
3821
  fixedTime: number;
@@ -3875,22 +3830,6 @@ export namespace PBSkyboxTime {
3875
3830
  export function encode(message: PBSkyboxTime, writer?: _m0.Writer): _m0.Writer;
3876
3831
  }
3877
3832
 
3878
- // @public (undocumented)
3879
- export interface PBSun {
3880
- color?: ColorGradient | undefined;
3881
- direction?: PBVector3 | undefined;
3882
- intensity?: number | undefined;
3883
- visible?: boolean | undefined;
3884
- }
3885
-
3886
- // @public (undocumented)
3887
- export namespace PBSun {
3888
- // (undocumented)
3889
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSun;
3890
- // (undocumented)
3891
- export function encode(message: PBSun, writer?: _m0.Writer): _m0.Writer;
3892
- }
3893
-
3894
3833
  // @public (undocumented)
3895
3834
  export interface PBTextShape {
3896
3835
  font?: Font | undefined;
@@ -5169,9 +5108,6 @@ export interface SetMoveRotateScaleParams extends MoveRotateScaleModeParams {
5169
5108
  easingFunction?: EasingFunction;
5170
5109
  }
5171
5110
 
5172
- // @public (undocumented)
5173
- export const Skybox: LastWriteWinElementSetComponentDefinition<PBSkybox>;
5174
-
5175
5111
  // @public (undocumented)
5176
5112
  export const SkyboxTime: LastWriteWinElementSetComponentDefinition<PBSkyboxTime>;
5177
5113
 
@@ -5181,9 +5117,6 @@ export interface Spec {
5181
5117
  [key: string]: ISchema;
5182
5118
  }
5183
5119
 
5184
- // @public (undocumented)
5185
- export const Sun: LastWriteWinElementSetComponentDefinition<PBSun>;
5186
-
5187
5120
  // @alpha
5188
5121
  export const SyncComponents: ISyncComponents;
5189
5122
 
@@ -5501,6 +5434,7 @@ export type Transport = {
5501
5434
  onmessage?(message: Uint8Array): void;
5502
5435
  filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
5503
5436
  type?: string;
5437
+ allowReservedEntities?: boolean;
5504
5438
  };
5505
5439
 
5506
5440
  // @public (undocumented)
@@ -5800,6 +5734,17 @@ export interface UiTransformProps {
5800
5734
  // @public (undocumented)
5801
5735
  export type Unpacked<T> = T extends (infer U)[] ? U : T;
5802
5736
 
5737
+ // Warning: (ae-missing-release-tag) "ValidateCallback" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
5738
+ //
5739
+ // @public (undocumented)
5740
+ export type ValidateCallback<T> = (value: {
5741
+ entity: Entity;
5742
+ currentValue: T | undefined;
5743
+ newValue: T | undefined;
5744
+ senderAddress: string;
5745
+ createdBy: string;
5746
+ }) => boolean;
5747
+
5803
5748
  // @public (undocumented)
5804
5749
  export type ValueSetOptions<T> = {
5805
5750
  timestampFunction: (value: DeepReadonly<T>) => number;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dcl/playground-assets",
3
3
  "description": "",
4
- "version": "7.31.1-40962203448.commit-c68a75f",
4
+ "version": "7.31.1-41498712919.commit-5e4cada",
5
5
  "author": "Decentraland",
6
6
  "dependencies": {
7
- "@dcl/js-runtime": "7.31.1-40962203448.commit-c68a75f",
8
- "@dcl/sdk": "7.31.1-40962203448.commit-c68a75f"
7
+ "@dcl/js-runtime": "7.31.1-41498712919.commit-5e4cada",
8
+ "@dcl/sdk": "7.31.1-41498712919.commit-5e4cada"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@microsoft/api-extractor": "^7.33.8"
@@ -25,12 +25,13 @@
25
25
  "scripts": {
26
26
  "build": "npm run build-playground && node_modules/.bin/api-extractor run",
27
27
  "build-local": "npm run build-playground && node_modules/.bin/api-extractor run --local --verbose --diagnostics",
28
- "build-playground": "./../sdk-commands/dist/index.js build --production --emitDeclaration --customEntryPoint"
28
+ "build-playground": "./../sdk-commands/dist/index.js build --production --emitDeclaration --customEntryPoint",
29
+ "server-logs": "sdk-commands sdk-server-logs"
29
30
  },
30
31
  "tsdoc": {
31
32
  "tsdocFlavor": "AEDoc"
32
33
  },
33
34
  "types": "./dist/index.d.ts",
34
35
  "typings": "./dist/index.d.ts",
35
- "commit": "c68a75f58918b98e0ed664d59ae7da36c114cb4b"
36
+ "commit": "5e4cadacd85ac2d2629b68e4bc4ad67a6ff66df9"
36
37
  }