@dcl/playground-assets 7.3.31 → 7.3.32
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 +117 -16
- package/dist/beta.d.ts +109 -6
- package/dist/index.bundled.d.ts +109 -6
- package/dist/index.js +6 -6
- package/dist/index.js.map +4 -4
- package/dist/playground/sdk/apis.d.ts +7 -0
- package/dist/playground/sdk/dcl-sdk.package.json +2 -2
- package/dist/playground-assets.d.ts +117 -16
- package/etc/playground-assets.api.json +1264 -119
- package/etc/playground-assets.api.md +111 -10
- package/package.json +4 -4
package/dist/alpha.d.ts
CHANGED
@@ -1357,12 +1357,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
1357
1357
|
/**
|
1358
1358
|
* @public
|
1359
1359
|
*/
|
1360
|
-
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | DeleteEntityMessage |
|
1360
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
1361
1361
|
|
1362
1362
|
/**
|
1363
1363
|
* @public
|
1364
1364
|
*/
|
1365
|
-
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody;
|
1365
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
1366
1366
|
|
1367
1367
|
/**
|
1368
1368
|
* Min length = 8 bytes
|
@@ -1414,9 +1414,17 @@ export declare enum CrdtMessageType {
|
|
1414
1414
|
DELETE_COMPONENT = 2,
|
1415
1415
|
DELETE_ENTITY = 3,
|
1416
1416
|
APPEND_VALUE = 4,
|
1417
|
-
|
1417
|
+
PUT_COMPONENT_NETWORK = 5,
|
1418
|
+
DELETE_COMPONENT_NETWORK = 6,
|
1419
|
+
DELETE_ENTITY_NETWORK = 7,
|
1420
|
+
MAX_MESSAGE_TYPE = 8
|
1418
1421
|
}
|
1419
1422
|
|
1423
|
+
/**
|
1424
|
+
* @public
|
1425
|
+
*/
|
1426
|
+
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
1427
|
+
|
1420
1428
|
export declare function createEthereumProvider(): {
|
1421
1429
|
send(message: RPCSendableMessage, callback?: ((error: Error | null, result?: any) => void) | undefined): void;
|
1422
1430
|
sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
|
@@ -1497,6 +1505,38 @@ export declare type DeleteComponentMessageBody = {
|
|
1497
1505
|
timestamp: number;
|
1498
1506
|
};
|
1499
1507
|
|
1508
|
+
/**
|
1509
|
+
* @public
|
1510
|
+
*/
|
1511
|
+
export declare namespace DeleteComponentNetwork {
|
1512
|
+
const MESSAGE_HEADER_LENGTH = 16;
|
1513
|
+
/**
|
1514
|
+
* Write DeleteComponent message
|
1515
|
+
*/
|
1516
|
+
export function write(entity: Entity, componentId: number, timestamp: number, networkId: number, buf: ByteBuffer): void;
|
1517
|
+
export function read(buf: ByteBuffer): DeleteComponentNetworkMessage | null;
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
/**
|
1521
|
+
* @public
|
1522
|
+
*/
|
1523
|
+
export declare type DeleteComponentNetworkMessage = CrdtMessageHeader & DeleteComponentNetworkMessageBody;
|
1524
|
+
|
1525
|
+
/**
|
1526
|
+
* @param entity - Uint32 number of the entity
|
1527
|
+
* @param componentId - Uint32 number of id
|
1528
|
+
* @param timestamp - Uint32 Lamport timestamp
|
1529
|
+
* @param networkId - Uint32 user network id
|
1530
|
+
* @public
|
1531
|
+
*/
|
1532
|
+
export declare type DeleteComponentNetworkMessageBody = {
|
1533
|
+
type: CrdtMessageType.DELETE_COMPONENT_NETWORK;
|
1534
|
+
entityId: Entity;
|
1535
|
+
componentId: number;
|
1536
|
+
timestamp: number;
|
1537
|
+
networkId: number;
|
1538
|
+
};
|
1539
|
+
|
1500
1540
|
/**
|
1501
1541
|
* @public
|
1502
1542
|
*/
|
@@ -1520,6 +1560,29 @@ export declare type DeleteEntityMessageBody = {
|
|
1520
1560
|
entityId: Entity;
|
1521
1561
|
};
|
1522
1562
|
|
1563
|
+
/**
|
1564
|
+
* @public
|
1565
|
+
*/
|
1566
|
+
export declare namespace DeleteEntityNetwork {
|
1567
|
+
const MESSAGE_HEADER_LENGTH = 8;
|
1568
|
+
export function write(entity: Entity, networkId: number, buf: ByteBuffer): void;
|
1569
|
+
export function read(buf: ByteBuffer): DeleteEntityNetworkMessage | null;
|
1570
|
+
}
|
1571
|
+
|
1572
|
+
/**
|
1573
|
+
* @public
|
1574
|
+
*/
|
1575
|
+
export declare type DeleteEntityNetworkMessage = CrdtMessageHeader & DeleteEntityNetworkMessageBody;
|
1576
|
+
|
1577
|
+
/**
|
1578
|
+
* @public
|
1579
|
+
*/
|
1580
|
+
export declare type DeleteEntityNetworkMessageBody = {
|
1581
|
+
type: CrdtMessageType.DELETE_ENTITY_NETWORK;
|
1582
|
+
entityId: Entity;
|
1583
|
+
networkId: number;
|
1584
|
+
};
|
1585
|
+
|
1523
1586
|
/**
|
1524
1587
|
* @public
|
1525
1588
|
*/
|
@@ -2058,18 +2121,6 @@ export declare interface IEngine {
|
|
2058
2121
|
* components that will be available to this engine and to run optimizations.
|
2059
2122
|
*/
|
2060
2123
|
seal(): void;
|
2061
|
-
/**
|
2062
|
-
* @alpha
|
2063
|
-
* Initialize network manager
|
2064
|
-
*/
|
2065
|
-
addNetworkManager(reservedLocalEntities: number, range: [number, number]): {
|
2066
|
-
addEntity: IEngine['addEntity'];
|
2067
|
-
};
|
2068
|
-
/**
|
2069
|
-
* @alpha
|
2070
|
-
* Get netowrk manager to create entities.
|
2071
|
-
*/
|
2072
|
-
getNetworkManager(): ReturnType<IEngine['addNetworkManager']>;
|
2073
2124
|
}
|
2074
2125
|
|
2075
2126
|
/**
|
@@ -2253,6 +2304,20 @@ export declare type IncludeUndefined<T> = {
|
|
2253
2304
|
[P in keyof T]: undefined extends T[P] ? P : never;
|
2254
2305
|
}[keyof T];
|
2255
2306
|
|
2307
|
+
export declare type INetowrkEntity = LastWriteWinElementSetComponentDefinition<INetowrkEntityType>;
|
2308
|
+
|
2309
|
+
export declare interface INetowrkEntityType {
|
2310
|
+
networkId: number;
|
2311
|
+
entityId: Entity;
|
2312
|
+
}
|
2313
|
+
|
2314
|
+
export declare type INetowrkParent = LastWriteWinElementSetComponentDefinition<INetowrkParentType>;
|
2315
|
+
|
2316
|
+
export declare interface INetowrkParentType {
|
2317
|
+
networkId: number;
|
2318
|
+
entityId: Entity;
|
2319
|
+
}
|
2320
|
+
|
2256
2321
|
/**
|
2257
2322
|
* @public
|
2258
2323
|
* Input component
|
@@ -3409,6 +3474,18 @@ export declare interface NameType {
|
|
3409
3474
|
value: string;
|
3410
3475
|
}
|
3411
3476
|
|
3477
|
+
/**
|
3478
|
+
* @alpha
|
3479
|
+
* Tag a entity to be syncronized through comms
|
3480
|
+
*/
|
3481
|
+
export declare const NetworkEntity: INetowrkEntity;
|
3482
|
+
|
3483
|
+
/**
|
3484
|
+
* @alpha
|
3485
|
+
* Tag a entity to be syncronized through comms
|
3486
|
+
*/
|
3487
|
+
export declare const NetworkParent: INetowrkParent;
|
3488
|
+
|
3412
3489
|
/** NftFrameType is a predefined framing style for the image. */
|
3413
3490
|
/**
|
3414
3491
|
* @public
|
@@ -5343,6 +5420,29 @@ export declare namespace PutComponentOperation {
|
|
5343
5420
|
export function read(buf: ByteBuffer): PutComponentMessage | null;
|
5344
5421
|
}
|
5345
5422
|
|
5423
|
+
/**
|
5424
|
+
* @public
|
5425
|
+
*/
|
5426
|
+
export declare type PutNetworkComponentMessage = CrdtMessageHeader & PutNetworkComponentMessageBody;
|
5427
|
+
|
5428
|
+
export declare type PutNetworkComponentMessageBody = Omit<PutComponentMessageBody, 'type'> & {
|
5429
|
+
type: CrdtMessageType.PUT_COMPONENT_NETWORK;
|
5430
|
+
networkId: number;
|
5431
|
+
};
|
5432
|
+
|
5433
|
+
/**
|
5434
|
+
* @public
|
5435
|
+
*/
|
5436
|
+
export declare namespace PutNetworkComponentOperation {
|
5437
|
+
const MESSAGE_HEADER_LENGTH = 20;
|
5438
|
+
/**
|
5439
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
5440
|
+
* already allocated
|
5441
|
+
*/
|
5442
|
+
export function write(entity: Entity, timestamp: number, componentId: number, networkId: number, data: Uint8Array, buf: ByteBuffer): void;
|
5443
|
+
export function read(buf: ByteBuffer): PutNetworkComponentMessage | null;
|
5444
|
+
}
|
5445
|
+
|
5346
5446
|
/**
|
5347
5447
|
* @public
|
5348
5448
|
* Quaternion is a type and a namespace.
|
@@ -5890,7 +5990,7 @@ export declare namespace Rect {
|
|
5890
5990
|
* @param firstEntity - the root entity of the tree
|
5891
5991
|
* @public
|
5892
5992
|
*/
|
5893
|
-
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity'>, entity: Entity): void;
|
5993
|
+
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity' | 'defineComponent'>, entity: Entity): void;
|
5894
5994
|
|
5895
5995
|
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
5896
5996
|
|
@@ -6434,6 +6534,7 @@ export declare type Transport = {
|
|
6434
6534
|
send(message: Uint8Array): Promise<void>;
|
6435
6535
|
onmessage?(message: Uint8Array): void;
|
6436
6536
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
6537
|
+
type?: string;
|
6437
6538
|
};
|
6438
6539
|
|
6439
6540
|
/**
|
package/dist/beta.d.ts
CHANGED
@@ -1357,12 +1357,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
1357
1357
|
/**
|
1358
1358
|
* @public
|
1359
1359
|
*/
|
1360
|
-
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | DeleteEntityMessage |
|
1360
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
1361
1361
|
|
1362
1362
|
/**
|
1363
1363
|
* @public
|
1364
1364
|
*/
|
1365
|
-
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody;
|
1365
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
1366
1366
|
|
1367
1367
|
/**
|
1368
1368
|
* Min length = 8 bytes
|
@@ -1414,9 +1414,17 @@ export declare enum CrdtMessageType {
|
|
1414
1414
|
DELETE_COMPONENT = 2,
|
1415
1415
|
DELETE_ENTITY = 3,
|
1416
1416
|
APPEND_VALUE = 4,
|
1417
|
-
|
1417
|
+
PUT_COMPONENT_NETWORK = 5,
|
1418
|
+
DELETE_COMPONENT_NETWORK = 6,
|
1419
|
+
DELETE_ENTITY_NETWORK = 7,
|
1420
|
+
MAX_MESSAGE_TYPE = 8
|
1418
1421
|
}
|
1419
1422
|
|
1423
|
+
/**
|
1424
|
+
* @public
|
1425
|
+
*/
|
1426
|
+
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
1427
|
+
|
1420
1428
|
export declare function createEthereumProvider(): {
|
1421
1429
|
send(message: RPCSendableMessage, callback?: ((error: Error | null, result?: any) => void) | undefined): void;
|
1422
1430
|
sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
|
@@ -1497,6 +1505,38 @@ export declare type DeleteComponentMessageBody = {
|
|
1497
1505
|
timestamp: number;
|
1498
1506
|
};
|
1499
1507
|
|
1508
|
+
/**
|
1509
|
+
* @public
|
1510
|
+
*/
|
1511
|
+
export declare namespace DeleteComponentNetwork {
|
1512
|
+
const MESSAGE_HEADER_LENGTH = 16;
|
1513
|
+
/**
|
1514
|
+
* Write DeleteComponent message
|
1515
|
+
*/
|
1516
|
+
export function write(entity: Entity, componentId: number, timestamp: number, networkId: number, buf: ByteBuffer): void;
|
1517
|
+
export function read(buf: ByteBuffer): DeleteComponentNetworkMessage | null;
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
/**
|
1521
|
+
* @public
|
1522
|
+
*/
|
1523
|
+
export declare type DeleteComponentNetworkMessage = CrdtMessageHeader & DeleteComponentNetworkMessageBody;
|
1524
|
+
|
1525
|
+
/**
|
1526
|
+
* @param entity - Uint32 number of the entity
|
1527
|
+
* @param componentId - Uint32 number of id
|
1528
|
+
* @param timestamp - Uint32 Lamport timestamp
|
1529
|
+
* @param networkId - Uint32 user network id
|
1530
|
+
* @public
|
1531
|
+
*/
|
1532
|
+
export declare type DeleteComponentNetworkMessageBody = {
|
1533
|
+
type: CrdtMessageType.DELETE_COMPONENT_NETWORK;
|
1534
|
+
entityId: Entity;
|
1535
|
+
componentId: number;
|
1536
|
+
timestamp: number;
|
1537
|
+
networkId: number;
|
1538
|
+
};
|
1539
|
+
|
1500
1540
|
/**
|
1501
1541
|
* @public
|
1502
1542
|
*/
|
@@ -1520,6 +1560,29 @@ export declare type DeleteEntityMessageBody = {
|
|
1520
1560
|
entityId: Entity;
|
1521
1561
|
};
|
1522
1562
|
|
1563
|
+
/**
|
1564
|
+
* @public
|
1565
|
+
*/
|
1566
|
+
export declare namespace DeleteEntityNetwork {
|
1567
|
+
const MESSAGE_HEADER_LENGTH = 8;
|
1568
|
+
export function write(entity: Entity, networkId: number, buf: ByteBuffer): void;
|
1569
|
+
export function read(buf: ByteBuffer): DeleteEntityNetworkMessage | null;
|
1570
|
+
}
|
1571
|
+
|
1572
|
+
/**
|
1573
|
+
* @public
|
1574
|
+
*/
|
1575
|
+
export declare type DeleteEntityNetworkMessage = CrdtMessageHeader & DeleteEntityNetworkMessageBody;
|
1576
|
+
|
1577
|
+
/**
|
1578
|
+
* @public
|
1579
|
+
*/
|
1580
|
+
export declare type DeleteEntityNetworkMessageBody = {
|
1581
|
+
type: CrdtMessageType.DELETE_ENTITY_NETWORK;
|
1582
|
+
entityId: Entity;
|
1583
|
+
networkId: number;
|
1584
|
+
};
|
1585
|
+
|
1523
1586
|
/**
|
1524
1587
|
* @public
|
1525
1588
|
*/
|
@@ -2049,8 +2112,6 @@ export declare interface IEngine {
|
|
2049
2112
|
* components that will be available to this engine and to run optimizations.
|
2050
2113
|
*/
|
2051
2114
|
seal(): void;
|
2052
|
-
/* Excluded from this release type: addNetworkManager */
|
2053
|
-
/* Excluded from this release type: getNetworkManager */
|
2054
2115
|
}
|
2055
2116
|
|
2056
2117
|
/**
|
@@ -2234,6 +2295,20 @@ export declare type IncludeUndefined<T> = {
|
|
2234
2295
|
[P in keyof T]: undefined extends T[P] ? P : never;
|
2235
2296
|
}[keyof T];
|
2236
2297
|
|
2298
|
+
export declare type INetowrkEntity = LastWriteWinElementSetComponentDefinition<INetowrkEntityType>;
|
2299
|
+
|
2300
|
+
export declare interface INetowrkEntityType {
|
2301
|
+
networkId: number;
|
2302
|
+
entityId: Entity;
|
2303
|
+
}
|
2304
|
+
|
2305
|
+
export declare type INetowrkParent = LastWriteWinElementSetComponentDefinition<INetowrkParentType>;
|
2306
|
+
|
2307
|
+
export declare interface INetowrkParentType {
|
2308
|
+
networkId: number;
|
2309
|
+
entityId: Entity;
|
2310
|
+
}
|
2311
|
+
|
2237
2312
|
/**
|
2238
2313
|
* @public
|
2239
2314
|
* Input component
|
@@ -3390,6 +3465,10 @@ export declare interface NameType {
|
|
3390
3465
|
value: string;
|
3391
3466
|
}
|
3392
3467
|
|
3468
|
+
/* Excluded from this release type: NetworkEntity */
|
3469
|
+
|
3470
|
+
/* Excluded from this release type: NetworkParent */
|
3471
|
+
|
3393
3472
|
/** NftFrameType is a predefined framing style for the image. */
|
3394
3473
|
/**
|
3395
3474
|
* @public
|
@@ -5324,6 +5403,29 @@ export declare namespace PutComponentOperation {
|
|
5324
5403
|
export function read(buf: ByteBuffer): PutComponentMessage | null;
|
5325
5404
|
}
|
5326
5405
|
|
5406
|
+
/**
|
5407
|
+
* @public
|
5408
|
+
*/
|
5409
|
+
export declare type PutNetworkComponentMessage = CrdtMessageHeader & PutNetworkComponentMessageBody;
|
5410
|
+
|
5411
|
+
export declare type PutNetworkComponentMessageBody = Omit<PutComponentMessageBody, 'type'> & {
|
5412
|
+
type: CrdtMessageType.PUT_COMPONENT_NETWORK;
|
5413
|
+
networkId: number;
|
5414
|
+
};
|
5415
|
+
|
5416
|
+
/**
|
5417
|
+
* @public
|
5418
|
+
*/
|
5419
|
+
export declare namespace PutNetworkComponentOperation {
|
5420
|
+
const MESSAGE_HEADER_LENGTH = 20;
|
5421
|
+
/**
|
5422
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
5423
|
+
* already allocated
|
5424
|
+
*/
|
5425
|
+
export function write(entity: Entity, timestamp: number, componentId: number, networkId: number, data: Uint8Array, buf: ByteBuffer): void;
|
5426
|
+
export function read(buf: ByteBuffer): PutNetworkComponentMessage | null;
|
5427
|
+
}
|
5428
|
+
|
5327
5429
|
/**
|
5328
5430
|
* @public
|
5329
5431
|
* Quaternion is a type and a namespace.
|
@@ -5871,7 +5973,7 @@ export declare namespace Rect {
|
|
5871
5973
|
* @param firstEntity - the root entity of the tree
|
5872
5974
|
* @public
|
5873
5975
|
*/
|
5874
|
-
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity'>, entity: Entity): void;
|
5976
|
+
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity' | 'defineComponent'>, entity: Entity): void;
|
5875
5977
|
|
5876
5978
|
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
5877
5979
|
|
@@ -6410,6 +6512,7 @@ export declare type Transport = {
|
|
6410
6512
|
send(message: Uint8Array): Promise<void>;
|
6411
6513
|
onmessage?(message: Uint8Array): void;
|
6412
6514
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
6515
|
+
type?: string;
|
6413
6516
|
};
|
6414
6517
|
|
6415
6518
|
/**
|
package/dist/index.bundled.d.ts
CHANGED
@@ -1357,12 +1357,12 @@ export declare const CRDT_MESSAGE_HEADER_LENGTH = 8;
|
|
1357
1357
|
/**
|
1358
1358
|
* @public
|
1359
1359
|
*/
|
1360
|
-
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | DeleteEntityMessage |
|
1360
|
+
export declare type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
1361
1361
|
|
1362
1362
|
/**
|
1363
1363
|
* @public
|
1364
1364
|
*/
|
1365
|
-
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody;
|
1365
|
+
export declare type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
1366
1366
|
|
1367
1367
|
/**
|
1368
1368
|
* Min length = 8 bytes
|
@@ -1414,9 +1414,17 @@ export declare enum CrdtMessageType {
|
|
1414
1414
|
DELETE_COMPONENT = 2,
|
1415
1415
|
DELETE_ENTITY = 3,
|
1416
1416
|
APPEND_VALUE = 4,
|
1417
|
-
|
1417
|
+
PUT_COMPONENT_NETWORK = 5,
|
1418
|
+
DELETE_COMPONENT_NETWORK = 6,
|
1419
|
+
DELETE_ENTITY_NETWORK = 7,
|
1420
|
+
MAX_MESSAGE_TYPE = 8
|
1418
1421
|
}
|
1419
1422
|
|
1423
|
+
/**
|
1424
|
+
* @public
|
1425
|
+
*/
|
1426
|
+
export declare type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComponentNetworkMessageBody | DeleteEntityNetworkMessageBody;
|
1427
|
+
|
1420
1428
|
export declare function createEthereumProvider(): {
|
1421
1429
|
send(message: RPCSendableMessage, callback?: ((error: Error | null, result?: any) => void) | undefined): void;
|
1422
1430
|
sendAsync(message: RPCSendableMessage, callback: (error: Error | null, result?: any) => void): void;
|
@@ -1497,6 +1505,38 @@ export declare type DeleteComponentMessageBody = {
|
|
1497
1505
|
timestamp: number;
|
1498
1506
|
};
|
1499
1507
|
|
1508
|
+
/**
|
1509
|
+
* @public
|
1510
|
+
*/
|
1511
|
+
export declare namespace DeleteComponentNetwork {
|
1512
|
+
const MESSAGE_HEADER_LENGTH = 16;
|
1513
|
+
/**
|
1514
|
+
* Write DeleteComponent message
|
1515
|
+
*/
|
1516
|
+
export function write(entity: Entity, componentId: number, timestamp: number, networkId: number, buf: ByteBuffer): void;
|
1517
|
+
export function read(buf: ByteBuffer): DeleteComponentNetworkMessage | null;
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
/**
|
1521
|
+
* @public
|
1522
|
+
*/
|
1523
|
+
export declare type DeleteComponentNetworkMessage = CrdtMessageHeader & DeleteComponentNetworkMessageBody;
|
1524
|
+
|
1525
|
+
/**
|
1526
|
+
* @param entity - Uint32 number of the entity
|
1527
|
+
* @param componentId - Uint32 number of id
|
1528
|
+
* @param timestamp - Uint32 Lamport timestamp
|
1529
|
+
* @param networkId - Uint32 user network id
|
1530
|
+
* @public
|
1531
|
+
*/
|
1532
|
+
export declare type DeleteComponentNetworkMessageBody = {
|
1533
|
+
type: CrdtMessageType.DELETE_COMPONENT_NETWORK;
|
1534
|
+
entityId: Entity;
|
1535
|
+
componentId: number;
|
1536
|
+
timestamp: number;
|
1537
|
+
networkId: number;
|
1538
|
+
};
|
1539
|
+
|
1500
1540
|
/**
|
1501
1541
|
* @public
|
1502
1542
|
*/
|
@@ -1520,6 +1560,29 @@ export declare type DeleteEntityMessageBody = {
|
|
1520
1560
|
entityId: Entity;
|
1521
1561
|
};
|
1522
1562
|
|
1563
|
+
/**
|
1564
|
+
* @public
|
1565
|
+
*/
|
1566
|
+
export declare namespace DeleteEntityNetwork {
|
1567
|
+
const MESSAGE_HEADER_LENGTH = 8;
|
1568
|
+
export function write(entity: Entity, networkId: number, buf: ByteBuffer): void;
|
1569
|
+
export function read(buf: ByteBuffer): DeleteEntityNetworkMessage | null;
|
1570
|
+
}
|
1571
|
+
|
1572
|
+
/**
|
1573
|
+
* @public
|
1574
|
+
*/
|
1575
|
+
export declare type DeleteEntityNetworkMessage = CrdtMessageHeader & DeleteEntityNetworkMessageBody;
|
1576
|
+
|
1577
|
+
/**
|
1578
|
+
* @public
|
1579
|
+
*/
|
1580
|
+
export declare type DeleteEntityNetworkMessageBody = {
|
1581
|
+
type: CrdtMessageType.DELETE_ENTITY_NETWORK;
|
1582
|
+
entityId: Entity;
|
1583
|
+
networkId: number;
|
1584
|
+
};
|
1585
|
+
|
1523
1586
|
/**
|
1524
1587
|
* @public
|
1525
1588
|
*/
|
@@ -2049,8 +2112,6 @@ export declare interface IEngine {
|
|
2049
2112
|
* components that will be available to this engine and to run optimizations.
|
2050
2113
|
*/
|
2051
2114
|
seal(): void;
|
2052
|
-
/* Excluded from this release type: addNetworkManager */
|
2053
|
-
/* Excluded from this release type: getNetworkManager */
|
2054
2115
|
}
|
2055
2116
|
|
2056
2117
|
/**
|
@@ -2234,6 +2295,20 @@ export declare type IncludeUndefined<T> = {
|
|
2234
2295
|
[P in keyof T]: undefined extends T[P] ? P : never;
|
2235
2296
|
}[keyof T];
|
2236
2297
|
|
2298
|
+
export declare type INetowrkEntity = LastWriteWinElementSetComponentDefinition<INetowrkEntityType>;
|
2299
|
+
|
2300
|
+
export declare interface INetowrkEntityType {
|
2301
|
+
networkId: number;
|
2302
|
+
entityId: Entity;
|
2303
|
+
}
|
2304
|
+
|
2305
|
+
export declare type INetowrkParent = LastWriteWinElementSetComponentDefinition<INetowrkParentType>;
|
2306
|
+
|
2307
|
+
export declare interface INetowrkParentType {
|
2308
|
+
networkId: number;
|
2309
|
+
entityId: Entity;
|
2310
|
+
}
|
2311
|
+
|
2237
2312
|
/**
|
2238
2313
|
* @public
|
2239
2314
|
* Input component
|
@@ -3390,6 +3465,10 @@ export declare interface NameType {
|
|
3390
3465
|
value: string;
|
3391
3466
|
}
|
3392
3467
|
|
3468
|
+
/* Excluded from this release type: NetworkEntity */
|
3469
|
+
|
3470
|
+
/* Excluded from this release type: NetworkParent */
|
3471
|
+
|
3393
3472
|
/** NftFrameType is a predefined framing style for the image. */
|
3394
3473
|
/**
|
3395
3474
|
* @public
|
@@ -5324,6 +5403,29 @@ export declare namespace PutComponentOperation {
|
|
5324
5403
|
export function read(buf: ByteBuffer): PutComponentMessage | null;
|
5325
5404
|
}
|
5326
5405
|
|
5406
|
+
/**
|
5407
|
+
* @public
|
5408
|
+
*/
|
5409
|
+
export declare type PutNetworkComponentMessage = CrdtMessageHeader & PutNetworkComponentMessageBody;
|
5410
|
+
|
5411
|
+
export declare type PutNetworkComponentMessageBody = Omit<PutComponentMessageBody, 'type'> & {
|
5412
|
+
type: CrdtMessageType.PUT_COMPONENT_NETWORK;
|
5413
|
+
networkId: number;
|
5414
|
+
};
|
5415
|
+
|
5416
|
+
/**
|
5417
|
+
* @public
|
5418
|
+
*/
|
5419
|
+
export declare namespace PutNetworkComponentOperation {
|
5420
|
+
const MESSAGE_HEADER_LENGTH = 20;
|
5421
|
+
/**
|
5422
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
5423
|
+
* already allocated
|
5424
|
+
*/
|
5425
|
+
export function write(entity: Entity, timestamp: number, componentId: number, networkId: number, data: Uint8Array, buf: ByteBuffer): void;
|
5426
|
+
export function read(buf: ByteBuffer): PutNetworkComponentMessage | null;
|
5427
|
+
}
|
5428
|
+
|
5327
5429
|
/**
|
5328
5430
|
* @public
|
5329
5431
|
* Quaternion is a type and a namespace.
|
@@ -5871,7 +5973,7 @@ export declare namespace Rect {
|
|
5871
5973
|
* @param firstEntity - the root entity of the tree
|
5872
5974
|
* @public
|
5873
5975
|
*/
|
5874
|
-
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity'>, entity: Entity): void;
|
5976
|
+
export declare function removeEntityWithChildren(engine: Pick<IEngine, 'getEntitiesWith' | 'defineComponentFromSchema' | 'removeEntity' | 'defineComponent'>, entity: Entity): void;
|
5875
5977
|
|
5876
5978
|
export declare const RESERVED_LOCAL_ENTITIES = 65535;
|
5877
5979
|
|
@@ -6410,6 +6512,7 @@ export declare type Transport = {
|
|
6410
6512
|
send(message: Uint8Array): Promise<void>;
|
6411
6513
|
onmessage?(message: Uint8Array): void;
|
6412
6514
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
6515
|
+
type?: string;
|
6413
6516
|
};
|
6414
6517
|
|
6415
6518
|
/**
|