@dcl/ecs 7.29.1-36591934525.commit-48aa9b5 → 7.29.1-36624944101.commit-bb81ac6
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/components/generated/component-names.gen.js +0 -1
- package/dist/components/generated/global.gen.d.ts +0 -2
- package/dist/components/generated/global.gen.js +0 -1
- package/dist/components/generated/index.gen.d.ts +0 -4
- package/dist/components/generated/index.gen.js +0 -7
- package/dist/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.d.ts +2 -4
- package/dist/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.js +1 -3
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.d.ts +3 -8
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.js +1 -10
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.js +5 -2
- package/dist/components/manual/CreatedBy.d.ts +9 -0
- package/dist/components/manual/CreatedBy.js +8 -0
- package/dist/components/manual/Transform.d.ts +9 -0
- package/dist/components/manual/Transform.js +3 -3
- package/dist/components/types.d.ts +1 -0
- package/dist/engine/component.d.ts +52 -1
- package/dist/engine/grow-only-value-set-component-definition.js +45 -2
- package/dist/engine/lww-element-set-component-definition.d.ts +3 -1
- package/dist/engine/lww-element-set-component-definition.js +68 -13
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/serialization/crdt/authoritativePutComponent.d.ts +15 -0
- package/dist/serialization/crdt/authoritativePutComponent.js +47 -0
- package/dist/serialization/crdt/index.d.ts +1 -0
- package/dist/serialization/crdt/index.js +1 -0
- package/dist/serialization/crdt/types.d.ts +25 -3
- package/dist/serialization/crdt/types.js +3 -1
- package/dist/systems/crdt/index.d.ts +0 -1
- package/dist/systems/crdt/index.js +76 -143
- package/dist/systems/crdt/types.d.ts +10 -0
- package/dist-cjs/components/generated/component-names.gen.js +0 -1
- package/dist-cjs/components/generated/global.gen.d.ts +0 -2
- package/dist-cjs/components/generated/global.gen.js +2 -3
- package/dist-cjs/components/generated/index.gen.d.ts +0 -4
- package/dist-cjs/components/generated/index.gen.js +2 -10
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.d.ts +2 -4
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/common/explorer_ui.gen.js +1 -3
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.d.ts +3 -8
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_ui_events_result.gen.js +1 -10
- package/dist-cjs/components/index.d.ts +5 -0
- package/dist-cjs/components/index.js +7 -3
- package/dist-cjs/components/manual/CreatedBy.d.ts +9 -0
- package/dist-cjs/components/manual/CreatedBy.js +10 -0
- package/dist-cjs/components/manual/Transform.d.ts +9 -0
- package/dist-cjs/components/manual/Transform.js +3 -3
- package/dist-cjs/components/types.d.ts +1 -0
- package/dist-cjs/engine/component.d.ts +52 -1
- package/dist-cjs/engine/grow-only-value-set-component-definition.js +44 -1
- package/dist-cjs/engine/lww-element-set-component-definition.d.ts +3 -1
- package/dist-cjs/engine/lww-element-set-component-definition.js +71 -14
- package/dist-cjs/index.d.ts +2 -1
- package/dist-cjs/index.js +2 -1
- package/dist-cjs/serialization/crdt/authoritativePutComponent.d.ts +15 -0
- package/dist-cjs/serialization/crdt/authoritativePutComponent.js +50 -0
- package/dist-cjs/serialization/crdt/index.d.ts +1 -0
- package/dist-cjs/serialization/crdt/index.js +1 -0
- package/dist-cjs/serialization/crdt/types.d.ts +25 -3
- package/dist-cjs/serialization/crdt/types.js +3 -1
- package/dist-cjs/systems/crdt/index.d.ts +0 -1
- package/dist-cjs/systems/crdt/index.js +76 -166
- package/dist-cjs/systems/crdt/types.d.ts +10 -0
- package/package.json +2 -2
- package/dist/components/generated/ExplorerItemPurchaseResult.gen.d.ts +0 -1
- package/dist/components/generated/ExplorerItemPurchaseResult.gen.js +0 -25
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.d.ts +0 -68
- package/dist/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.js +0 -184
- package/dist/serialization/crdt/network/utils.d.ts +0 -9
- package/dist/serialization/crdt/network/utils.js +0 -60
- package/dist-cjs/components/generated/ExplorerItemPurchaseResult.gen.d.ts +0 -1
- package/dist-cjs/components/generated/ExplorerItemPurchaseResult.gen.js +0 -28
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.d.ts +0 -68
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/explorer_item_purchase_result.gen.js +0 -190
- package/dist-cjs/serialization/crdt/network/utils.d.ts +0 -9
- package/dist-cjs/serialization/crdt/network/utils.js +0 -67
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Entity } from '../../engine/entity';
|
|
2
|
+
import { ByteBuffer } from '../ByteBuffer';
|
|
3
|
+
import { AuthoritativePutComponentMessage } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace AuthoritativePutComponentOperation {
|
|
8
|
+
const MESSAGE_HEADER_LENGTH = 16;
|
|
9
|
+
/**
|
|
10
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
|
11
|
+
* already allocated
|
|
12
|
+
*/
|
|
13
|
+
function write(entity: Entity, timestamp: number, componentId: number, data: Uint8Array, buf: ByteBuffer): void;
|
|
14
|
+
function read(buf: ByteBuffer): AuthoritativePutComponentMessage | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CrdtMessageProtocol } from './crdtMessageProtocol';
|
|
2
|
+
import { CrdtMessageType, CRDT_MESSAGE_HEADER_LENGTH } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export var AuthoritativePutComponentOperation;
|
|
7
|
+
(function (AuthoritativePutComponentOperation) {
|
|
8
|
+
AuthoritativePutComponentOperation.MESSAGE_HEADER_LENGTH = 16;
|
|
9
|
+
/**
|
|
10
|
+
* Call this function for an optimal writing data passing the ByteBuffer
|
|
11
|
+
* already allocated
|
|
12
|
+
*/
|
|
13
|
+
function write(entity, timestamp, componentId, data, buf) {
|
|
14
|
+
// reserve the beginning
|
|
15
|
+
const startMessageOffset = buf.incrementWriteOffset(CRDT_MESSAGE_HEADER_LENGTH + AuthoritativePutComponentOperation.MESSAGE_HEADER_LENGTH);
|
|
16
|
+
// write body
|
|
17
|
+
buf.writeBuffer(data, false);
|
|
18
|
+
const messageLength = buf.currentWriteOffset() - startMessageOffset;
|
|
19
|
+
// Write CrdtMessage header
|
|
20
|
+
buf.setUint32(startMessageOffset, messageLength);
|
|
21
|
+
buf.setUint32(startMessageOffset + 4, CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT);
|
|
22
|
+
// Write ComponentOperation header
|
|
23
|
+
buf.setUint32(startMessageOffset + 8, entity);
|
|
24
|
+
buf.setUint32(startMessageOffset + 12, componentId);
|
|
25
|
+
buf.setUint32(startMessageOffset + 16, timestamp);
|
|
26
|
+
const newLocal = messageLength - AuthoritativePutComponentOperation.MESSAGE_HEADER_LENGTH - CRDT_MESSAGE_HEADER_LENGTH;
|
|
27
|
+
buf.setUint32(startMessageOffset + 20, newLocal);
|
|
28
|
+
}
|
|
29
|
+
AuthoritativePutComponentOperation.write = write;
|
|
30
|
+
function read(buf) {
|
|
31
|
+
const header = CrdtMessageProtocol.readHeader(buf);
|
|
32
|
+
if (!header) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
if (header.type !== CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT) {
|
|
36
|
+
throw new Error('AuthoritativePutComponentOperation tried to read another message type.');
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
...header,
|
|
40
|
+
entityId: buf.readUint32(),
|
|
41
|
+
componentId: buf.readUint32(),
|
|
42
|
+
timestamp: buf.readUint32(),
|
|
43
|
+
data: buf.readBuffer()
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
AuthoritativePutComponentOperation.read = read;
|
|
47
|
+
})(AuthoritativePutComponentOperation || (AuthoritativePutComponentOperation = {}));
|
|
@@ -11,7 +11,8 @@ export declare enum CrdtMessageType {
|
|
|
11
11
|
PUT_COMPONENT_NETWORK = 5,
|
|
12
12
|
DELETE_COMPONENT_NETWORK = 6,
|
|
13
13
|
DELETE_ENTITY_NETWORK = 7,
|
|
14
|
-
|
|
14
|
+
AUTHORITATIVE_PUT_COMPONENT = 8,
|
|
15
|
+
MAX_MESSAGE_TYPE = 9
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Min length = 8 bytes
|
|
@@ -48,6 +49,23 @@ export type PutNetworkComponentMessageBody = Omit<PutComponentMessageBody, 'type
|
|
|
48
49
|
type: CrdtMessageType.PUT_COMPONENT_NETWORK;
|
|
49
50
|
networkId: number;
|
|
50
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Server authoritative message - identical to PutComponentMessageBody but with forced processing
|
|
54
|
+
* Min. length = header (8 bytes) + 16 bytes = 24 bytes
|
|
55
|
+
*
|
|
56
|
+
* @param entity - Uint32 number of the entity
|
|
57
|
+
* @param componentId - Uint32 number of id
|
|
58
|
+
* @param timestamp - Uint32 Lamport timestamp (server's authoritative timestamp)
|
|
59
|
+
* @param data - Uint8[] data of component => length(4 bytes) + block of bytes[0..length-1]
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export type AuthoritativePutComponentMessageBody = {
|
|
63
|
+
type: CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT;
|
|
64
|
+
entityId: Entity;
|
|
65
|
+
componentId: number;
|
|
66
|
+
timestamp: number;
|
|
67
|
+
data: Uint8Array;
|
|
68
|
+
};
|
|
51
69
|
/**
|
|
52
70
|
* Min. length = header (8 bytes) + 16 bytes = 24 bytes
|
|
53
71
|
*
|
|
@@ -114,6 +132,10 @@ export type AppendValueMessage = CrdtMessageHeader & AppendValueMessageBody;
|
|
|
114
132
|
* @public
|
|
115
133
|
*/
|
|
116
134
|
export type PutComponentMessage = CrdtMessageHeader & PutComponentMessageBody;
|
|
135
|
+
/**
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
export type AuthoritativePutComponentMessage = CrdtMessageHeader & AuthoritativePutComponentMessageBody;
|
|
117
139
|
/**
|
|
118
140
|
* @public
|
|
119
141
|
*/
|
|
@@ -137,7 +159,7 @@ export type DeleteEntityNetworkMessage = CrdtMessageHeader & DeleteEntityNetwork
|
|
|
137
159
|
/**
|
|
138
160
|
* @public
|
|
139
161
|
*/
|
|
140
|
-
export type CrdtMessage = PutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
162
|
+
export type CrdtMessage = PutComponentMessage | AuthoritativePutComponentMessage | DeleteComponentMessage | AppendValueMessage | DeleteEntityMessage | PutNetworkComponentMessage | DeleteComponentNetworkMessage | DeleteEntityNetworkMessage;
|
|
141
163
|
/**
|
|
142
164
|
* @public
|
|
143
165
|
*/
|
|
@@ -145,7 +167,7 @@ export type CrdtNetworkMessageBody = PutNetworkComponentMessageBody | DeleteComp
|
|
|
145
167
|
/**
|
|
146
168
|
* @public
|
|
147
169
|
*/
|
|
148
|
-
export type CrdtMessageBody = PutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
170
|
+
export type CrdtMessageBody = PutComponentMessageBody | AuthoritativePutComponentMessageBody | DeleteComponentMessageBody | DeleteEntityMessageBody | AppendValueMessageBody | CrdtNetworkMessageBody;
|
|
149
171
|
export declare enum ProcessMessageResultType {
|
|
150
172
|
/**
|
|
151
173
|
* Typical message and new state set.
|
|
@@ -13,7 +13,9 @@ export var CrdtMessageType;
|
|
|
13
13
|
CrdtMessageType[CrdtMessageType["PUT_COMPONENT_NETWORK"] = 5] = "PUT_COMPONENT_NETWORK";
|
|
14
14
|
CrdtMessageType[CrdtMessageType["DELETE_COMPONENT_NETWORK"] = 6] = "DELETE_COMPONENT_NETWORK";
|
|
15
15
|
CrdtMessageType[CrdtMessageType["DELETE_ENTITY_NETWORK"] = 7] = "DELETE_ENTITY_NETWORK";
|
|
16
|
-
|
|
16
|
+
// Server authoritative operation - forces component state regardless of timestamp
|
|
17
|
+
CrdtMessageType[CrdtMessageType["AUTHORITATIVE_PUT_COMPONENT"] = 8] = "AUTHORITATIVE_PUT_COMPONENT";
|
|
18
|
+
CrdtMessageType[CrdtMessageType["MAX_MESSAGE_TYPE"] = 9] = "MAX_MESSAGE_TYPE";
|
|
17
19
|
})(CrdtMessageType || (CrdtMessageType = {}));
|
|
18
20
|
/**
|
|
19
21
|
* @public
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { EntityState } from '../../engine/entity';
|
|
2
2
|
import { ReadWriteByteBuffer } from '../../serialization/ByteBuffer';
|
|
3
|
-
import { AppendValueOperation, CrdtMessageProtocol
|
|
3
|
+
import { AppendValueOperation, CrdtMessageProtocol } from '../../serialization/crdt';
|
|
4
4
|
import { DeleteComponent } from '../../serialization/crdt/deleteComponent';
|
|
5
5
|
import { DeleteEntity } from '../../serialization/crdt/deleteEntity';
|
|
6
6
|
import { PutComponentOperation } from '../../serialization/crdt/putComponent';
|
|
7
|
+
import { AuthoritativePutComponentOperation } from '../../serialization/crdt/authoritativePutComponent';
|
|
7
8
|
import { CrdtMessageType } from '../../serialization/crdt/types';
|
|
8
|
-
import { PutNetworkComponentOperation } from '../../serialization/crdt/network/putComponentNetwork';
|
|
9
|
-
import { NetworkEntity as defineNetworkEntity, NetworkParent as defineNetworkParent, Transform as defineTransform } from '../../components';
|
|
10
|
-
import * as networkUtils from '../../serialization/crdt/network/utils';
|
|
11
|
-
// NetworkMessages can only have a MAX_SIZE of 12kb. So we need to send it in chunks.
|
|
12
|
-
export const LIVEKIT_MAX_SIZE = 12;
|
|
13
9
|
/**
|
|
14
10
|
* @internal
|
|
15
11
|
*/
|
|
16
12
|
export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
17
13
|
const transports = [];
|
|
18
|
-
//
|
|
19
|
-
const NetworkEntity = defineNetworkEntity(engine);
|
|
20
|
-
const NetworkParent = defineNetworkParent(engine);
|
|
21
|
-
const Transform = defineTransform(engine);
|
|
14
|
+
// No network components needed - pure CRDT processing only
|
|
22
15
|
// Messages that we received at transport.onMessage waiting to be processed
|
|
23
16
|
const receivedMessages = [];
|
|
24
17
|
// Messages already processed by the engine but that we need to broadcast to other transports.
|
|
@@ -43,27 +36,20 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
43
36
|
if (header.type === CrdtMessageType.DELETE_COMPONENT) {
|
|
44
37
|
message = DeleteComponent.read(buffer);
|
|
45
38
|
}
|
|
46
|
-
else if (header.type === CrdtMessageType.DELETE_COMPONENT_NETWORK) {
|
|
47
|
-
message = DeleteComponentNetwork.read(buffer);
|
|
48
|
-
}
|
|
49
39
|
else if (header.type === CrdtMessageType.PUT_COMPONENT) {
|
|
50
40
|
message = PutComponentOperation.read(buffer);
|
|
51
41
|
}
|
|
52
|
-
else if (header.type === CrdtMessageType.
|
|
53
|
-
message =
|
|
42
|
+
else if (header.type === CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT) {
|
|
43
|
+
message = AuthoritativePutComponentOperation.read(buffer);
|
|
54
44
|
}
|
|
55
45
|
else if (header.type === CrdtMessageType.DELETE_ENTITY) {
|
|
56
46
|
message = DeleteEntity.read(buffer);
|
|
57
47
|
}
|
|
58
|
-
else if (header.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {
|
|
59
|
-
message = DeleteEntityNetwork.read(buffer);
|
|
60
|
-
}
|
|
61
48
|
else if (header.type === CrdtMessageType.APPEND_VALUE) {
|
|
62
49
|
message = AppendValueOperation.read(buffer);
|
|
63
|
-
// Unknown message, we skip it
|
|
64
50
|
}
|
|
65
51
|
else {
|
|
66
|
-
//
|
|
52
|
+
// Unknown message, we skip it (including NETWORK messages)
|
|
67
53
|
buffer.incrementReadOffset(header.length);
|
|
68
54
|
}
|
|
69
55
|
if (message) {
|
|
@@ -85,20 +71,12 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
85
71
|
return messagesToProcess;
|
|
86
72
|
}
|
|
87
73
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
74
|
+
* Reserved-range entities (root/player/camera + avatars, entity number <
|
|
75
|
+
* RESERVED_STATIC_ENTITIES) are host-owned: only a transport flagged with
|
|
76
|
+
* `allowReservedEntities` (the host/renderer) may mutate or delete them.
|
|
91
77
|
*/
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
if (hasNetworkId) {
|
|
95
|
-
for (const [entityId, network] of engine.getEntitiesWith(NetworkEntity)) {
|
|
96
|
-
if (network.networkId === msg.networkId && network.entityId === msg.entityId) {
|
|
97
|
-
return { entityId, network };
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return { entityId: msg.entityId };
|
|
78
|
+
function isTrustedForReservedEntities(transportId) {
|
|
79
|
+
return transportId !== undefined && !!transports[transportId]?.allowReservedEntities;
|
|
102
80
|
}
|
|
103
81
|
/**
|
|
104
82
|
* This fn will be called on every tick.
|
|
@@ -108,46 +86,68 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
108
86
|
const messagesToProcess = getMessages(receivedMessages);
|
|
109
87
|
const entitiesShouldBeCleaned = [];
|
|
110
88
|
for (const msg of messagesToProcess) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
89
|
+
// Simple CRDT processing - no network logic
|
|
90
|
+
if (msg.type === CrdtMessageType.DELETE_ENTITY) {
|
|
91
|
+
// Reject an inbound DELETE_ENTITY on a reserved entity from an untrusted
|
|
92
|
+
// transport (a comms peer, or a scene-added transport). The allocator half
|
|
93
|
+
// is already guarded (engine.removeEntity is a no-op on this range); this
|
|
94
|
+
// closes the receive-side half.
|
|
95
|
+
const isReserved = engine.entityContainer.getEntityState(msg.entityId) === EntityState.Reserved;
|
|
96
|
+
if (isReserved && !isTrustedForReservedEntities(msg.transportId)) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
entitiesShouldBeCleaned.push(msg.entityId);
|
|
120
100
|
broadcastMessages.push(msg);
|
|
121
101
|
}
|
|
122
102
|
else {
|
|
123
|
-
const entityState = engine.entityContainer.getEntityState(entityId);
|
|
124
|
-
// Skip updates from removed
|
|
103
|
+
const entityState = engine.entityContainer.getEntityState(msg.entityId);
|
|
104
|
+
// Skip updates from removed entities
|
|
125
105
|
if (entityState === EntityState.Removed)
|
|
126
106
|
continue;
|
|
127
|
-
//
|
|
107
|
+
// Reject component operations (PUT/DELETE/APPEND, including AUTHORITATIVE_PUT
|
|
108
|
+
// which bypasses timestamps entirely) on reserved entities from untrusted
|
|
109
|
+
// transports. Dropping before updateFromCrdt keeps local LWW timestamps
|
|
110
|
+
// unpoisoned by forged high timestamps, and also prevents the
|
|
111
|
+
// unknown-component rebroadcast below from relaying forged reserved-entity
|
|
112
|
+
// data to other transports (including the renderer).
|
|
113
|
+
if (entityState === EntityState.Reserved && !isTrustedForReservedEntities(msg.transportId))
|
|
114
|
+
continue;
|
|
115
|
+
// Entities with unknown state should update its entity state
|
|
128
116
|
if (entityState === EntityState.Unknown) {
|
|
129
|
-
engine.entityContainer.updateUsedEntity(entityId);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
117
|
+
engine.entityContainer.updateUsedEntity(msg.entityId);
|
|
118
|
+
}
|
|
119
|
+
// Only process component-related messages (not DELETE_ENTITY)
|
|
120
|
+
if ('componentId' in msg) {
|
|
121
|
+
const component = engine.getComponentOrNull(msg.componentId);
|
|
122
|
+
if (component) {
|
|
123
|
+
// Handle authoritative messages differently - they force the state regardless of timestamp
|
|
124
|
+
const tryUpdate = () => {
|
|
125
|
+
try {
|
|
126
|
+
return msg.type === CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT
|
|
127
|
+
? component.__forceUpdateFromCrdt(msg)
|
|
128
|
+
: component.updateFromCrdt(msg);
|
|
129
|
+
}
|
|
130
|
+
catch (e) {
|
|
131
|
+
console.error('[receiveMessages] ERROR processing message', msg, e);
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const result = tryUpdate();
|
|
136
|
+
if (!result)
|
|
137
|
+
continue;
|
|
138
|
+
const [conflictMessage, value] = result;
|
|
139
|
+
if (!conflictMessage) {
|
|
140
|
+
// Add message to broadcast queue when no conflict
|
|
141
|
+
broadcastMessages.push(msg);
|
|
142
|
+
onProcessEntityComponentChange && onProcessEntityComponentChange(msg.entityId, msg.type, component, value);
|
|
143
|
+
}
|
|
139
144
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
145
|
+
else {
|
|
146
|
+
// Component not found - still broadcast for editor compatibility
|
|
147
|
+
/* istanbul ignore next */
|
|
143
148
|
broadcastMessages.push(msg);
|
|
144
|
-
onProcessEntityComponentChange && onProcessEntityComponentChange(entityId, msg.type, component, value);
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
|
-
else {
|
|
148
|
-
// TODO: test this line, it is fundammental to make the editor work
|
|
149
|
-
broadcastMessages.push(msg);
|
|
150
|
-
}
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
// the last stage of the syncrhonization is to delete the entities
|
|
@@ -161,16 +161,17 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
|
-
*
|
|
164
|
+
* Simple CRDT message broadcasting - no network-specific logic
|
|
165
165
|
*/
|
|
166
166
|
async function sendMessages(entitiesDeletedThisTick) {
|
|
167
|
-
//
|
|
167
|
+
// Get messages from broadcast queue and component updates
|
|
168
168
|
const crdtMessages = getMessages(broadcastMessages);
|
|
169
169
|
const buffer = new ReadWriteByteBuffer();
|
|
170
|
+
// Generate CRDT messages from component updates
|
|
170
171
|
for (const component of engine.componentsIter()) {
|
|
171
172
|
for (const message of component.getCrdtUpdates()) {
|
|
172
173
|
const offset = buffer.currentWriteOffset();
|
|
173
|
-
//
|
|
174
|
+
// Only create messages if there's a transport that will handle it
|
|
174
175
|
if (transports.some((t) => t.filter(message))) {
|
|
175
176
|
if (message.type === CrdtMessageType.PUT_COMPONENT) {
|
|
176
177
|
PutComponentOperation.write(message.entityId, message.timestamp, message.componentId, message.data, buffer);
|
|
@@ -194,7 +195,7 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
197
|
}
|
|
197
|
-
//
|
|
198
|
+
// Handle deleted entities
|
|
198
199
|
for (const entityId of entitiesDeletedThisTick) {
|
|
199
200
|
const offset = buffer.currentWriteOffset();
|
|
200
201
|
DeleteEntity.write(entityId, buffer);
|
|
@@ -205,87 +206,19 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
205
206
|
});
|
|
206
207
|
onProcessEntityComponentChange && onProcessEntityComponentChange(entityId, CrdtMessageType.DELETE_ENTITY);
|
|
207
208
|
}
|
|
208
|
-
//
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
const __NetworkMessagesBuffer = [];
|
|
212
|
-
const transportIndex = Number(index);
|
|
213
|
-
const transport = transports[transportIndex];
|
|
214
|
-
const isRendererTransport = transport.type === 'renderer';
|
|
215
|
-
const isNetworkTransport = transport.type === 'network';
|
|
216
|
-
// Reset Buffer for each Transport
|
|
217
|
-
transportBuffer.resetBuffer();
|
|
218
|
-
const buffer = new ReadWriteByteBuffer();
|
|
219
|
-
// Then we send all the new crdtMessages that the transport needs to process
|
|
209
|
+
// Simple transport broadcasting - no network-specific transforms
|
|
210
|
+
for (const transport of transports) {
|
|
211
|
+
const transportBuffer = new ReadWriteByteBuffer();
|
|
220
212
|
for (const message of crdtMessages) {
|
|
221
213
|
// Avoid echo messages
|
|
222
|
-
if (message.transportId ===
|
|
214
|
+
if (message.transportId === transports.indexOf(transport))
|
|
223
215
|
continue;
|
|
224
|
-
//
|
|
225
|
-
if (
|
|
226
|
-
|
|
227
|
-
// Check if adding this message would exceed the size limit
|
|
228
|
-
const currentBufferSize = transportBuffer.toBinary().byteLength;
|
|
229
|
-
const messageSize = message.messageBuffer.byteLength;
|
|
230
|
-
if (isNetworkTransport && (currentBufferSize + messageSize) / 1024 > LIVEKIT_MAX_SIZE) {
|
|
231
|
-
// If the current buffer has content, save it as a chunk
|
|
232
|
-
if (currentBufferSize > 0) {
|
|
233
|
-
__NetworkMessagesBuffer.push(transportBuffer.toCopiedBinary());
|
|
234
|
-
transportBuffer.resetBuffer();
|
|
235
|
-
}
|
|
236
|
-
// If the message itself is larger than the limit, we need to handle it specially
|
|
237
|
-
// For now, we'll skip it to prevent infinite loops
|
|
238
|
-
if (messageSize / 1024 > LIVEKIT_MAX_SIZE) {
|
|
239
|
-
console.error(`Message too large (${messageSize} bytes), skipping message for entity ${message.entityId}`);
|
|
240
|
-
continue;
|
|
241
|
-
}
|
|
216
|
+
// Check if transport wants this message
|
|
217
|
+
if (transport.filter(message)) {
|
|
218
|
+
transportBuffer.writeBuffer(message.messageBuffer, false);
|
|
242
219
|
}
|
|
243
|
-
const { entityId } = findNetworkId(message);
|
|
244
|
-
const transformNeedsFix = 'componentId' in message &&
|
|
245
|
-
message.componentId === Transform.componentId &&
|
|
246
|
-
Transform.has(entityId) &&
|
|
247
|
-
NetworkParent.has(entityId) &&
|
|
248
|
-
NetworkEntity.has(entityId);
|
|
249
|
-
// If there was a LOCAL change in the transform. Add the parent to that transform
|
|
250
|
-
if (isRendererTransport && message.type === CrdtMessageType.PUT_COMPONENT && transformNeedsFix) {
|
|
251
|
-
const parent = findNetworkId(NetworkParent.get(entityId));
|
|
252
|
-
const transformData = networkUtils.fixTransformParent(message, Transform.get(entityId), parent.entityId);
|
|
253
|
-
const offset = buffer.currentWriteOffset();
|
|
254
|
-
PutComponentOperation.write(entityId, message.timestamp, message.componentId, transformData, buffer);
|
|
255
|
-
transportBuffer.writeBuffer(buffer.buffer().subarray(offset, buffer.currentWriteOffset()), false);
|
|
256
|
-
continue;
|
|
257
|
-
}
|
|
258
|
-
if (isRendererTransport && networkUtils.isNetworkMessage(message)) {
|
|
259
|
-
// If it's the renderer transport and its a NetworkMessage, we need to fix the entityId field and convert it to a known Message.
|
|
260
|
-
// PUT_NETWORK_COMPONENT -> PUT_COMPONENT
|
|
261
|
-
let transformData = 'data' in message ? message.data : new Uint8Array();
|
|
262
|
-
if (transformNeedsFix) {
|
|
263
|
-
const parent = findNetworkId(NetworkParent.get(entityId));
|
|
264
|
-
transformData = networkUtils.fixTransformParent(message, Transform.get(entityId), parent.entityId);
|
|
265
|
-
}
|
|
266
|
-
networkUtils.networkMessageToLocal({ ...message, data: transformData }, entityId, buffer, transportBuffer);
|
|
267
|
-
// Iterate the next message
|
|
268
|
-
continue;
|
|
269
|
-
}
|
|
270
|
-
// If its a network transport and its a PUT_COMPONENT that has a NetworkEntity component, we need to send this message
|
|
271
|
-
// through comms with the EntityID and NetworkID from ther NetworkEntity so everyone can recieve this message and map to their custom entityID.
|
|
272
|
-
if (isNetworkTransport && !networkUtils.isNetworkMessage(message)) {
|
|
273
|
-
const networkData = NetworkEntity.getOrNull(message.entityId);
|
|
274
|
-
// If it has networkData convert the message to PUT_NETWORK_COMPONENT.
|
|
275
|
-
if (networkData) {
|
|
276
|
-
networkUtils.localMessageToNetwork(message, networkData, buffer, transportBuffer);
|
|
277
|
-
// Iterate the next message
|
|
278
|
-
continue;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
// Common message
|
|
282
|
-
transportBuffer.writeBuffer(message.messageBuffer, false);
|
|
283
|
-
}
|
|
284
|
-
if (isNetworkTransport && transportBuffer.currentWriteOffset()) {
|
|
285
|
-
__NetworkMessagesBuffer.push(transportBuffer.toBinary());
|
|
286
220
|
}
|
|
287
|
-
|
|
288
|
-
await transport.send(message);
|
|
221
|
+
await transport.send(transportBuffer.toBinary());
|
|
289
222
|
}
|
|
290
223
|
}
|
|
291
224
|
/**
|
|
@@ -29,4 +29,14 @@ export type Transport = {
|
|
|
29
29
|
onmessage?(message: Uint8Array): void;
|
|
30
30
|
filter(message: Omit<TransportMessage, 'messageBuffer'>): boolean;
|
|
31
31
|
type?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this transport is allowed to mutate reserved-range entities
|
|
34
|
+
* (root/player/camera + avatars, entity number below `RESERVED_STATIC_ENTITIES`).
|
|
35
|
+
* Only the trusted host/renderer transport sets this. An inbound DELETE_ENTITY
|
|
36
|
+
* or component operation (PUT_COMPONENT, DELETE_COMPONENT, APPEND_VALUE,
|
|
37
|
+
* AUTHORITATIVE_PUT_COMPONENT) on a reserved entity from a transport without
|
|
38
|
+
* this flag (a comms peer, or any scene-added transport) is rejected — see
|
|
39
|
+
* `receiveMessages`.
|
|
40
|
+
*/
|
|
41
|
+
allowReservedEntities?: boolean;
|
|
32
42
|
};
|
|
@@ -25,7 +25,6 @@ exports.coreComponentMappings = {
|
|
|
25
25
|
"core::CameraMode": 1072,
|
|
26
26
|
"core::CameraModeArea": 1071,
|
|
27
27
|
"core::EngineInfo": 1048,
|
|
28
|
-
"core::ExplorerItemPurchaseResult": 1222,
|
|
29
28
|
"core::ExplorerUiEventsResult": 1220,
|
|
30
29
|
"core::GltfContainer": 1041,
|
|
31
30
|
"core::GltfContainerLoadingState": 1049,
|
|
@@ -18,7 +18,6 @@ import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
|
18
18
|
import { PBCameraMode } from './pb/decentraland/sdk/components/camera_mode.gen';
|
|
19
19
|
import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
20
20
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
21
|
-
import { PBExplorerItemPurchaseResult } from './pb/decentraland/sdk/components/explorer_item_purchase_result.gen';
|
|
22
21
|
import { PBExplorerUiEventsResult } from './pb/decentraland/sdk/components/explorer_ui_events_result.gen';
|
|
23
22
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
24
23
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
@@ -76,7 +75,6 @@ import { PBVisibilityComponent } from './pb/decentraland/sdk/components/visibili
|
|
|
76
75
|
/** @public */ export declare const CameraMode: LastWriteWinElementSetComponentDefinition<PBCameraMode>;
|
|
77
76
|
/** @public */ export declare const CameraModeArea: LastWriteWinElementSetComponentDefinition<PBCameraModeArea>;
|
|
78
77
|
/** @public */ export declare const EngineInfo: LastWriteWinElementSetComponentDefinition<PBEngineInfo>;
|
|
79
|
-
/** @public */ export declare const ExplorerItemPurchaseResult: GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>;
|
|
80
78
|
/** @public */ export declare const ExplorerUiEventsResult: GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>;
|
|
81
79
|
/** @public */ export declare const GltfContainer: LastWriteWinElementSetComponentDefinition<PBGltfContainer>;
|
|
82
80
|
/** @public */ export declare const GltfContainerLoadingState: LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>;
|
|
@@ -26,8 +26,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TriggerAreaResult = exports.TriggerArea = exports.TouchScreenControls = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.PhysicsCombinedImpulse = exports.PhysicsCombinedForce = exports.ParticleSystem = exports.NftShape = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.ExplorerUiEventsResult = exports.
|
|
30
|
-
exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult =
|
|
29
|
+
exports.UiInputBinding = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.TriggerAreaResult = exports.TriggerArea = exports.TouchScreenControls = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.PhysicsCombinedImpulse = exports.PhysicsCombinedForce = exports.ParticleSystem = exports.NftShape = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.ExplorerUiEventsResult = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarNametag = exports.AvatarModifierArea = exports.AvatarLocomotionSettings = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.AudioAnalysis = exports.AssetLoadLoadingState = exports.AssetLoad = void 0;
|
|
30
|
+
exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = void 0;
|
|
31
31
|
const initialization_1 = require("../../runtime/initialization");
|
|
32
32
|
const components = __importStar(require("./index.gen"));
|
|
33
33
|
__exportStar(require("./index.gen"), exports);
|
|
@@ -49,7 +49,6 @@ __exportStar(require("./index.gen"), exports);
|
|
|
49
49
|
/** @public */ exports.CameraMode = components.CameraMode(initialization_1.engine);
|
|
50
50
|
/** @public */ exports.CameraModeArea = components.CameraModeArea(initialization_1.engine);
|
|
51
51
|
/** @public */ exports.EngineInfo = components.EngineInfo(initialization_1.engine);
|
|
52
|
-
/** @public */ exports.ExplorerItemPurchaseResult = components.ExplorerItemPurchaseResult(initialization_1.engine);
|
|
53
52
|
/** @public */ exports.ExplorerUiEventsResult = components.ExplorerUiEventsResult(initialization_1.engine);
|
|
54
53
|
/** @public */ exports.GltfContainer = components.GltfContainer(initialization_1.engine);
|
|
55
54
|
/** @public */ exports.GltfContainerLoadingState = components.GltfContainerLoadingState(initialization_1.engine);
|
|
@@ -19,7 +19,6 @@ import { PBBillboard } from './pb/decentraland/sdk/components/billboard.gen';
|
|
|
19
19
|
import { PBCameraMode } from './pb/decentraland/sdk/components/camera_mode.gen';
|
|
20
20
|
import { PBCameraModeArea } from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
21
21
|
import { PBEngineInfo } from './pb/decentraland/sdk/components/engine_info.gen';
|
|
22
|
-
import { PBExplorerItemPurchaseResult } from './pb/decentraland/sdk/components/explorer_item_purchase_result.gen';
|
|
23
22
|
import { PBExplorerUiEventsResult } from './pb/decentraland/sdk/components/explorer_ui_events_result.gen';
|
|
24
23
|
import { PBGltfContainer } from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
25
24
|
import { PBGltfContainerLoadingState } from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
@@ -82,7 +81,6 @@ export * from './pb/decentraland/sdk/components/billboard.gen';
|
|
|
82
81
|
export * from './pb/decentraland/sdk/components/camera_mode.gen';
|
|
83
82
|
export * from './pb/decentraland/sdk/components/camera_mode_area.gen';
|
|
84
83
|
export * from './pb/decentraland/sdk/components/engine_info.gen';
|
|
85
|
-
export * from './pb/decentraland/sdk/components/explorer_item_purchase_result.gen';
|
|
86
84
|
export * from './pb/decentraland/sdk/components/explorer_ui_events_result.gen';
|
|
87
85
|
export * from './pb/decentraland/sdk/components/gltf_container.gen';
|
|
88
86
|
export * from './pb/decentraland/sdk/components/gltf_container_loading_state.gen';
|
|
@@ -147,7 +145,6 @@ export type GSetComponentGetter<T extends GrowOnlyValueSetComponentDefinition<an
|
|
|
147
145
|
/** @public */ export declare const CameraMode: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
|
148
146
|
/** @public */ export declare const CameraModeArea: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
|
149
147
|
/** @public */ export declare const EngineInfo: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
150
|
-
/** @public */ export declare const ExplorerItemPurchaseResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>>;
|
|
151
148
|
/** @public */ export declare const ExplorerUiEventsResult: GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>>;
|
|
152
149
|
/** @public */ export declare const GltfContainer: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
153
150
|
/** @public */ export declare const GltfContainerLoadingState: LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
@@ -212,7 +209,6 @@ export declare const componentDefinitionByName: {
|
|
|
212
209
|
"core::CameraMode": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraMode>>;
|
|
213
210
|
"core::CameraModeArea": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBCameraModeArea>>;
|
|
214
211
|
"core::EngineInfo": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBEngineInfo>>;
|
|
215
|
-
"core::ExplorerItemPurchaseResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerItemPurchaseResult>>;
|
|
216
212
|
"core::ExplorerUiEventsResult": GSetComponentGetter<GrowOnlyValueSetComponentDefinition<PBExplorerUiEventsResult>>;
|
|
217
213
|
"core::GltfContainer": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainer>>;
|
|
218
214
|
"core::GltfContainerLoadingState": LwwComponentGetter<LastWriteWinElementSetComponentDefinition<PBGltfContainerLoadingState>>;
|
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.TweenState = exports.TweenSequence = exports.Tween = exports.TriggerAreaResult = exports.TriggerArea = exports.TouchScreenControls = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.PhysicsCombinedImpulse = exports.PhysicsCombinedForce = exports.ParticleSystem = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.ExplorerUiEventsResult = exports.
|
|
18
|
-
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInputBinding = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation =
|
|
17
|
+
exports.UiBackground = exports.TweenState = exports.TweenSequence = exports.Tween = exports.TriggerAreaResult = exports.TriggerArea = exports.TouchScreenControls = exports.TextShape = exports.SkyboxTime = exports.RealmInfo = exports.RaycastResult = exports.Raycast = exports.PrimaryPointerInfo = exports.PointerLock = exports.PointerEventsResult = exports.PointerEvents = exports.PlayerIdentityData = exports.PhysicsCombinedImpulse = exports.PhysicsCombinedForce = exports.ParticleSystem = exports.NftShape = exports.MeshRenderer = exports.MeshCollider = exports.Material = exports.MainCamera = exports.LightSource = exports.InputModifier = exports.GltfNodeModifiers = exports.GltfContainerLoadingState = exports.GltfContainer = exports.ExplorerUiEventsResult = exports.EngineInfo = exports.CameraModeArea = exports.CameraMode = exports.Billboard = exports.AvatarShape = exports.AvatarNametag = exports.AvatarModifierArea = exports.AvatarLocomotionSettings = exports.AvatarEquippedData = exports.AvatarEmoteCommand = exports.AvatarBase = exports.AvatarAttach = exports.AudioStream = exports.AudioSource = exports.AudioEvent = exports.AudioAnalysis = exports.AssetLoadLoadingState = exports.AssetLoad = exports.Animator = void 0;
|
|
18
|
+
exports.componentDefinitionByName = exports.VisibilityComponent = exports.VirtualCamera = exports.VideoPlayer = exports.VideoEvent = exports.UiTransform = exports.UiText = exports.UiInputResult = exports.UiInputBinding = exports.UiInput = exports.UiDropdownResult = exports.UiDropdown = exports.UiCanvasInformation = void 0;
|
|
19
19
|
const Animator_gen_1 = require("./Animator.gen");
|
|
20
20
|
const AssetLoad_gen_1 = require("./AssetLoad.gen");
|
|
21
21
|
const AssetLoadLoadingState_gen_1 = require("./AssetLoadLoadingState.gen");
|
|
@@ -35,7 +35,6 @@ const Billboard_gen_1 = require("./Billboard.gen");
|
|
|
35
35
|
const CameraMode_gen_1 = require("./CameraMode.gen");
|
|
36
36
|
const CameraModeArea_gen_1 = require("./CameraModeArea.gen");
|
|
37
37
|
const EngineInfo_gen_1 = require("./EngineInfo.gen");
|
|
38
|
-
const ExplorerItemPurchaseResult_gen_1 = require("./ExplorerItemPurchaseResult.gen");
|
|
39
38
|
const ExplorerUiEventsResult_gen_1 = require("./ExplorerUiEventsResult.gen");
|
|
40
39
|
const GltfContainer_gen_1 = require("./GltfContainer.gen");
|
|
41
40
|
const GltfContainerLoadingState_gen_1 = require("./GltfContainerLoadingState.gen");
|
|
@@ -98,7 +97,6 @@ __exportStar(require("./pb/decentraland/sdk/components/billboard.gen"), exports)
|
|
|
98
97
|
__exportStar(require("./pb/decentraland/sdk/components/camera_mode.gen"), exports);
|
|
99
98
|
__exportStar(require("./pb/decentraland/sdk/components/camera_mode_area.gen"), exports);
|
|
100
99
|
__exportStar(require("./pb/decentraland/sdk/components/engine_info.gen"), exports);
|
|
101
|
-
__exportStar(require("./pb/decentraland/sdk/components/explorer_item_purchase_result.gen"), exports);
|
|
102
100
|
__exportStar(require("./pb/decentraland/sdk/components/explorer_ui_events_result.gen"), exports);
|
|
103
101
|
__exportStar(require("./pb/decentraland/sdk/components/gltf_container.gen"), exports);
|
|
104
102
|
__exportStar(require("./pb/decentraland/sdk/components/gltf_container_loading_state.gen"), exports);
|
|
@@ -205,11 +203,6 @@ exports.CameraModeArea = CameraModeArea;
|
|
|
205
203
|
/** @public */ const EngineInfo = engine =>
|
|
206
204
|
/* @__PURE__ */ engine.defineComponentFromSchema("core::EngineInfo", EngineInfo_gen_1.EngineInfoSchema);
|
|
207
205
|
exports.EngineInfo = EngineInfo;
|
|
208
|
-
/** @public */ const ExplorerItemPurchaseResult = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::ExplorerItemPurchaseResult", ExplorerItemPurchaseResult_gen_1.ExplorerItemPurchaseResultSchema, {
|
|
209
|
-
timestampFunction: (t) => t.timestamp,
|
|
210
|
-
maxElements: 100
|
|
211
|
-
});
|
|
212
|
-
exports.ExplorerItemPurchaseResult = ExplorerItemPurchaseResult;
|
|
213
206
|
/** @public */ const ExplorerUiEventsResult = (engine) => /* @__PURE__ */ engine.defineValueSetComponentFromSchema("core::ExplorerUiEventsResult", ExplorerUiEventsResult_gen_1.ExplorerUiEventsResultSchema, {
|
|
214
207
|
timestampFunction: (t) => t.timestamp,
|
|
215
208
|
maxElements: 100
|
|
@@ -368,7 +361,6 @@ exports.componentDefinitionByName = {
|
|
|
368
361
|
"core::CameraMode": exports.CameraMode,
|
|
369
362
|
"core::CameraModeArea": exports.CameraModeArea,
|
|
370
363
|
"core::EngineInfo": exports.EngineInfo,
|
|
371
|
-
"core::ExplorerItemPurchaseResult": exports.ExplorerItemPurchaseResult,
|
|
372
364
|
"core::ExplorerUiEventsResult": exports.ExplorerUiEventsResult,
|
|
373
365
|
"core::GltfContainer": exports.GltfContainer,
|
|
374
366
|
"core::GltfContainerLoadingState": exports.GltfContainerLoadingState,
|