@dcl/playground-assets 7.30.2-39796956377.commit-4223559 → 7.31.1-39942109730.commit-afd7f79
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 +5 -111
- package/dist/beta.d.ts +5 -111
- package/dist/index.bundled.d.ts +5 -111
- package/dist/index.js +7 -7
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +5 -111
- package/etc/playground-assets.api.json +31 -1001
- package/etc/playground-assets.api.md +4 -80
- package/package.json +5 -6
package/dist/alpha.d.ts
CHANGED
|
@@ -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 */
|
|
@@ -1715,12 +1663,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1666
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* @public
|
|
1722
1670
|
*/
|
|
1723
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1671
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1724
1672
|
|
|
1725
1673
|
/**
|
|
1726
1674
|
* Min length = 8 bytes
|
|
@@ -1775,8 +1723,7 @@ export declare enum CrdtMessageType {
|
|
|
1775
1723
|
PUT_COMPONENT_NETWORK = 5,
|
|
1776
1724
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1777
1725
|
DELETE_ENTITY_NETWORK = 7,
|
|
1778
|
-
|
|
1779
|
-
MAX_MESSAGE_TYPE = 9
|
|
1726
|
+
MAX_MESSAGE_TYPE = 8
|
|
1780
1727
|
}
|
|
1781
1728
|
|
|
1782
1729
|
/**
|
|
@@ -1784,8 +1731,6 @@ export declare enum CrdtMessageType {
|
|
|
1784
1731
|
*/
|
|
1785
1732
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1786
1733
|
|
|
1787
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1788
|
-
|
|
1789
1734
|
/**
|
|
1790
1735
|
* @public
|
|
1791
1736
|
*/
|
|
@@ -2562,12 +2507,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2562
2507
|
|
|
2563
2508
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2564
2509
|
|
|
2565
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2566
|
-
|
|
2567
|
-
export declare interface ICreatedByType {
|
|
2568
|
-
address: string;
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
2510
|
/**
|
|
2572
2511
|
* @public
|
|
2573
2512
|
*/
|
|
@@ -3054,35 +2993,6 @@ export declare const enum InteractionType {
|
|
|
3054
2993
|
PROXIMITY = 1
|
|
3055
2994
|
}
|
|
3056
2995
|
|
|
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
2996
|
/**
|
|
3087
2997
|
* @public
|
|
3088
2998
|
*/
|
|
@@ -4994,6 +4904,8 @@ export declare interface PBAvatarBase {
|
|
|
4994
4904
|
hairColor: PBColor3 | undefined;
|
|
4995
4905
|
bodyShapeUrn: string;
|
|
4996
4906
|
name: string;
|
|
4907
|
+
/** true while the player is speaking in voice chat; unset when the engine does not report voice activity */
|
|
4908
|
+
talking?: boolean | undefined;
|
|
4997
4909
|
}
|
|
4998
4910
|
|
|
4999
4911
|
/**
|
|
@@ -9631,16 +9543,6 @@ export declare type Transport = {
|
|
|
9631
9543
|
onmessage?(message: Uint8Array): void;
|
|
9632
9544
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
9633
9545
|
type?: string;
|
|
9634
|
-
/**
|
|
9635
|
-
* Whether this transport is allowed to mutate reserved-range entities
|
|
9636
|
-
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
9637
|
-
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
9638
|
-
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
9639
|
-
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
9640
|
-
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
9641
|
-
* `receiveMessages`.
|
|
9642
|
-
*/
|
|
9643
|
-
allowReservedEntities?: boolean;
|
|
9644
9546
|
};
|
|
9645
9547
|
|
|
9646
9548
|
/**
|
|
@@ -10222,14 +10124,6 @@ export declare interface UiTransformProps {
|
|
|
10222
10124
|
*/
|
|
10223
10125
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10224
10126
|
|
|
10225
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10226
|
-
entity: Entity;
|
|
10227
|
-
currentValue: T | undefined;
|
|
10228
|
-
newValue: T | undefined;
|
|
10229
|
-
senderAddress: string;
|
|
10230
|
-
createdBy: string;
|
|
10231
|
-
}) => boolean;
|
|
10232
|
-
|
|
10233
10127
|
/**
|
|
10234
10128
|
* @public
|
|
10235
10129
|
*/
|
package/dist/beta.d.ts
CHANGED
|
@@ -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 */
|
|
@@ -1715,12 +1663,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1666
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* @public
|
|
1722
1670
|
*/
|
|
1723
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1671
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1724
1672
|
|
|
1725
1673
|
/**
|
|
1726
1674
|
* Min length = 8 bytes
|
|
@@ -1775,8 +1723,7 @@ export declare enum CrdtMessageType {
|
|
|
1775
1723
|
PUT_COMPONENT_NETWORK = 5,
|
|
1776
1724
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1777
1725
|
DELETE_ENTITY_NETWORK = 7,
|
|
1778
|
-
|
|
1779
|
-
MAX_MESSAGE_TYPE = 9
|
|
1726
|
+
MAX_MESSAGE_TYPE = 8
|
|
1780
1727
|
}
|
|
1781
1728
|
|
|
1782
1729
|
/**
|
|
@@ -1784,8 +1731,6 @@ export declare enum CrdtMessageType {
|
|
|
1784
1731
|
*/
|
|
1785
1732
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1786
1733
|
|
|
1787
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1788
|
-
|
|
1789
1734
|
/**
|
|
1790
1735
|
* @public
|
|
1791
1736
|
*/
|
|
@@ -2562,12 +2507,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2562
2507
|
|
|
2563
2508
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2564
2509
|
|
|
2565
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2566
|
-
|
|
2567
|
-
export declare interface ICreatedByType {
|
|
2568
|
-
address: string;
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
2510
|
/**
|
|
2572
2511
|
* @public
|
|
2573
2512
|
*/
|
|
@@ -3045,35 +2984,6 @@ export declare const enum InteractionType {
|
|
|
3045
2984
|
PROXIMITY = 1
|
|
3046
2985
|
}
|
|
3047
2986
|
|
|
3048
|
-
/**
|
|
3049
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
3050
|
-
* This is not exposed to users, only for internal SDK operations
|
|
3051
|
-
*/
|
|
3052
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3053
|
-
/**
|
|
3054
|
-
* @public
|
|
3055
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3056
|
-
*/
|
|
3057
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3058
|
-
/**
|
|
3059
|
-
* @public
|
|
3060
|
-
* Get the iterator to every entity has the component
|
|
3061
|
-
*/
|
|
3062
|
-
iterator(): Iterable<[Entity, any]>;
|
|
3063
|
-
/**
|
|
3064
|
-
* @public
|
|
3065
|
-
*/
|
|
3066
|
-
dirtyIterator(): Iterable<Entity>;
|
|
3067
|
-
/**
|
|
3068
|
-
* @public
|
|
3069
|
-
*/
|
|
3070
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3071
|
-
/**
|
|
3072
|
-
* @public
|
|
3073
|
-
*/
|
|
3074
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
2987
|
/**
|
|
3078
2988
|
* @public
|
|
3079
2989
|
*/
|
|
@@ -4966,6 +4876,8 @@ export declare interface PBAvatarBase {
|
|
|
4966
4876
|
hairColor: PBColor3 | undefined;
|
|
4967
4877
|
bodyShapeUrn: string;
|
|
4968
4878
|
name: string;
|
|
4879
|
+
/** true while the player is speaking in voice chat; unset when the engine does not report voice activity */
|
|
4880
|
+
talking?: boolean | undefined;
|
|
4969
4881
|
}
|
|
4970
4882
|
|
|
4971
4883
|
/**
|
|
@@ -9598,16 +9510,6 @@ export declare type Transport = {
|
|
|
9598
9510
|
onmessage?(message: Uint8Array): void;
|
|
9599
9511
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
9600
9512
|
type?: string;
|
|
9601
|
-
/**
|
|
9602
|
-
* Whether this transport is allowed to mutate reserved-range entities
|
|
9603
|
-
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
9604
|
-
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
9605
|
-
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
9606
|
-
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
9607
|
-
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
9608
|
-
* `receiveMessages`.
|
|
9609
|
-
*/
|
|
9610
|
-
allowReservedEntities?: boolean;
|
|
9611
9513
|
};
|
|
9612
9514
|
|
|
9613
9515
|
/**
|
|
@@ -10189,14 +10091,6 @@ export declare interface UiTransformProps {
|
|
|
10189
10091
|
*/
|
|
10190
10092
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10191
10093
|
|
|
10192
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10193
|
-
entity: Entity;
|
|
10194
|
-
currentValue: T | undefined;
|
|
10195
|
-
newValue: T | undefined;
|
|
10196
|
-
senderAddress: string;
|
|
10197
|
-
createdBy: string;
|
|
10198
|
-
}) => boolean;
|
|
10199
|
-
|
|
10200
10094
|
/**
|
|
10201
10095
|
* @public
|
|
10202
10096
|
*/
|
package/dist/index.bundled.d.ts
CHANGED
|
@@ -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 */
|
|
@@ -1715,12 +1663,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1666
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* @public
|
|
1722
1670
|
*/
|
|
1723
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1671
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1724
1672
|
|
|
1725
1673
|
/**
|
|
1726
1674
|
* Min length = 8 bytes
|
|
@@ -1775,8 +1723,7 @@ export declare enum CrdtMessageType {
|
|
|
1775
1723
|
PUT_COMPONENT_NETWORK = 5,
|
|
1776
1724
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1777
1725
|
DELETE_ENTITY_NETWORK = 7,
|
|
1778
|
-
|
|
1779
|
-
MAX_MESSAGE_TYPE = 9
|
|
1726
|
+
MAX_MESSAGE_TYPE = 8
|
|
1780
1727
|
}
|
|
1781
1728
|
|
|
1782
1729
|
/**
|
|
@@ -1784,8 +1731,6 @@ export declare enum CrdtMessageType {
|
|
|
1784
1731
|
*/
|
|
1785
1732
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1786
1733
|
|
|
1787
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1788
|
-
|
|
1789
1734
|
/**
|
|
1790
1735
|
* @public
|
|
1791
1736
|
*/
|
|
@@ -2562,12 +2507,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2562
2507
|
|
|
2563
2508
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2564
2509
|
|
|
2565
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2566
|
-
|
|
2567
|
-
export declare interface ICreatedByType {
|
|
2568
|
-
address: string;
|
|
2569
|
-
}
|
|
2570
|
-
|
|
2571
2510
|
/**
|
|
2572
2511
|
* @public
|
|
2573
2512
|
*/
|
|
@@ -3045,35 +2984,6 @@ export declare const enum InteractionType {
|
|
|
3045
2984
|
PROXIMITY = 1
|
|
3046
2985
|
}
|
|
3047
2986
|
|
|
3048
|
-
/**
|
|
3049
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
3050
|
-
* This is not exposed to users, only for internal SDK operations
|
|
3051
|
-
*/
|
|
3052
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3053
|
-
/**
|
|
3054
|
-
* @public
|
|
3055
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3056
|
-
*/
|
|
3057
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3058
|
-
/**
|
|
3059
|
-
* @public
|
|
3060
|
-
* Get the iterator to every entity has the component
|
|
3061
|
-
*/
|
|
3062
|
-
iterator(): Iterable<[Entity, any]>;
|
|
3063
|
-
/**
|
|
3064
|
-
* @public
|
|
3065
|
-
*/
|
|
3066
|
-
dirtyIterator(): Iterable<Entity>;
|
|
3067
|
-
/**
|
|
3068
|
-
* @public
|
|
3069
|
-
*/
|
|
3070
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3071
|
-
/**
|
|
3072
|
-
* @public
|
|
3073
|
-
*/
|
|
3074
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
2987
|
/**
|
|
3078
2988
|
* @public
|
|
3079
2989
|
*/
|
|
@@ -4966,6 +4876,8 @@ export declare interface PBAvatarBase {
|
|
|
4966
4876
|
hairColor: PBColor3 | undefined;
|
|
4967
4877
|
bodyShapeUrn: string;
|
|
4968
4878
|
name: string;
|
|
4879
|
+
/** true while the player is speaking in voice chat; unset when the engine does not report voice activity */
|
|
4880
|
+
talking?: boolean | undefined;
|
|
4969
4881
|
}
|
|
4970
4882
|
|
|
4971
4883
|
/**
|
|
@@ -9598,16 +9510,6 @@ export declare type Transport = {
|
|
|
9598
9510
|
onmessage?(message: Uint8Array): void;
|
|
9599
9511
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
9600
9512
|
type?: string;
|
|
9601
|
-
/**
|
|
9602
|
-
* Whether this transport is allowed to mutate reserved-range entities
|
|
9603
|
-
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
9604
|
-
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
9605
|
-
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
9606
|
-
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
9607
|
-
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
9608
|
-
* `receiveMessages`.
|
|
9609
|
-
*/
|
|
9610
|
-
allowReservedEntities?: boolean;
|
|
9611
9513
|
};
|
|
9612
9514
|
|
|
9613
9515
|
/**
|
|
@@ -10189,14 +10091,6 @@ export declare interface UiTransformProps {
|
|
|
10189
10091
|
*/
|
|
10190
10092
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10191
10093
|
|
|
10192
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10193
|
-
entity: Entity;
|
|
10194
|
-
currentValue: T | undefined;
|
|
10195
|
-
newValue: T | undefined;
|
|
10196
|
-
senderAddress: string;
|
|
10197
|
-
createdBy: string;
|
|
10198
|
-
}) => boolean;
|
|
10199
|
-
|
|
10200
10094
|
/**
|
|
10201
10095
|
* @public
|
|
10202
10096
|
*/
|