@dcl/playground-assets 7.33.0 → 7.33.1-44149226847.commit-7d1c56d
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.
- package/dist/alpha.d.ts +162 -16
- package/dist/beta.d.ts +162 -16
- package/dist/index.bundled.d.ts +162 -16
- package/dist/index.js +7 -7
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +162 -16
- package/etc/playground-assets.api.json +1263 -11
- package/etc/playground-assets.api.md +96 -3
- package/package.json +6 -5
package/dist/alpha.d.ts
CHANGED
|
@@ -245,6 +245,42 @@ 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
|
+
|
|
248
284
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
249
285
|
/**
|
|
250
286
|
* @public
|
|
@@ -420,6 +456,22 @@ export declare interface BaseComponent<T> {
|
|
|
420
456
|
* If the value is undefined, the component was deleted.
|
|
421
457
|
*/
|
|
422
458
|
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;
|
|
423
475
|
}
|
|
424
476
|
|
|
425
477
|
/** @public */
|
|
@@ -1704,12 +1756,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1704
1756
|
/**
|
|
1705
1757
|
* @public
|
|
1706
1758
|
*/
|
|
1707
|
-
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1759
|
+
export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1708
1760
|
|
|
1709
1761
|
/**
|
|
1710
1762
|
* @public
|
|
1711
1763
|
*/
|
|
1712
|
-
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1764
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1713
1765
|
|
|
1714
1766
|
/**
|
|
1715
1767
|
* Min length = 8 bytes
|
|
@@ -1764,7 +1816,8 @@ export declare enum CrdtMessageType {
|
|
|
1764
1816
|
PUT_COMPONENT_NETWORK = 5,
|
|
1765
1817
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1766
1818
|
DELETE_ENTITY_NETWORK = 7,
|
|
1767
|
-
|
|
1819
|
+
AUTHORITATIVE_PUT_COMPONENT = 8,
|
|
1820
|
+
MAX_MESSAGE_TYPE = 9
|
|
1768
1821
|
}
|
|
1769
1822
|
|
|
1770
1823
|
/**
|
|
@@ -1772,6 +1825,8 @@ export declare enum CrdtMessageType {
|
|
|
1772
1825
|
*/
|
|
1773
1826
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1774
1827
|
|
|
1828
|
+
export declare const CreatedBy: ICreatedBy;
|
|
1829
|
+
|
|
1775
1830
|
/**
|
|
1776
1831
|
* @public
|
|
1777
1832
|
*/
|
|
@@ -2551,6 +2606,12 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2551
2606
|
|
|
2552
2607
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2553
2608
|
|
|
2609
|
+
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2610
|
+
|
|
2611
|
+
export declare interface ICreatedByType {
|
|
2612
|
+
address: string;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2554
2615
|
/**
|
|
2555
2616
|
* @public
|
|
2556
2617
|
*/
|
|
@@ -3037,6 +3098,35 @@ export declare const enum InteractionType {
|
|
|
3037
3098
|
PROXIMITY = 1
|
|
3038
3099
|
}
|
|
3039
3100
|
|
|
3101
|
+
/**
|
|
3102
|
+
* Internal component interface that exposes all internal methods for SDK use
|
|
3103
|
+
* This is not exposed to users, only for internal SDK operations
|
|
3104
|
+
*/
|
|
3105
|
+
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3106
|
+
/**
|
|
3107
|
+
* @public
|
|
3108
|
+
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3109
|
+
*/
|
|
3110
|
+
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3111
|
+
/**
|
|
3112
|
+
* @public
|
|
3113
|
+
* Get the iterator to every entity has the component
|
|
3114
|
+
*/
|
|
3115
|
+
iterator(): Iterable<[Entity, any]>;
|
|
3116
|
+
/**
|
|
3117
|
+
* @public
|
|
3118
|
+
*/
|
|
3119
|
+
dirtyIterator(): Iterable<Entity>;
|
|
3120
|
+
/**
|
|
3121
|
+
* @public
|
|
3122
|
+
*/
|
|
3123
|
+
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3124
|
+
/**
|
|
3125
|
+
* @public
|
|
3126
|
+
*/
|
|
3127
|
+
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3040
3130
|
/**
|
|
3041
3131
|
* @public
|
|
3042
3132
|
*/
|
|
@@ -4992,7 +5082,7 @@ export declare namespace PBAvatarEmoteCommand {
|
|
|
4992
5082
|
/**
|
|
4993
5083
|
* AvatarEquipData is used to read the information about the avatar's owneables.
|
|
4994
5084
|
* this component is written by the engine using the communications transports'
|
|
4995
|
-
* data.
|
|
5085
|
+
* data. It describes the outfit in the player's profile.
|
|
4996
5086
|
*/
|
|
4997
5087
|
/**
|
|
4998
5088
|
* @public
|
|
@@ -5000,6 +5090,8 @@ export declare namespace PBAvatarEmoteCommand {
|
|
|
5000
5090
|
export declare interface PBAvatarEquippedData {
|
|
5001
5091
|
wearableUrns: string[];
|
|
5002
5092
|
emoteUrns: string[];
|
|
5093
|
+
/** one per item of wearable_urns, in the same order */
|
|
5094
|
+
wearables: PBAvatarEquippedData_EquippedWearable[];
|
|
5003
5095
|
}
|
|
5004
5096
|
|
|
5005
5097
|
/**
|
|
@@ -5010,6 +5102,27 @@ export declare namespace PBAvatarEquippedData {
|
|
|
5010
5102
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
|
5011
5103
|
}
|
|
5012
5104
|
|
|
5105
|
+
/**
|
|
5106
|
+
* @public
|
|
5107
|
+
*/
|
|
5108
|
+
export declare interface PBAvatarEquippedData_EquippedWearable {
|
|
5109
|
+
urn: string;
|
|
5110
|
+
/**
|
|
5111
|
+
* true if the wearable is visible in the profile outfit, after hides, replaces and force render apply.
|
|
5112
|
+
* Of two wearables with the same category, the later one is used: the earlier one is false and hides nothing.
|
|
5113
|
+
* Unset until all the wearables of the outfit have loaded or failed. A wearable that failed to load is false.
|
|
5114
|
+
*/
|
|
5115
|
+
visible?: boolean | undefined;
|
|
5116
|
+
}
|
|
5117
|
+
|
|
5118
|
+
/**
|
|
5119
|
+
* @public
|
|
5120
|
+
*/
|
|
5121
|
+
export declare namespace PBAvatarEquippedData_EquippedWearable {
|
|
5122
|
+
export function encode(message: PBAvatarEquippedData_EquippedWearable, writer?: _m0.Writer): _m0.Writer;
|
|
5123
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData_EquippedWearable;
|
|
5124
|
+
}
|
|
5125
|
+
|
|
5013
5126
|
/**
|
|
5014
5127
|
* The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
|
|
5015
5128
|
* as the avatar movement speed, jump height etc.
|
|
@@ -5126,19 +5239,29 @@ export declare namespace PBAvatarNametag {
|
|
|
5126
5239
|
* The AvatarShape component contains the information required to draw and animate avatar, acting as
|
|
5127
5240
|
* a simplified GLTF container for this specific case.
|
|
5128
5241
|
*
|
|
5129
|
-
* All fields (except ID) are optional have reasonable default values. In the case of `wearables`,
|
|
5242
|
+
* All fields (except ID) are optional and have reasonable default values. In the case of `wearables`,
|
|
5130
5243
|
* each slot on the Avatar's body that is not explicitly included in the list has its own default.
|
|
5131
5244
|
*
|
|
5132
|
-
*
|
|
5133
|
-
*
|
|
5245
|
+
* On most entities, AvatarShape draws an avatar, for example an NPC. Other requirements are usually
|
|
5246
|
+
* better served by GLTFs.
|
|
5247
|
+
*
|
|
5248
|
+
* On a player entity (`engine.PlayerEntity` or the entity of another player), AvatarShape changes the
|
|
5249
|
+
* look of that player's avatar:
|
|
5250
|
+
* - An unset field keeps the value from the player's profile. The defaults below apply only to other entities.
|
|
5251
|
+
* - A non-empty `wearables` replaces all the wearables. A body slot that it does not fill stays empty.
|
|
5252
|
+
* An empty `wearables` is the same as unset.
|
|
5253
|
+
* - Fields marked "ignored on player entities" have no effect.
|
|
5254
|
+
* - The change is local to this client. It is not broadcast.
|
|
5255
|
+
* - The change applies only while the scene that wrote it is the current scene.
|
|
5256
|
+
* - AvatarBase and AvatarEquippedData keep the values from the profile.
|
|
5134
5257
|
*/
|
|
5135
5258
|
/**
|
|
5136
5259
|
* @public
|
|
5137
5260
|
*/
|
|
5138
5261
|
export declare interface PBAvatarShape {
|
|
5139
|
-
/** the user ID */
|
|
5262
|
+
/** the user ID; ignored on player entities */
|
|
5140
5263
|
id: string;
|
|
5141
|
-
/** visible name (default: "NPC") */
|
|
5264
|
+
/** visible name (default: "NPC"); ignored on player entities */
|
|
5142
5265
|
name?: string | undefined;
|
|
5143
5266
|
/** shape URN (default "urn:decentraland:off-chain:base-avatars:BaseFemale") */
|
|
5144
5267
|
bodyShape?: string | undefined;
|
|
@@ -5148,25 +5271,30 @@ export declare interface PBAvatarShape {
|
|
|
5148
5271
|
hairColor?: PBColor3 | undefined;
|
|
5149
5272
|
/** RGB (default [0.6, 0.462, 0.356]) */
|
|
5150
5273
|
eyeColor?: PBColor3 | undefined;
|
|
5151
|
-
/** current emote animations */
|
|
5274
|
+
/** current emote animations; ignored on player entities */
|
|
5152
5275
|
expressionTriggerId?: string | undefined;
|
|
5153
|
-
/** start of emote animations (in the same order) */
|
|
5276
|
+
/** start of emote animations (in the same order); ignored on player entities */
|
|
5154
5277
|
expressionTriggerTimestamp?: number | undefined;
|
|
5155
|
-
/** whether to display the floating voice chat icon */
|
|
5278
|
+
/** whether to display the floating voice chat icon; ignored on player entities */
|
|
5156
5279
|
talking?: boolean | undefined;
|
|
5157
5280
|
/**
|
|
5158
|
-
*
|
|
5281
|
+
* Wearables, one per body slot. Each item is one of:
|
|
5282
|
+
* - a wearable URN
|
|
5283
|
+
* - the path of a GLB file in the scene content, named `<name>_<category>.glb`, for example `cap_hat.glb`
|
|
5284
|
+
* If two items have the same category, the later item is used.
|
|
5285
|
+
* A scene GLB is always visible and hides nothing. Exception: a `skin` GLB hides the body that it replaces.
|
|
5286
|
+
* If an item is not a URN or a `.glb` path, or if it cannot be loaded, the item is skipped.
|
|
5159
5287
|
* Default values for each unspecified slot:
|
|
5160
5288
|
* Eyes : "urn:decentraland:off-chain:base-avatars:f_eyes_00",
|
|
5161
5289
|
* Eyebrows: "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
|
|
5162
|
-
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00"
|
|
5290
|
+
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00",
|
|
5163
5291
|
* Hair : "urn:decentraland:off-chain:base-avatars:standard_hair",
|
|
5164
5292
|
* Shirt : "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
|
|
5165
5293
|
* Trousers: "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
|
|
5166
|
-
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
5294
|
+
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
5167
5295
|
*/
|
|
5168
5296
|
wearables: string[];
|
|
5169
|
-
/** available emotes (default empty) */
|
|
5297
|
+
/** available emotes (default empty); ignored on player entities */
|
|
5170
5298
|
emotes: string[];
|
|
5171
5299
|
/** hides the skin + hair + facial features (default: false) */
|
|
5172
5300
|
showOnlyWearables?: boolean | undefined;
|
|
@@ -9762,6 +9890,16 @@ export declare type Transport = {
|
|
|
9762
9890
|
onmessage?(message: Uint8Array): void;
|
|
9763
9891
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
9764
9892
|
type?: string;
|
|
9893
|
+
/**
|
|
9894
|
+
* Whether this transport is allowed to mutate reserved-range entities
|
|
9895
|
+
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
9896
|
+
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
9897
|
+
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
9898
|
+
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
9899
|
+
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
9900
|
+
* `receiveMessages`.
|
|
9901
|
+
*/
|
|
9902
|
+
allowReservedEntities?: boolean;
|
|
9765
9903
|
};
|
|
9766
9904
|
|
|
9767
9905
|
/**
|
|
@@ -10343,6 +10481,14 @@ export declare interface UiTransformProps {
|
|
|
10343
10481
|
*/
|
|
10344
10482
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10345
10483
|
|
|
10484
|
+
export declare type ValidateCallback<T> = (value: {
|
|
10485
|
+
entity: Entity;
|
|
10486
|
+
currentValue: T | undefined;
|
|
10487
|
+
newValue: T | undefined;
|
|
10488
|
+
senderAddress: string;
|
|
10489
|
+
createdBy: string;
|
|
10490
|
+
}) => boolean;
|
|
10491
|
+
|
|
10346
10492
|
/**
|
|
10347
10493
|
* @public
|
|
10348
10494
|
*/
|
package/dist/beta.d.ts
CHANGED
|
@@ -245,6 +245,42 @@ 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
|
+
|
|
248
284
|
/** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
|
|
249
285
|
/**
|
|
250
286
|
* @public
|
|
@@ -420,6 +456,22 @@ export declare interface BaseComponent<T> {
|
|
|
420
456
|
* If the value is undefined, the component was deleted.
|
|
421
457
|
*/
|
|
422
458
|
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;
|
|
423
475
|
}
|
|
424
476
|
|
|
425
477
|
/** @public */
|
|
@@ -1704,12 +1756,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1704
1756
|
/**
|
|
1705
1757
|
* @public
|
|
1706
1758
|
*/
|
|
1707
|
-
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1759
|
+
export declare type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1708
1760
|
|
|
1709
1761
|
/**
|
|
1710
1762
|
* @public
|
|
1711
1763
|
*/
|
|
1712
|
-
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1764
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1713
1765
|
|
|
1714
1766
|
/**
|
|
1715
1767
|
* Min length = 8 bytes
|
|
@@ -1764,7 +1816,8 @@ export declare enum CrdtMessageType {
|
|
|
1764
1816
|
PUT_COMPONENT_NETWORK = 5,
|
|
1765
1817
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1766
1818
|
DELETE_ENTITY_NETWORK = 7,
|
|
1767
|
-
|
|
1819
|
+
AUTHORITATIVE_PUT_COMPONENT = 8,
|
|
1820
|
+
MAX_MESSAGE_TYPE = 9
|
|
1768
1821
|
}
|
|
1769
1822
|
|
|
1770
1823
|
/**
|
|
@@ -1772,6 +1825,8 @@ export declare enum CrdtMessageType {
|
|
|
1772
1825
|
*/
|
|
1773
1826
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1774
1827
|
|
|
1828
|
+
export declare const CreatedBy: ICreatedBy;
|
|
1829
|
+
|
|
1775
1830
|
/**
|
|
1776
1831
|
* @public
|
|
1777
1832
|
*/
|
|
@@ -2551,6 +2606,12 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2551
2606
|
|
|
2552
2607
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2553
2608
|
|
|
2609
|
+
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2610
|
+
|
|
2611
|
+
export declare interface ICreatedByType {
|
|
2612
|
+
address: string;
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2554
2615
|
/**
|
|
2555
2616
|
* @public
|
|
2556
2617
|
*/
|
|
@@ -3028,6 +3089,35 @@ export declare const enum InteractionType {
|
|
|
3028
3089
|
PROXIMITY = 1
|
|
3029
3090
|
}
|
|
3030
3091
|
|
|
3092
|
+
/**
|
|
3093
|
+
* Internal component interface that exposes all internal methods for SDK use
|
|
3094
|
+
* This is not exposed to users, only for internal SDK operations
|
|
3095
|
+
*/
|
|
3096
|
+
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3097
|
+
/**
|
|
3098
|
+
* @public
|
|
3099
|
+
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3100
|
+
*/
|
|
3101
|
+
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3102
|
+
/**
|
|
3103
|
+
* @public
|
|
3104
|
+
* Get the iterator to every entity has the component
|
|
3105
|
+
*/
|
|
3106
|
+
iterator(): Iterable<[Entity, any]>;
|
|
3107
|
+
/**
|
|
3108
|
+
* @public
|
|
3109
|
+
*/
|
|
3110
|
+
dirtyIterator(): Iterable<Entity>;
|
|
3111
|
+
/**
|
|
3112
|
+
* @public
|
|
3113
|
+
*/
|
|
3114
|
+
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3115
|
+
/**
|
|
3116
|
+
* @public
|
|
3117
|
+
*/
|
|
3118
|
+
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3119
|
+
}
|
|
3120
|
+
|
|
3031
3121
|
/**
|
|
3032
3122
|
* @public
|
|
3033
3123
|
*/
|
|
@@ -4964,7 +5054,7 @@ export declare namespace PBAvatarEmoteCommand {
|
|
|
4964
5054
|
/**
|
|
4965
5055
|
* AvatarEquipData is used to read the information about the avatar's owneables.
|
|
4966
5056
|
* this component is written by the engine using the communications transports'
|
|
4967
|
-
* data.
|
|
5057
|
+
* data. It describes the outfit in the player's profile.
|
|
4968
5058
|
*/
|
|
4969
5059
|
/**
|
|
4970
5060
|
* @public
|
|
@@ -4972,6 +5062,8 @@ export declare namespace PBAvatarEmoteCommand {
|
|
|
4972
5062
|
export declare interface PBAvatarEquippedData {
|
|
4973
5063
|
wearableUrns: string[];
|
|
4974
5064
|
emoteUrns: string[];
|
|
5065
|
+
/** one per item of wearable_urns, in the same order */
|
|
5066
|
+
wearables: PBAvatarEquippedData_EquippedWearable[];
|
|
4975
5067
|
}
|
|
4976
5068
|
|
|
4977
5069
|
/**
|
|
@@ -4982,6 +5074,27 @@ export declare namespace PBAvatarEquippedData {
|
|
|
4982
5074
|
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
|
4983
5075
|
}
|
|
4984
5076
|
|
|
5077
|
+
/**
|
|
5078
|
+
* @public
|
|
5079
|
+
*/
|
|
5080
|
+
export declare interface PBAvatarEquippedData_EquippedWearable {
|
|
5081
|
+
urn: string;
|
|
5082
|
+
/**
|
|
5083
|
+
* true if the wearable is visible in the profile outfit, after hides, replaces and force render apply.
|
|
5084
|
+
* Of two wearables with the same category, the later one is used: the earlier one is false and hides nothing.
|
|
5085
|
+
* Unset until all the wearables of the outfit have loaded or failed. A wearable that failed to load is false.
|
|
5086
|
+
*/
|
|
5087
|
+
visible?: boolean | undefined;
|
|
5088
|
+
}
|
|
5089
|
+
|
|
5090
|
+
/**
|
|
5091
|
+
* @public
|
|
5092
|
+
*/
|
|
5093
|
+
export declare namespace PBAvatarEquippedData_EquippedWearable {
|
|
5094
|
+
export function encode(message: PBAvatarEquippedData_EquippedWearable, writer?: _m0.Writer): _m0.Writer;
|
|
5095
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData_EquippedWearable;
|
|
5096
|
+
}
|
|
5097
|
+
|
|
4985
5098
|
/**
|
|
4986
5099
|
* The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
|
|
4987
5100
|
* as the avatar movement speed, jump height etc.
|
|
@@ -5098,19 +5211,29 @@ export declare namespace PBAvatarNametag {
|
|
|
5098
5211
|
* The AvatarShape component contains the information required to draw and animate avatar, acting as
|
|
5099
5212
|
* a simplified GLTF container for this specific case.
|
|
5100
5213
|
*
|
|
5101
|
-
* All fields (except ID) are optional have reasonable default values. In the case of `wearables`,
|
|
5214
|
+
* All fields (except ID) are optional and have reasonable default values. In the case of `wearables`,
|
|
5102
5215
|
* each slot on the Avatar's body that is not explicitly included in the list has its own default.
|
|
5103
5216
|
*
|
|
5104
|
-
*
|
|
5105
|
-
*
|
|
5217
|
+
* On most entities, AvatarShape draws an avatar, for example an NPC. Other requirements are usually
|
|
5218
|
+
* better served by GLTFs.
|
|
5219
|
+
*
|
|
5220
|
+
* On a player entity (`engine.PlayerEntity` or the entity of another player), AvatarShape changes the
|
|
5221
|
+
* look of that player's avatar:
|
|
5222
|
+
* - An unset field keeps the value from the player's profile. The defaults below apply only to other entities.
|
|
5223
|
+
* - A non-empty `wearables` replaces all the wearables. A body slot that it does not fill stays empty.
|
|
5224
|
+
* An empty `wearables` is the same as unset.
|
|
5225
|
+
* - Fields marked "ignored on player entities" have no effect.
|
|
5226
|
+
* - The change is local to this client. It is not broadcast.
|
|
5227
|
+
* - The change applies only while the scene that wrote it is the current scene.
|
|
5228
|
+
* - AvatarBase and AvatarEquippedData keep the values from the profile.
|
|
5106
5229
|
*/
|
|
5107
5230
|
/**
|
|
5108
5231
|
* @public
|
|
5109
5232
|
*/
|
|
5110
5233
|
export declare interface PBAvatarShape {
|
|
5111
|
-
/** the user ID */
|
|
5234
|
+
/** the user ID; ignored on player entities */
|
|
5112
5235
|
id: string;
|
|
5113
|
-
/** visible name (default: "NPC") */
|
|
5236
|
+
/** visible name (default: "NPC"); ignored on player entities */
|
|
5114
5237
|
name?: string | undefined;
|
|
5115
5238
|
/** shape URN (default "urn:decentraland:off-chain:base-avatars:BaseFemale") */
|
|
5116
5239
|
bodyShape?: string | undefined;
|
|
@@ -5120,25 +5243,30 @@ export declare interface PBAvatarShape {
|
|
|
5120
5243
|
hairColor?: PBColor3 | undefined;
|
|
5121
5244
|
/** RGB (default [0.6, 0.462, 0.356]) */
|
|
5122
5245
|
eyeColor?: PBColor3 | undefined;
|
|
5123
|
-
/** current emote animations */
|
|
5246
|
+
/** current emote animations; ignored on player entities */
|
|
5124
5247
|
expressionTriggerId?: string | undefined;
|
|
5125
|
-
/** start of emote animations (in the same order) */
|
|
5248
|
+
/** start of emote animations (in the same order); ignored on player entities */
|
|
5126
5249
|
expressionTriggerTimestamp?: number | undefined;
|
|
5127
|
-
/** whether to display the floating voice chat icon */
|
|
5250
|
+
/** whether to display the floating voice chat icon; ignored on player entities */
|
|
5128
5251
|
talking?: boolean | undefined;
|
|
5129
5252
|
/**
|
|
5130
|
-
*
|
|
5253
|
+
* Wearables, one per body slot. Each item is one of:
|
|
5254
|
+
* - a wearable URN
|
|
5255
|
+
* - the path of a GLB file in the scene content, named `<name>_<category>.glb`, for example `cap_hat.glb`
|
|
5256
|
+
* If two items have the same category, the later item is used.
|
|
5257
|
+
* A scene GLB is always visible and hides nothing. Exception: a `skin` GLB hides the body that it replaces.
|
|
5258
|
+
* If an item is not a URN or a `.glb` path, or if it cannot be loaded, the item is skipped.
|
|
5131
5259
|
* Default values for each unspecified slot:
|
|
5132
5260
|
* Eyes : "urn:decentraland:off-chain:base-avatars:f_eyes_00",
|
|
5133
5261
|
* Eyebrows: "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
|
|
5134
|
-
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00"
|
|
5262
|
+
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00",
|
|
5135
5263
|
* Hair : "urn:decentraland:off-chain:base-avatars:standard_hair",
|
|
5136
5264
|
* Shirt : "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
|
|
5137
5265
|
* Trousers: "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
|
|
5138
|
-
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
5266
|
+
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
5139
5267
|
*/
|
|
5140
5268
|
wearables: string[];
|
|
5141
|
-
/** available emotes (default empty) */
|
|
5269
|
+
/** available emotes (default empty); ignored on player entities */
|
|
5142
5270
|
emotes: string[];
|
|
5143
5271
|
/** hides the skin + hair + facial features (default: false) */
|
|
5144
5272
|
showOnlyWearables?: boolean | undefined;
|
|
@@ -9729,6 +9857,16 @@ export declare type Transport = {
|
|
|
9729
9857
|
onmessage?(message: Uint8Array): void;
|
|
9730
9858
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
9731
9859
|
type?: string;
|
|
9860
|
+
/**
|
|
9861
|
+
* Whether this transport is allowed to mutate reserved-range entities
|
|
9862
|
+
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
9863
|
+
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
9864
|
+
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
9865
|
+
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
9866
|
+
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
9867
|
+
* `receiveMessages`.
|
|
9868
|
+
*/
|
|
9869
|
+
allowReservedEntities?: boolean;
|
|
9732
9870
|
};
|
|
9733
9871
|
|
|
9734
9872
|
/**
|
|
@@ -10310,6 +10448,14 @@ export declare interface UiTransformProps {
|
|
|
10310
10448
|
*/
|
|
10311
10449
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10312
10450
|
|
|
10451
|
+
export declare type ValidateCallback<T> = (value: {
|
|
10452
|
+
entity: Entity;
|
|
10453
|
+
currentValue: T | undefined;
|
|
10454
|
+
newValue: T | undefined;
|
|
10455
|
+
senderAddress: string;
|
|
10456
|
+
createdBy: string;
|
|
10457
|
+
}) => boolean;
|
|
10458
|
+
|
|
10313
10459
|
/**
|
|
10314
10460
|
* @public
|
|
10315
10461
|
*/
|