@dcl/ecs 7.24.4-28553021180.commit-e8ab68c → 7.24.4-28592331167.commit-697ce9e
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/pb/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +1 -3
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_modifier_area.gen.js +0 -2
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.d.ts +0 -8
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.js +0 -9
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +0 -3
- package/dist/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +1 -10
- package/dist/components/generated/pb/google/protobuf/descriptor.gen.d.ts +1 -640
- package/dist/components/generated/pb/google/protobuf/descriptor.gen.js +4 -260
- 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 +55 -146
- package/dist/systems/triggerArea.js +2 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +1 -3
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_modifier_area.gen.js +0 -2
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.d.ts +0 -8
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.js +1 -10
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts +0 -3
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.js +1 -10
- package/dist-cjs/components/generated/pb/google/protobuf/descriptor.gen.d.ts +1 -640
- package/dist-cjs/components/generated/pb/google/protobuf/descriptor.gen.js +5 -261
- 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 +55 -169
- package/dist-cjs/systems/triggerArea.js +2 -1
- package/package.json +2 -2
- package/dist/serialization/crdt/network/utils.d.ts +0 -9
- package/dist/serialization/crdt/network/utils.js +0 -60
- package/dist-cjs/serialization/crdt/network/utils.d.ts +0 -9
- package/dist-cjs/serialization/crdt/network/utils.js +0 -67
|
@@ -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) {
|
|
@@ -84,22 +70,6 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
84
70
|
const messagesToProcess = value.splice(0, value.length);
|
|
85
71
|
return messagesToProcess;
|
|
86
72
|
}
|
|
87
|
-
/**
|
|
88
|
-
* Find the local entityId associated to the network component message.
|
|
89
|
-
* It's a mapping Network -> to Local
|
|
90
|
-
* If it's not a network message, return the entityId received by the message
|
|
91
|
-
*/
|
|
92
|
-
function findNetworkId(msg) {
|
|
93
|
-
const hasNetworkId = 'networkId' in msg;
|
|
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 };
|
|
102
|
-
}
|
|
103
73
|
/**
|
|
104
74
|
* This fn will be called on every tick.
|
|
105
75
|
* Process all the messages queue received by the transport
|
|
@@ -108,46 +78,52 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
108
78
|
const messagesToProcess = getMessages(receivedMessages);
|
|
109
79
|
const entitiesShouldBeCleaned = [];
|
|
110
80
|
for (const msg of messagesToProcess) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
entityId = engine.addEntity();
|
|
115
|
-
network = { entityId: msg.entityId, networkId: msg.networkId };
|
|
116
|
-
NetworkEntity.createOrReplace(entityId, network);
|
|
117
|
-
}
|
|
118
|
-
if (msg.type === CrdtMessageType.DELETE_ENTITY || msg.type === CrdtMessageType.DELETE_ENTITY_NETWORK) {
|
|
119
|
-
entitiesShouldBeCleaned.push(entityId);
|
|
81
|
+
// Simple CRDT processing - no network logic
|
|
82
|
+
if (msg.type === CrdtMessageType.DELETE_ENTITY) {
|
|
83
|
+
entitiesShouldBeCleaned.push(msg.entityId);
|
|
120
84
|
broadcastMessages.push(msg);
|
|
121
85
|
}
|
|
122
86
|
else {
|
|
123
|
-
const entityState = engine.entityContainer.getEntityState(entityId);
|
|
124
|
-
// Skip updates from removed
|
|
87
|
+
const entityState = engine.entityContainer.getEntityState(msg.entityId);
|
|
88
|
+
// Skip updates from removed entities
|
|
125
89
|
if (entityState === EntityState.Removed)
|
|
126
90
|
continue;
|
|
127
|
-
// Entities with unknown
|
|
91
|
+
// Entities with unknown state should update its entity state
|
|
128
92
|
if (entityState === EntityState.Unknown) {
|
|
129
|
-
engine.entityContainer.updateUsedEntity(entityId);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
93
|
+
engine.entityContainer.updateUsedEntity(msg.entityId);
|
|
94
|
+
}
|
|
95
|
+
// Only process component-related messages (not DELETE_ENTITY)
|
|
96
|
+
if ('componentId' in msg) {
|
|
97
|
+
const component = engine.getComponentOrNull(msg.componentId);
|
|
98
|
+
if (component) {
|
|
99
|
+
// Handle authoritative messages differently - they force the state regardless of timestamp
|
|
100
|
+
const tryUpdate = () => {
|
|
101
|
+
try {
|
|
102
|
+
return msg.type === CrdtMessageType.AUTHORITATIVE_PUT_COMPONENT
|
|
103
|
+
? component.__forceUpdateFromCrdt(msg)
|
|
104
|
+
: component.updateFromCrdt(msg);
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
console.error('[receiveMessages] ERROR processing message', msg, e);
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const result = tryUpdate();
|
|
112
|
+
if (!result)
|
|
113
|
+
continue;
|
|
114
|
+
const [conflictMessage, value] = result;
|
|
115
|
+
if (!conflictMessage) {
|
|
116
|
+
// Add message to broadcast queue when no conflict
|
|
117
|
+
broadcastMessages.push(msg);
|
|
118
|
+
onProcessEntityComponentChange && onProcessEntityComponentChange(msg.entityId, msg.type, component, value);
|
|
119
|
+
}
|
|
139
120
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
121
|
+
else {
|
|
122
|
+
// Component not found - still broadcast for editor compatibility
|
|
123
|
+
/* istanbul ignore next */
|
|
143
124
|
broadcastMessages.push(msg);
|
|
144
|
-
onProcessEntityComponentChange && onProcessEntityComponentChange(entityId, msg.type, component, value);
|
|
145
125
|
}
|
|
146
126
|
}
|
|
147
|
-
else {
|
|
148
|
-
// TODO: test this line, it is fundammental to make the editor work
|
|
149
|
-
broadcastMessages.push(msg);
|
|
150
|
-
}
|
|
151
127
|
}
|
|
152
128
|
}
|
|
153
129
|
// the last stage of the syncrhonization is to delete the entities
|
|
@@ -161,16 +137,17 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
161
137
|
}
|
|
162
138
|
}
|
|
163
139
|
/**
|
|
164
|
-
*
|
|
140
|
+
* Simple CRDT message broadcasting - no network-specific logic
|
|
165
141
|
*/
|
|
166
142
|
async function sendMessages(entitiesDeletedThisTick) {
|
|
167
|
-
//
|
|
143
|
+
// Get messages from broadcast queue and component updates
|
|
168
144
|
const crdtMessages = getMessages(broadcastMessages);
|
|
169
145
|
const buffer = new ReadWriteByteBuffer();
|
|
146
|
+
// Generate CRDT messages from component updates
|
|
170
147
|
for (const component of engine.componentsIter()) {
|
|
171
148
|
for (const message of component.getCrdtUpdates()) {
|
|
172
149
|
const offset = buffer.currentWriteOffset();
|
|
173
|
-
//
|
|
150
|
+
// Only create messages if there's a transport that will handle it
|
|
174
151
|
if (transports.some((t) => t.filter(message))) {
|
|
175
152
|
if (message.type === CrdtMessageType.PUT_COMPONENT) {
|
|
176
153
|
PutComponentOperation.write(message.entityId, message.timestamp, message.componentId, message.data, buffer);
|
|
@@ -194,7 +171,7 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
194
171
|
}
|
|
195
172
|
}
|
|
196
173
|
}
|
|
197
|
-
//
|
|
174
|
+
// Handle deleted entities
|
|
198
175
|
for (const entityId of entitiesDeletedThisTick) {
|
|
199
176
|
const offset = buffer.currentWriteOffset();
|
|
200
177
|
DeleteEntity.write(entityId, buffer);
|
|
@@ -205,87 +182,19 @@ export function crdtSceneSystem(engine, onProcessEntityComponentChange) {
|
|
|
205
182
|
});
|
|
206
183
|
onProcessEntityComponentChange && onProcessEntityComponentChange(entityId, CrdtMessageType.DELETE_ENTITY);
|
|
207
184
|
}
|
|
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
|
|
185
|
+
// Simple transport broadcasting - no network-specific transforms
|
|
186
|
+
for (const transport of transports) {
|
|
187
|
+
const transportBuffer = new ReadWriteByteBuffer();
|
|
220
188
|
for (const message of crdtMessages) {
|
|
221
189
|
// Avoid echo messages
|
|
222
|
-
if (message.transportId ===
|
|
190
|
+
if (message.transportId === transports.indexOf(transport))
|
|
223
191
|
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
|
-
}
|
|
192
|
+
// Check if transport wants this message
|
|
193
|
+
if (transport.filter(message)) {
|
|
194
|
+
transportBuffer.writeBuffer(message.messageBuffer, false);
|
|
242
195
|
}
|
|
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
196
|
}
|
|
287
|
-
|
|
288
|
-
await transport.send(message);
|
|
197
|
+
await transport.send(transportBuffer.toBinary());
|
|
289
198
|
}
|
|
290
199
|
}
|
|
291
200
|
/**
|
|
@@ -177,7 +177,8 @@ export function createTriggerAreaEventsSystem(engine) {
|
|
|
177
177
|
// Pass 2: synthesize per-tick onStay callbacks
|
|
178
178
|
// -----------------------------------------------------------------------
|
|
179
179
|
// Only run if an onStay callback is registered and there are tracked triggerers.
|
|
180
|
-
if (data.triggerCallbackMap.has(1 /* TriggerAreaEventType.TAET_STAY */) &&
|
|
180
|
+
if (data.triggerCallbackMap.has(1 /* TriggerAreaEventType.TAET_STAY */) &&
|
|
181
|
+
data.insideTriggerers.size > 0) {
|
|
181
182
|
const onStay = data.triggerCallbackMap.get(1 /* TriggerAreaEventType.TAET_STAY */);
|
|
182
183
|
const currentTimestamp = Date.now();
|
|
183
184
|
for (const [triggererEntity, cachedResult] of data.insideTriggerers) {
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_modifier_area.gen.d.ts
CHANGED
|
@@ -8,9 +8,7 @@ export declare const enum AvatarModifierType {
|
|
|
8
8
|
/** AMT_HIDE_AVATARS - avatars are invisible */
|
|
9
9
|
AMT_HIDE_AVATARS = 0,
|
|
10
10
|
/** AMT_DISABLE_PASSPORTS - selecting (e.g. clicking) an avatar will not bring up their profile. */
|
|
11
|
-
AMT_DISABLE_PASSPORTS = 1
|
|
12
|
-
/** AMT_HIDE_NAMETAGS - the name tag displayed above an avatar is hidden. */
|
|
13
|
-
AMT_HIDE_NAMETAGS = 2
|
|
11
|
+
AMT_DISABLE_PASSPORTS = 1
|
|
14
12
|
}
|
|
15
13
|
/**
|
|
16
14
|
* The AvatarModifierArea component can be attached to an Entity to define a region of space where
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_modifier_area.gen.js
CHANGED
|
@@ -18,8 +18,6 @@ var AvatarModifierType;
|
|
|
18
18
|
AvatarModifierType[AvatarModifierType["AMT_HIDE_AVATARS"] = 0] = "AMT_HIDE_AVATARS";
|
|
19
19
|
/** AMT_DISABLE_PASSPORTS - selecting (e.g. clicking) an avatar will not bring up their profile. */
|
|
20
20
|
AvatarModifierType[AvatarModifierType["AMT_DISABLE_PASSPORTS"] = 1] = "AMT_DISABLE_PASSPORTS";
|
|
21
|
-
/** AMT_HIDE_NAMETAGS - the name tag displayed above an avatar is hidden. */
|
|
22
|
-
AvatarModifierType[AvatarModifierType["AMT_HIDE_NAMETAGS"] = 2] = "AMT_HIDE_NAMETAGS";
|
|
23
21
|
})(AvatarModifierType = exports.AvatarModifierType || (exports.AvatarModifierType = {}));
|
|
24
22
|
function createBasePBAvatarModifierArea() {
|
|
25
23
|
return { area: undefined, excludeIds: [], modifiers: [] };
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
2
|
import { Color3 } from "../../common/colors.gen";
|
|
3
|
-
/** Mask for which bones an animation applies to. */
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare const enum AvatarEmoteMask {
|
|
8
|
-
AEM_FULL_BODY = 0,
|
|
9
|
-
AEM_UPPER_BODY = 1
|
|
10
|
-
}
|
|
11
3
|
/**
|
|
12
4
|
* The AvatarShape component contains the information required to draw and animate avatar, acting as
|
|
13
5
|
* a simplified GLTF container for this specific case.
|
|
@@ -3,21 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PBAvatarShape =
|
|
6
|
+
exports.PBAvatarShape = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
10
|
const colors_gen_1 = require("../../common/colors.gen");
|
|
11
11
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
12
|
-
/** Mask for which bones an animation applies to. */
|
|
13
|
-
/**
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
var AvatarEmoteMask;
|
|
17
|
-
(function (AvatarEmoteMask) {
|
|
18
|
-
AvatarEmoteMask[AvatarEmoteMask["AEM_FULL_BODY"] = 0] = "AEM_FULL_BODY";
|
|
19
|
-
AvatarEmoteMask[AvatarEmoteMask["AEM_UPPER_BODY"] = 1] = "AEM_UPPER_BODY";
|
|
20
|
-
})(AvatarEmoteMask = exports.AvatarEmoteMask || (exports.AvatarEmoteMask = {}));
|
|
21
12
|
function createBasePBAvatarShape() {
|
|
22
13
|
return {
|
|
23
14
|
id: "",
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/virtual_camera.gen.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
6
6
|
* an 'instant' transition (like using speed/time = 0)
|
|
7
7
|
* * The lookAtEntity defines to which entity the Camera has to look at constantly (independent from
|
|
8
8
|
* the holding entity transform).
|
|
9
|
-
* * The fov defines the Field of View of the virtual camera
|
|
10
9
|
*/
|
|
11
10
|
/**
|
|
12
11
|
* @public
|
|
@@ -14,8 +13,6 @@ import { CameraTransition } from "./common/camera_transition.gen";
|
|
|
14
13
|
export interface PBVirtualCamera {
|
|
15
14
|
defaultTransition?: CameraTransition | undefined;
|
|
16
15
|
lookAtEntity?: number | undefined;
|
|
17
|
-
/** default: 60 */
|
|
18
|
-
fov?: number | undefined;
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
* @public
|
|
@@ -9,7 +9,7 @@ const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
|
9
9
|
const camera_transition_gen_1 = require("./common/camera_transition.gen");
|
|
10
10
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
11
11
|
function createBasePBVirtualCamera() {
|
|
12
|
-
return { defaultTransition: undefined, lookAtEntity: undefined
|
|
12
|
+
return { defaultTransition: undefined, lookAtEntity: undefined };
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* @public
|
|
@@ -23,9 +23,6 @@ var PBVirtualCamera;
|
|
|
23
23
|
if (message.lookAtEntity !== undefined) {
|
|
24
24
|
writer.uint32(16).uint32(message.lookAtEntity);
|
|
25
25
|
}
|
|
26
|
-
if (message.fov !== undefined) {
|
|
27
|
-
writer.uint32(29).float(message.fov);
|
|
28
|
-
}
|
|
29
26
|
return writer;
|
|
30
27
|
}
|
|
31
28
|
PBVirtualCamera.encode = encode;
|
|
@@ -48,12 +45,6 @@ var PBVirtualCamera;
|
|
|
48
45
|
}
|
|
49
46
|
message.lookAtEntity = reader.uint32();
|
|
50
47
|
continue;
|
|
51
|
-
case 3:
|
|
52
|
-
if (tag !== 29) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
message.fov = reader.float();
|
|
56
|
-
continue;
|
|
57
48
|
}
|
|
58
49
|
if ((tag & 7) === 4 || tag === 0) {
|
|
59
50
|
break;
|