@dcl/playground-assets 7.26.1-31714079767.commit-96e9a29 → 7.26.1-32157237851.commit-e712ef7
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 +11 -102
- package/dist/beta.d.ts +11 -102
- package/dist/index.bundled.d.ts +11 -102
- package/dist/index.js +7 -7
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +11 -102
- package/etc/playground-assets.api.json +6 -1003
- 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
|
|
@@ -453,22 +417,6 @@ export declare interface BaseComponent<T> {
|
|
|
453
417
|
* If the value is undefined, the component was deleted.
|
|
454
418
|
*/
|
|
455
419
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
456
|
-
/**
|
|
457
|
-
* @public
|
|
458
|
-
*
|
|
459
|
-
*/
|
|
460
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
461
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
462
|
-
/**
|
|
463
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
464
|
-
* @param entity - Entity to get the CRDT state for
|
|
465
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
466
|
-
* @public
|
|
467
|
-
*/
|
|
468
|
-
getCrdtState(entity: Entity): {
|
|
469
|
-
data: Uint8Array;
|
|
470
|
-
timestamp: number;
|
|
471
|
-
} | null;
|
|
472
420
|
}
|
|
473
421
|
|
|
474
422
|
/** @public */
|
|
@@ -1710,12 +1658,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1710
1658
|
/**
|
|
1711
1659
|
* @public
|
|
1712
1660
|
*/
|
|
1713
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1661
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1714
1662
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1666
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* Min length = 8 bytes
|
|
@@ -1770,8 +1718,7 @@ export declare enum CrdtMessageType {
|
|
|
1770
1718
|
PUT_COMPONENT_NETWORK = 5,
|
|
1771
1719
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1772
1720
|
DELETE_ENTITY_NETWORK = 7,
|
|
1773
|
-
|
|
1774
|
-
MAX_MESSAGE_TYPE = 9
|
|
1721
|
+
MAX_MESSAGE_TYPE = 8
|
|
1775
1722
|
}
|
|
1776
1723
|
|
|
1777
1724
|
/**
|
|
@@ -1779,8 +1726,6 @@ export declare enum CrdtMessageType {
|
|
|
1779
1726
|
*/
|
|
1780
1727
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1781
1728
|
|
|
1782
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1783
|
-
|
|
1784
1729
|
/**
|
|
1785
1730
|
* @public
|
|
1786
1731
|
*/
|
|
@@ -2550,12 +2495,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2550
2495
|
|
|
2551
2496
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2552
2497
|
|
|
2553
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2554
|
-
|
|
2555
|
-
export declare interface ICreatedByType {
|
|
2556
|
-
address: string;
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
2498
|
/**
|
|
2560
2499
|
* @public
|
|
2561
2500
|
*/
|
|
@@ -2571,11 +2510,18 @@ export declare interface IEngine {
|
|
|
2571
2510
|
* @public
|
|
2572
2511
|
* Remove all components of an entity
|
|
2573
2512
|
* @param entity - entity
|
|
2513
|
+
* @returns whether the entity id was released for reuse. Ids in the renderer-reserved range
|
|
2514
|
+
* are never released, at any version. Components are still purged for
|
|
2515
|
+
* RootEntity/PlayerEntity/CameraEntity, but not for the avatar range.
|
|
2574
2516
|
*/
|
|
2575
|
-
removeEntity(entity: Entity):
|
|
2517
|
+
removeEntity(entity: Entity): boolean;
|
|
2576
2518
|
/**
|
|
2577
2519
|
* Remove all components of each entity in the tree made with Transform parenting
|
|
2578
2520
|
* @param entity - the root entity of the tree
|
|
2521
|
+
*
|
|
2522
|
+
* May complete only partially and does not report it: nodes in the renderer-reserved range
|
|
2523
|
+
* are refused by `removeEntity`, so a reserved node anywhere in the tree survives while its
|
|
2524
|
+
* descendants are removed — leaving its `Transform.parent` pointing at a removed entity.
|
|
2579
2525
|
*/
|
|
2580
2526
|
removeEntityWithChildren(entity: Entity): void;
|
|
2581
2527
|
/**
|
|
@@ -3031,35 +2977,6 @@ export declare const enum InteractionType {
|
|
|
3031
2977
|
PROXIMITY = 1
|
|
3032
2978
|
}
|
|
3033
2979
|
|
|
3034
|
-
/**
|
|
3035
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
3036
|
-
* This is not exposed to users, only for internal SDK operations
|
|
3037
|
-
*/
|
|
3038
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3039
|
-
/**
|
|
3040
|
-
* @public
|
|
3041
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3042
|
-
*/
|
|
3043
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3044
|
-
/**
|
|
3045
|
-
* @public
|
|
3046
|
-
* Get the iterator to every entity has the component
|
|
3047
|
-
*/
|
|
3048
|
-
iterator(): Iterable<[Entity, any]>;
|
|
3049
|
-
/**
|
|
3050
|
-
* @public
|
|
3051
|
-
*/
|
|
3052
|
-
dirtyIterator(): Iterable<Entity>;
|
|
3053
|
-
/**
|
|
3054
|
-
* @public
|
|
3055
|
-
*/
|
|
3056
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3057
|
-
/**
|
|
3058
|
-
* @public
|
|
3059
|
-
*/
|
|
3060
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3061
|
-
}
|
|
3062
|
-
|
|
3063
2980
|
/**
|
|
3064
2981
|
* @public
|
|
3065
2982
|
*/
|
|
@@ -10039,14 +9956,6 @@ export declare interface UiTransformProps {
|
|
|
10039
9956
|
*/
|
|
10040
9957
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10041
9958
|
|
|
10042
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10043
|
-
entity: Entity;
|
|
10044
|
-
currentValue: T | undefined;
|
|
10045
|
-
newValue: T | undefined;
|
|
10046
|
-
senderAddress: string;
|
|
10047
|
-
createdBy: string;
|
|
10048
|
-
}) => boolean;
|
|
10049
|
-
|
|
10050
9959
|
/**
|
|
10051
9960
|
* @public
|
|
10052
9961
|
*/
|
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
|
|
@@ -453,22 +417,6 @@ export declare interface BaseComponent<T> {
|
|
|
453
417
|
* If the value is undefined, the component was deleted.
|
|
454
418
|
*/
|
|
455
419
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
456
|
-
/**
|
|
457
|
-
* @public
|
|
458
|
-
*
|
|
459
|
-
*/
|
|
460
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
461
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
462
|
-
/**
|
|
463
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
464
|
-
* @param entity - Entity to get the CRDT state for
|
|
465
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
466
|
-
* @public
|
|
467
|
-
*/
|
|
468
|
-
getCrdtState(entity: Entity): {
|
|
469
|
-
data: Uint8Array;
|
|
470
|
-
timestamp: number;
|
|
471
|
-
} | null;
|
|
472
420
|
}
|
|
473
421
|
|
|
474
422
|
/** @public */
|
|
@@ -1710,12 +1658,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1710
1658
|
/**
|
|
1711
1659
|
* @public
|
|
1712
1660
|
*/
|
|
1713
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1661
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1714
1662
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1666
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* Min length = 8 bytes
|
|
@@ -1770,8 +1718,7 @@ export declare enum CrdtMessageType {
|
|
|
1770
1718
|
PUT_COMPONENT_NETWORK = 5,
|
|
1771
1719
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1772
1720
|
DELETE_ENTITY_NETWORK = 7,
|
|
1773
|
-
|
|
1774
|
-
MAX_MESSAGE_TYPE = 9
|
|
1721
|
+
MAX_MESSAGE_TYPE = 8
|
|
1775
1722
|
}
|
|
1776
1723
|
|
|
1777
1724
|
/**
|
|
@@ -1779,8 +1726,6 @@ export declare enum CrdtMessageType {
|
|
|
1779
1726
|
*/
|
|
1780
1727
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1781
1728
|
|
|
1782
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1783
|
-
|
|
1784
1729
|
/**
|
|
1785
1730
|
* @public
|
|
1786
1731
|
*/
|
|
@@ -2550,12 +2495,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2550
2495
|
|
|
2551
2496
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2552
2497
|
|
|
2553
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2554
|
-
|
|
2555
|
-
export declare interface ICreatedByType {
|
|
2556
|
-
address: string;
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
2498
|
/**
|
|
2560
2499
|
* @public
|
|
2561
2500
|
*/
|
|
@@ -2571,11 +2510,18 @@ export declare interface IEngine {
|
|
|
2571
2510
|
* @public
|
|
2572
2511
|
* Remove all components of an entity
|
|
2573
2512
|
* @param entity - entity
|
|
2513
|
+
* @returns whether the entity id was released for reuse. Ids in the renderer-reserved range
|
|
2514
|
+
* are never released, at any version. Components are still purged for
|
|
2515
|
+
* RootEntity/PlayerEntity/CameraEntity, but not for the avatar range.
|
|
2574
2516
|
*/
|
|
2575
|
-
removeEntity(entity: Entity):
|
|
2517
|
+
removeEntity(entity: Entity): boolean;
|
|
2576
2518
|
/**
|
|
2577
2519
|
* Remove all components of each entity in the tree made with Transform parenting
|
|
2578
2520
|
* @param entity - the root entity of the tree
|
|
2521
|
+
*
|
|
2522
|
+
* May complete only partially and does not report it: nodes in the renderer-reserved range
|
|
2523
|
+
* are refused by `removeEntity`, so a reserved node anywhere in the tree survives while its
|
|
2524
|
+
* descendants are removed — leaving its `Transform.parent` pointing at a removed entity.
|
|
2579
2525
|
*/
|
|
2580
2526
|
removeEntityWithChildren(entity: Entity): void;
|
|
2581
2527
|
/**
|
|
@@ -3022,35 +2968,6 @@ export declare const enum InteractionType {
|
|
|
3022
2968
|
PROXIMITY = 1
|
|
3023
2969
|
}
|
|
3024
2970
|
|
|
3025
|
-
/**
|
|
3026
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
3027
|
-
* This is not exposed to users, only for internal SDK operations
|
|
3028
|
-
*/
|
|
3029
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3030
|
-
/**
|
|
3031
|
-
* @public
|
|
3032
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3033
|
-
*/
|
|
3034
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3035
|
-
/**
|
|
3036
|
-
* @public
|
|
3037
|
-
* Get the iterator to every entity has the component
|
|
3038
|
-
*/
|
|
3039
|
-
iterator(): Iterable<[Entity, any]>;
|
|
3040
|
-
/**
|
|
3041
|
-
* @public
|
|
3042
|
-
*/
|
|
3043
|
-
dirtyIterator(): Iterable<Entity>;
|
|
3044
|
-
/**
|
|
3045
|
-
* @public
|
|
3046
|
-
*/
|
|
3047
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3048
|
-
/**
|
|
3049
|
-
* @public
|
|
3050
|
-
*/
|
|
3051
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
2971
|
/**
|
|
3055
2972
|
* @public
|
|
3056
2973
|
*/
|
|
@@ -10006,14 +9923,6 @@ export declare interface UiTransformProps {
|
|
|
10006
9923
|
*/
|
|
10007
9924
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10008
9925
|
|
|
10009
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10010
|
-
entity: Entity;
|
|
10011
|
-
currentValue: T | undefined;
|
|
10012
|
-
newValue: T | undefined;
|
|
10013
|
-
senderAddress: string;
|
|
10014
|
-
createdBy: string;
|
|
10015
|
-
}) => boolean;
|
|
10016
|
-
|
|
10017
9926
|
/**
|
|
10018
9927
|
* @public
|
|
10019
9928
|
*/
|
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
|
|
@@ -453,22 +417,6 @@ export declare interface BaseComponent<T> {
|
|
|
453
417
|
* If the value is undefined, the component was deleted.
|
|
454
418
|
*/
|
|
455
419
|
onChange(entity: Entity, cb: (value: T | undefined) => void): void;
|
|
456
|
-
/**
|
|
457
|
-
* @public
|
|
458
|
-
*
|
|
459
|
-
*/
|
|
460
|
-
validateBeforeChange(entity: Entity, cb: ValidateCallback<T>): void;
|
|
461
|
-
validateBeforeChange(cb: ValidateCallback<T>): void;
|
|
462
|
-
/**
|
|
463
|
-
* Get the CRDT state for an entity (serialized data and timestamp)
|
|
464
|
-
* @param entity - Entity to get the CRDT state for
|
|
465
|
-
* @returns Object with serialized data and timestamp, or null if entity doesn't have the component
|
|
466
|
-
* @public
|
|
467
|
-
*/
|
|
468
|
-
getCrdtState(entity: Entity): {
|
|
469
|
-
data: Uint8Array;
|
|
470
|
-
timestamp: number;
|
|
471
|
-
} | null;
|
|
472
420
|
}
|
|
473
421
|
|
|
474
422
|
/** @public */
|
|
@@ -1710,12 +1658,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
|
1710
1658
|
/**
|
|
1711
1659
|
* @public
|
|
1712
1660
|
*/
|
|
1713
|
-
export declare type CrdtMessage = PutComponentMessage |
|
|
1661
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
1714
1662
|
|
|
1715
1663
|
/**
|
|
1716
1664
|
* @public
|
|
1717
1665
|
*/
|
|
1718
|
-
export declare type CrdtMessageBody = PutComponentMessageBody |
|
|
1666
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
1719
1667
|
|
|
1720
1668
|
/**
|
|
1721
1669
|
* Min length = 8 bytes
|
|
@@ -1770,8 +1718,7 @@ export declare enum CrdtMessageType {
|
|
|
1770
1718
|
PUT_COMPONENT_NETWORK = 5,
|
|
1771
1719
|
DELETE_COMPONENT_NETWORK = 6,
|
|
1772
1720
|
DELETE_ENTITY_NETWORK = 7,
|
|
1773
|
-
|
|
1774
|
-
MAX_MESSAGE_TYPE = 9
|
|
1721
|
+
MAX_MESSAGE_TYPE = 8
|
|
1775
1722
|
}
|
|
1776
1723
|
|
|
1777
1724
|
/**
|
|
@@ -1779,8 +1726,6 @@ export declare enum CrdtMessageType {
|
|
|
1779
1726
|
*/
|
|
1780
1727
|
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
|
1781
1728
|
|
|
1782
|
-
export declare const CreatedBy: ICreatedBy;
|
|
1783
|
-
|
|
1784
1729
|
/**
|
|
1785
1730
|
* @public
|
|
1786
1731
|
*/
|
|
@@ -2550,12 +2495,6 @@ export declare interface GrowOnlyValueSetComponentDefinition<T> extends BaseComp
|
|
|
2550
2495
|
|
|
2551
2496
|
export declare type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<any>> = (engine: Pick<IEngine, 'defineValueSetComponentFromSchema'>) => T;
|
|
2552
2497
|
|
|
2553
|
-
export declare type ICreatedBy = LastWriteWinElementSetComponentDefinition<ICreatedByType>;
|
|
2554
|
-
|
|
2555
|
-
export declare interface ICreatedByType {
|
|
2556
|
-
address: string;
|
|
2557
|
-
}
|
|
2558
|
-
|
|
2559
2498
|
/**
|
|
2560
2499
|
* @public
|
|
2561
2500
|
*/
|
|
@@ -2571,11 +2510,18 @@ export declare interface IEngine {
|
|
|
2571
2510
|
* @public
|
|
2572
2511
|
* Remove all components of an entity
|
|
2573
2512
|
* @param entity - entity
|
|
2513
|
+
* @returns whether the entity id was released for reuse. Ids in the renderer-reserved range
|
|
2514
|
+
* are never released, at any version. Components are still purged for
|
|
2515
|
+
* RootEntity/PlayerEntity/CameraEntity, but not for the avatar range.
|
|
2574
2516
|
*/
|
|
2575
|
-
removeEntity(entity: Entity):
|
|
2517
|
+
removeEntity(entity: Entity): boolean;
|
|
2576
2518
|
/**
|
|
2577
2519
|
* Remove all components of each entity in the tree made with Transform parenting
|
|
2578
2520
|
* @param entity - the root entity of the tree
|
|
2521
|
+
*
|
|
2522
|
+
* May complete only partially and does not report it: nodes in the renderer-reserved range
|
|
2523
|
+
* are refused by `removeEntity`, so a reserved node anywhere in the tree survives while its
|
|
2524
|
+
* descendants are removed — leaving its `Transform.parent` pointing at a removed entity.
|
|
2579
2525
|
*/
|
|
2580
2526
|
removeEntityWithChildren(entity: Entity): void;
|
|
2581
2527
|
/**
|
|
@@ -3022,35 +2968,6 @@ export declare const enum InteractionType {
|
|
|
3022
2968
|
PROXIMITY = 1
|
|
3023
2969
|
}
|
|
3024
2970
|
|
|
3025
|
-
/**
|
|
3026
|
-
* Internal component interface that exposes all internal methods for SDK use
|
|
3027
|
-
* This is not exposed to users, only for internal SDK operations
|
|
3028
|
-
*/
|
|
3029
|
-
export declare interface InternalBaseComponent<T> extends BaseComponent<T> {
|
|
3030
|
-
/**
|
|
3031
|
-
* @public
|
|
3032
|
-
* Dry run update to check if a CRDT message would be accepted without actually applying it
|
|
3033
|
-
*/
|
|
3034
|
-
__dry_run_updateFromCrdt(body: CrdtMessageBody): ProcessMessageResultType;
|
|
3035
|
-
/**
|
|
3036
|
-
* @public
|
|
3037
|
-
* Get the iterator to every entity has the component
|
|
3038
|
-
*/
|
|
3039
|
-
iterator(): Iterable<[Entity, any]>;
|
|
3040
|
-
/**
|
|
3041
|
-
* @public
|
|
3042
|
-
*/
|
|
3043
|
-
dirtyIterator(): Iterable<Entity>;
|
|
3044
|
-
/**
|
|
3045
|
-
* @public
|
|
3046
|
-
*/
|
|
3047
|
-
__onChangeCallbacks(entity: Entity, value: T): void;
|
|
3048
|
-
/**
|
|
3049
|
-
* @public
|
|
3050
|
-
*/
|
|
3051
|
-
__run_validateBeforeChange(entity: Entity, newValue: T | undefined, senderAddress: string, createdBy: string): boolean;
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
2971
|
/**
|
|
3055
2972
|
* @public
|
|
3056
2973
|
*/
|
|
@@ -10006,14 +9923,6 @@ export declare interface UiTransformProps {
|
|
|
10006
9923
|
*/
|
|
10007
9924
|
export declare type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
10008
9925
|
|
|
10009
|
-
export declare type ValidateCallback<T> = (value: {
|
|
10010
|
-
entity: Entity;
|
|
10011
|
-
currentValue: T | undefined;
|
|
10012
|
-
newValue: T | undefined;
|
|
10013
|
-
senderAddress: string;
|
|
10014
|
-
createdBy: string;
|
|
10015
|
-
}) => boolean;
|
|
10016
|
-
|
|
10017
9926
|
/**
|
|
10018
9927
|
* @public
|
|
10019
9928
|
*/
|