@dcl/protocol 1.0.0-22668989180.commit-25aa736 → 1.0.0-22672716807.commit-22c32c9
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/out-js/decentraland/kernel/comms/rfc4/comms.gen.d.ts +58 -0
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +393 -19
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +10 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +52 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/pointer_events.gen.d.ts +5 -1
- package/out-js/decentraland/sdk/components/pointer_events.gen.js +31 -3
- package/out-js/decentraland/sdk/components/pointer_events.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/tween.gen.d.ts +19 -0
- package/out-js/decentraland/sdk/components/tween.gen.js +170 -6
- package/out-js/decentraland/sdk/components/tween.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +451 -3
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +51 -0
- package/out-ts/decentraland/sdk/components/pointer_events.gen.ts +44 -3
- package/out-ts/decentraland/sdk/components/tween.gen.ts +183 -0
- package/package.json +3 -3
- package/proto/decentraland/kernel/comms/rfc4/comms.proto +38 -1
- package/proto/decentraland/sdk/components/audio_analysis.proto +44 -0
- package/proto/decentraland/sdk/components/avatar_locomotion_settings.proto +21 -0
- package/proto/decentraland/sdk/components/common/input_action.proto +8 -0
- package/proto/decentraland/sdk/components/light_source.proto +1 -1
- package/proto/decentraland/sdk/components/pointer_events.proto +2 -0
- package/proto/decentraland/sdk/components/tween.proto +10 -0
- package/proto/decentraland/sdk/components/virtual_camera.proto +2 -0
|
@@ -17,6 +17,7 @@ export enum InputAction {
|
|
|
17
17
|
IA_ACTION_4 = 11,
|
|
18
18
|
IA_ACTION_5 = 12,
|
|
19
19
|
IA_ACTION_6 = 13,
|
|
20
|
+
IA_MODIFIER = 14,
|
|
20
21
|
UNRECOGNIZED = -1,
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -64,6 +65,9 @@ export function inputActionFromJSON(object: any): InputAction {
|
|
|
64
65
|
case 13:
|
|
65
66
|
case "IA_ACTION_6":
|
|
66
67
|
return InputAction.IA_ACTION_6;
|
|
68
|
+
case 14:
|
|
69
|
+
case "IA_MODIFIER":
|
|
70
|
+
return InputAction.IA_MODIFIER;
|
|
67
71
|
case -1:
|
|
68
72
|
case "UNRECOGNIZED":
|
|
69
73
|
default:
|
|
@@ -101,6 +105,8 @@ export function inputActionToJSON(object: InputAction): string {
|
|
|
101
105
|
return "IA_ACTION_5";
|
|
102
106
|
case InputAction.IA_ACTION_6:
|
|
103
107
|
return "IA_ACTION_6";
|
|
108
|
+
case InputAction.IA_MODIFIER:
|
|
109
|
+
return "IA_MODIFIER";
|
|
104
110
|
case InputAction.UNRECOGNIZED:
|
|
105
111
|
default:
|
|
106
112
|
return "UNRECOGNIZED";
|
|
@@ -113,6 +119,8 @@ export enum PointerEventType {
|
|
|
113
119
|
PET_DOWN = 1,
|
|
114
120
|
PET_HOVER_ENTER = 2,
|
|
115
121
|
PET_HOVER_LEAVE = 3,
|
|
122
|
+
PET_PROXIMITY_ENTER = 4,
|
|
123
|
+
PET_PROXIMITY_LEAVE = 5,
|
|
116
124
|
UNRECOGNIZED = -1,
|
|
117
125
|
}
|
|
118
126
|
|
|
@@ -130,6 +138,12 @@ export function pointerEventTypeFromJSON(object: any): PointerEventType {
|
|
|
130
138
|
case 3:
|
|
131
139
|
case "PET_HOVER_LEAVE":
|
|
132
140
|
return PointerEventType.PET_HOVER_LEAVE;
|
|
141
|
+
case 4:
|
|
142
|
+
case "PET_PROXIMITY_ENTER":
|
|
143
|
+
return PointerEventType.PET_PROXIMITY_ENTER;
|
|
144
|
+
case 5:
|
|
145
|
+
case "PET_PROXIMITY_LEAVE":
|
|
146
|
+
return PointerEventType.PET_PROXIMITY_LEAVE;
|
|
133
147
|
case -1:
|
|
134
148
|
case "UNRECOGNIZED":
|
|
135
149
|
default:
|
|
@@ -147,8 +161,45 @@ export function pointerEventTypeToJSON(object: PointerEventType): string {
|
|
|
147
161
|
return "PET_HOVER_ENTER";
|
|
148
162
|
case PointerEventType.PET_HOVER_LEAVE:
|
|
149
163
|
return "PET_HOVER_LEAVE";
|
|
164
|
+
case PointerEventType.PET_PROXIMITY_ENTER:
|
|
165
|
+
return "PET_PROXIMITY_ENTER";
|
|
166
|
+
case PointerEventType.PET_PROXIMITY_LEAVE:
|
|
167
|
+
return "PET_PROXIMITY_LEAVE";
|
|
150
168
|
case PointerEventType.UNRECOGNIZED:
|
|
151
169
|
default:
|
|
152
170
|
return "UNRECOGNIZED";
|
|
153
171
|
}
|
|
154
172
|
}
|
|
173
|
+
|
|
174
|
+
export enum InteractionType {
|
|
175
|
+
CURSOR = 0,
|
|
176
|
+
PROXIMITY = 1,
|
|
177
|
+
UNRECOGNIZED = -1,
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export function interactionTypeFromJSON(object: any): InteractionType {
|
|
181
|
+
switch (object) {
|
|
182
|
+
case 0:
|
|
183
|
+
case "CURSOR":
|
|
184
|
+
return InteractionType.CURSOR;
|
|
185
|
+
case 1:
|
|
186
|
+
case "PROXIMITY":
|
|
187
|
+
return InteractionType.PROXIMITY;
|
|
188
|
+
case -1:
|
|
189
|
+
case "UNRECOGNIZED":
|
|
190
|
+
default:
|
|
191
|
+
return InteractionType.UNRECOGNIZED;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function interactionTypeToJSON(object: InteractionType): string {
|
|
196
|
+
switch (object) {
|
|
197
|
+
case InteractionType.CURSOR:
|
|
198
|
+
return "CURSOR";
|
|
199
|
+
case InteractionType.PROXIMITY:
|
|
200
|
+
return "PROXIMITY";
|
|
201
|
+
case InteractionType.UNRECOGNIZED:
|
|
202
|
+
default:
|
|
203
|
+
return "UNRECOGNIZED";
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -4,6 +4,9 @@ import {
|
|
|
4
4
|
InputAction,
|
|
5
5
|
inputActionFromJSON,
|
|
6
6
|
inputActionToJSON,
|
|
7
|
+
InteractionType,
|
|
8
|
+
interactionTypeFromJSON,
|
|
9
|
+
interactionTypeToJSON,
|
|
7
10
|
PointerEventType,
|
|
8
11
|
pointerEventTypeFromJSON,
|
|
9
12
|
pointerEventTypeToJSON,
|
|
@@ -76,14 +79,22 @@ export interface PBPointerEvents_Info {
|
|
|
76
79
|
| boolean
|
|
77
80
|
| undefined;
|
|
78
81
|
/** range of interaction from the avatar's position (default 0) */
|
|
79
|
-
maxPlayerDistance?:
|
|
82
|
+
maxPlayerDistance?:
|
|
83
|
+
| number
|
|
84
|
+
| undefined;
|
|
85
|
+
/** resolution order when multiple events overlap, higher wins (default 0) */
|
|
86
|
+
priority?: number | undefined;
|
|
80
87
|
}
|
|
81
88
|
|
|
82
89
|
export interface PBPointerEvents_Entry {
|
|
83
90
|
/** the kind of interaction to detect */
|
|
84
91
|
eventType: PointerEventType;
|
|
85
92
|
/** additional configuration for this detection */
|
|
86
|
-
eventInfo:
|
|
93
|
+
eventInfo:
|
|
94
|
+
| PBPointerEvents_Info
|
|
95
|
+
| undefined;
|
|
96
|
+
/** the type of interaction source (default 0 == CURSOR) */
|
|
97
|
+
interactionType?: InteractionType | undefined;
|
|
87
98
|
}
|
|
88
99
|
|
|
89
100
|
function createBasePBPointerEvents(): PBPointerEvents {
|
|
@@ -158,6 +169,7 @@ function createBasePBPointerEvents_Info(): PBPointerEvents_Info {
|
|
|
158
169
|
showFeedback: undefined,
|
|
159
170
|
showHighlight: undefined,
|
|
160
171
|
maxPlayerDistance: undefined,
|
|
172
|
+
priority: undefined,
|
|
161
173
|
};
|
|
162
174
|
}
|
|
163
175
|
|
|
@@ -181,6 +193,9 @@ export namespace PBPointerEvents_Info {
|
|
|
181
193
|
if (message.maxPlayerDistance !== undefined) {
|
|
182
194
|
writer.uint32(53).float(message.maxPlayerDistance);
|
|
183
195
|
}
|
|
196
|
+
if (message.priority !== undefined) {
|
|
197
|
+
writer.uint32(56).uint32(message.priority);
|
|
198
|
+
}
|
|
184
199
|
return writer;
|
|
185
200
|
}
|
|
186
201
|
|
|
@@ -233,6 +248,13 @@ export namespace PBPointerEvents_Info {
|
|
|
233
248
|
|
|
234
249
|
message.maxPlayerDistance = reader.float();
|
|
235
250
|
continue;
|
|
251
|
+
case 7:
|
|
252
|
+
if (tag !== 56) {
|
|
253
|
+
break;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
message.priority = reader.uint32();
|
|
257
|
+
continue;
|
|
236
258
|
}
|
|
237
259
|
if ((tag & 7) === 4 || tag === 0) {
|
|
238
260
|
break;
|
|
@@ -250,6 +272,7 @@ export namespace PBPointerEvents_Info {
|
|
|
250
272
|
showFeedback: isSet(object.showFeedback) ? Boolean(object.showFeedback) : undefined,
|
|
251
273
|
showHighlight: isSet(object.showHighlight) ? Boolean(object.showHighlight) : undefined,
|
|
252
274
|
maxPlayerDistance: isSet(object.maxPlayerDistance) ? Number(object.maxPlayerDistance) : undefined,
|
|
275
|
+
priority: isSet(object.priority) ? Number(object.priority) : undefined,
|
|
253
276
|
};
|
|
254
277
|
}
|
|
255
278
|
|
|
@@ -262,6 +285,7 @@ export namespace PBPointerEvents_Info {
|
|
|
262
285
|
message.showFeedback !== undefined && (obj.showFeedback = message.showFeedback);
|
|
263
286
|
message.showHighlight !== undefined && (obj.showHighlight = message.showHighlight);
|
|
264
287
|
message.maxPlayerDistance !== undefined && (obj.maxPlayerDistance = message.maxPlayerDistance);
|
|
288
|
+
message.priority !== undefined && (obj.priority = Math.round(message.priority));
|
|
265
289
|
return obj;
|
|
266
290
|
}
|
|
267
291
|
|
|
@@ -277,12 +301,13 @@ export namespace PBPointerEvents_Info {
|
|
|
277
301
|
message.showFeedback = object.showFeedback ?? undefined;
|
|
278
302
|
message.showHighlight = object.showHighlight ?? undefined;
|
|
279
303
|
message.maxPlayerDistance = object.maxPlayerDistance ?? undefined;
|
|
304
|
+
message.priority = object.priority ?? undefined;
|
|
280
305
|
return message;
|
|
281
306
|
}
|
|
282
307
|
}
|
|
283
308
|
|
|
284
309
|
function createBasePBPointerEvents_Entry(): PBPointerEvents_Entry {
|
|
285
|
-
return { eventType: 0, eventInfo: undefined };
|
|
310
|
+
return { eventType: 0, eventInfo: undefined, interactionType: undefined };
|
|
286
311
|
}
|
|
287
312
|
|
|
288
313
|
export namespace PBPointerEvents_Entry {
|
|
@@ -293,6 +318,9 @@ export namespace PBPointerEvents_Entry {
|
|
|
293
318
|
if (message.eventInfo !== undefined) {
|
|
294
319
|
PBPointerEvents_Info.encode(message.eventInfo, writer.uint32(18).fork()).ldelim();
|
|
295
320
|
}
|
|
321
|
+
if (message.interactionType !== undefined) {
|
|
322
|
+
writer.uint32(24).int32(message.interactionType);
|
|
323
|
+
}
|
|
296
324
|
return writer;
|
|
297
325
|
}
|
|
298
326
|
|
|
@@ -317,6 +345,13 @@ export namespace PBPointerEvents_Entry {
|
|
|
317
345
|
|
|
318
346
|
message.eventInfo = PBPointerEvents_Info.decode(reader, reader.uint32());
|
|
319
347
|
continue;
|
|
348
|
+
case 3:
|
|
349
|
+
if (tag !== 24) {
|
|
350
|
+
break;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
message.interactionType = reader.int32() as any;
|
|
354
|
+
continue;
|
|
320
355
|
}
|
|
321
356
|
if ((tag & 7) === 4 || tag === 0) {
|
|
322
357
|
break;
|
|
@@ -330,6 +365,7 @@ export namespace PBPointerEvents_Entry {
|
|
|
330
365
|
return {
|
|
331
366
|
eventType: isSet(object.eventType) ? pointerEventTypeFromJSON(object.eventType) : 0,
|
|
332
367
|
eventInfo: isSet(object.eventInfo) ? PBPointerEvents_Info.fromJSON(object.eventInfo) : undefined,
|
|
368
|
+
interactionType: isSet(object.interactionType) ? interactionTypeFromJSON(object.interactionType) : undefined,
|
|
333
369
|
};
|
|
334
370
|
}
|
|
335
371
|
|
|
@@ -338,6 +374,10 @@ export namespace PBPointerEvents_Entry {
|
|
|
338
374
|
message.eventType !== undefined && (obj.eventType = pointerEventTypeToJSON(message.eventType));
|
|
339
375
|
message.eventInfo !== undefined &&
|
|
340
376
|
(obj.eventInfo = message.eventInfo ? PBPointerEvents_Info.toJSON(message.eventInfo) : undefined);
|
|
377
|
+
message.interactionType !== undefined &&
|
|
378
|
+
(obj.interactionType = message.interactionType !== undefined
|
|
379
|
+
? interactionTypeToJSON(message.interactionType)
|
|
380
|
+
: undefined);
|
|
341
381
|
return obj;
|
|
342
382
|
}
|
|
343
383
|
|
|
@@ -353,6 +393,7 @@ export namespace PBPointerEvents_Entry {
|
|
|
353
393
|
message.eventInfo = (object.eventInfo !== undefined && object.eventInfo !== null)
|
|
354
394
|
? PBPointerEvents_Info.fromPartial(object.eventInfo)
|
|
355
395
|
: undefined;
|
|
396
|
+
message.interactionType = object.interactionType ?? undefined;
|
|
356
397
|
return message;
|
|
357
398
|
}
|
|
358
399
|
}
|
|
@@ -262,6 +262,7 @@ export interface PBTween {
|
|
|
262
262
|
| { $case: "rotateContinuous"; rotateContinuous: RotateContinuous }
|
|
263
263
|
| { $case: "moveContinuous"; moveContinuous: MoveContinuous }
|
|
264
264
|
| { $case: "textureMoveContinuous"; textureMoveContinuous: TextureMoveContinuous }
|
|
265
|
+
| { $case: "moveRotateScale"; moveRotateScale: MoveRotateScale }
|
|
265
266
|
| undefined;
|
|
266
267
|
/** default true (pause or running) */
|
|
267
268
|
playing?:
|
|
@@ -287,6 +288,15 @@ export interface Scale {
|
|
|
287
288
|
end: Vector3 | undefined;
|
|
288
289
|
}
|
|
289
290
|
|
|
291
|
+
export interface MoveRotateScale {
|
|
292
|
+
positionStart: Vector3 | undefined;
|
|
293
|
+
positionEnd: Vector3 | undefined;
|
|
294
|
+
rotationStart: Quaternion | undefined;
|
|
295
|
+
rotationEnd: Quaternion | undefined;
|
|
296
|
+
scaleStart: Vector3 | undefined;
|
|
297
|
+
scaleEnd: Vector3 | undefined;
|
|
298
|
+
}
|
|
299
|
+
|
|
290
300
|
/**
|
|
291
301
|
* This tween mode allows to move the texture of a PbrMaterial or UnlitMaterial.
|
|
292
302
|
* You can also specify the movement type (offset or tiling)
|
|
@@ -351,6 +361,9 @@ export namespace PBTween {
|
|
|
351
361
|
case "textureMoveContinuous":
|
|
352
362
|
TextureMoveContinuous.encode(message.mode.textureMoveContinuous, writer.uint32(90).fork()).ldelim();
|
|
353
363
|
break;
|
|
364
|
+
case "moveRotateScale":
|
|
365
|
+
MoveRotateScale.encode(message.mode.moveRotateScale, writer.uint32(98).fork()).ldelim();
|
|
366
|
+
break;
|
|
354
367
|
}
|
|
355
368
|
if (message.playing !== undefined) {
|
|
356
369
|
writer.uint32(48).bool(message.playing);
|
|
@@ -437,6 +450,13 @@ export namespace PBTween {
|
|
|
437
450
|
textureMoveContinuous: TextureMoveContinuous.decode(reader, reader.uint32()),
|
|
438
451
|
};
|
|
439
452
|
continue;
|
|
453
|
+
case 12:
|
|
454
|
+
if (tag !== 98) {
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
message.mode = { $case: "moveRotateScale", moveRotateScale: MoveRotateScale.decode(reader, reader.uint32()) };
|
|
459
|
+
continue;
|
|
440
460
|
case 6:
|
|
441
461
|
if (tag !== 48) {
|
|
442
462
|
break;
|
|
@@ -481,6 +501,8 @@ export namespace PBTween {
|
|
|
481
501
|
$case: "textureMoveContinuous",
|
|
482
502
|
textureMoveContinuous: TextureMoveContinuous.fromJSON(object.textureMoveContinuous),
|
|
483
503
|
}
|
|
504
|
+
: isSet(object.moveRotateScale)
|
|
505
|
+
? { $case: "moveRotateScale", moveRotateScale: MoveRotateScale.fromJSON(object.moveRotateScale) }
|
|
484
506
|
: undefined,
|
|
485
507
|
playing: isSet(object.playing) ? Boolean(object.playing) : undefined,
|
|
486
508
|
currentTime: isSet(object.currentTime) ? Number(object.currentTime) : undefined,
|
|
@@ -510,6 +532,10 @@ export namespace PBTween {
|
|
|
510
532
|
(obj.textureMoveContinuous = message.mode?.textureMoveContinuous
|
|
511
533
|
? TextureMoveContinuous.toJSON(message.mode?.textureMoveContinuous)
|
|
512
534
|
: undefined);
|
|
535
|
+
message.mode?.$case === "moveRotateScale" &&
|
|
536
|
+
(obj.moveRotateScale = message.mode?.moveRotateScale
|
|
537
|
+
? MoveRotateScale.toJSON(message.mode?.moveRotateScale)
|
|
538
|
+
: undefined);
|
|
513
539
|
message.playing !== undefined && (obj.playing = message.playing);
|
|
514
540
|
message.currentTime !== undefined && (obj.currentTime = message.currentTime);
|
|
515
541
|
return obj;
|
|
@@ -569,6 +595,16 @@ export namespace PBTween {
|
|
|
569
595
|
textureMoveContinuous: TextureMoveContinuous.fromPartial(object.mode.textureMoveContinuous),
|
|
570
596
|
};
|
|
571
597
|
}
|
|
598
|
+
if (
|
|
599
|
+
object.mode?.$case === "moveRotateScale" &&
|
|
600
|
+
object.mode?.moveRotateScale !== undefined &&
|
|
601
|
+
object.mode?.moveRotateScale !== null
|
|
602
|
+
) {
|
|
603
|
+
message.mode = {
|
|
604
|
+
$case: "moveRotateScale",
|
|
605
|
+
moveRotateScale: MoveRotateScale.fromPartial(object.mode.moveRotateScale),
|
|
606
|
+
};
|
|
607
|
+
}
|
|
572
608
|
message.playing = object.playing ?? undefined;
|
|
573
609
|
message.currentTime = object.currentTime ?? undefined;
|
|
574
610
|
return message;
|
|
@@ -807,6 +843,153 @@ export namespace Scale {
|
|
|
807
843
|
}
|
|
808
844
|
}
|
|
809
845
|
|
|
846
|
+
function createBaseMoveRotateScale(): MoveRotateScale {
|
|
847
|
+
return {
|
|
848
|
+
positionStart: undefined,
|
|
849
|
+
positionEnd: undefined,
|
|
850
|
+
rotationStart: undefined,
|
|
851
|
+
rotationEnd: undefined,
|
|
852
|
+
scaleStart: undefined,
|
|
853
|
+
scaleEnd: undefined,
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export namespace MoveRotateScale {
|
|
858
|
+
export function encode(message: MoveRotateScale, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
859
|
+
if (message.positionStart !== undefined) {
|
|
860
|
+
Vector3.encode(message.positionStart, writer.uint32(10).fork()).ldelim();
|
|
861
|
+
}
|
|
862
|
+
if (message.positionEnd !== undefined) {
|
|
863
|
+
Vector3.encode(message.positionEnd, writer.uint32(18).fork()).ldelim();
|
|
864
|
+
}
|
|
865
|
+
if (message.rotationStart !== undefined) {
|
|
866
|
+
Quaternion.encode(message.rotationStart, writer.uint32(26).fork()).ldelim();
|
|
867
|
+
}
|
|
868
|
+
if (message.rotationEnd !== undefined) {
|
|
869
|
+
Quaternion.encode(message.rotationEnd, writer.uint32(34).fork()).ldelim();
|
|
870
|
+
}
|
|
871
|
+
if (message.scaleStart !== undefined) {
|
|
872
|
+
Vector3.encode(message.scaleStart, writer.uint32(42).fork()).ldelim();
|
|
873
|
+
}
|
|
874
|
+
if (message.scaleEnd !== undefined) {
|
|
875
|
+
Vector3.encode(message.scaleEnd, writer.uint32(50).fork()).ldelim();
|
|
876
|
+
}
|
|
877
|
+
return writer;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): MoveRotateScale {
|
|
881
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
882
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
883
|
+
const message = createBaseMoveRotateScale();
|
|
884
|
+
while (reader.pos < end) {
|
|
885
|
+
const tag = reader.uint32();
|
|
886
|
+
switch (tag >>> 3) {
|
|
887
|
+
case 1:
|
|
888
|
+
if (tag !== 10) {
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
message.positionStart = Vector3.decode(reader, reader.uint32());
|
|
893
|
+
continue;
|
|
894
|
+
case 2:
|
|
895
|
+
if (tag !== 18) {
|
|
896
|
+
break;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
message.positionEnd = Vector3.decode(reader, reader.uint32());
|
|
900
|
+
continue;
|
|
901
|
+
case 3:
|
|
902
|
+
if (tag !== 26) {
|
|
903
|
+
break;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
message.rotationStart = Quaternion.decode(reader, reader.uint32());
|
|
907
|
+
continue;
|
|
908
|
+
case 4:
|
|
909
|
+
if (tag !== 34) {
|
|
910
|
+
break;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
message.rotationEnd = Quaternion.decode(reader, reader.uint32());
|
|
914
|
+
continue;
|
|
915
|
+
case 5:
|
|
916
|
+
if (tag !== 42) {
|
|
917
|
+
break;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
message.scaleStart = Vector3.decode(reader, reader.uint32());
|
|
921
|
+
continue;
|
|
922
|
+
case 6:
|
|
923
|
+
if (tag !== 50) {
|
|
924
|
+
break;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
message.scaleEnd = Vector3.decode(reader, reader.uint32());
|
|
928
|
+
continue;
|
|
929
|
+
}
|
|
930
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
931
|
+
break;
|
|
932
|
+
}
|
|
933
|
+
reader.skipType(tag & 7);
|
|
934
|
+
}
|
|
935
|
+
return message;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
export function fromJSON(object: any): MoveRotateScale {
|
|
939
|
+
return {
|
|
940
|
+
positionStart: isSet(object.positionStart) ? Vector3.fromJSON(object.positionStart) : undefined,
|
|
941
|
+
positionEnd: isSet(object.positionEnd) ? Vector3.fromJSON(object.positionEnd) : undefined,
|
|
942
|
+
rotationStart: isSet(object.rotationStart) ? Quaternion.fromJSON(object.rotationStart) : undefined,
|
|
943
|
+
rotationEnd: isSet(object.rotationEnd) ? Quaternion.fromJSON(object.rotationEnd) : undefined,
|
|
944
|
+
scaleStart: isSet(object.scaleStart) ? Vector3.fromJSON(object.scaleStart) : undefined,
|
|
945
|
+
scaleEnd: isSet(object.scaleEnd) ? Vector3.fromJSON(object.scaleEnd) : undefined,
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
export function toJSON(message: MoveRotateScale): unknown {
|
|
950
|
+
const obj: any = {};
|
|
951
|
+
message.positionStart !== undefined &&
|
|
952
|
+
(obj.positionStart = message.positionStart ? Vector3.toJSON(message.positionStart) : undefined);
|
|
953
|
+
message.positionEnd !== undefined &&
|
|
954
|
+
(obj.positionEnd = message.positionEnd ? Vector3.toJSON(message.positionEnd) : undefined);
|
|
955
|
+
message.rotationStart !== undefined &&
|
|
956
|
+
(obj.rotationStart = message.rotationStart ? Quaternion.toJSON(message.rotationStart) : undefined);
|
|
957
|
+
message.rotationEnd !== undefined &&
|
|
958
|
+
(obj.rotationEnd = message.rotationEnd ? Quaternion.toJSON(message.rotationEnd) : undefined);
|
|
959
|
+
message.scaleStart !== undefined &&
|
|
960
|
+
(obj.scaleStart = message.scaleStart ? Vector3.toJSON(message.scaleStart) : undefined);
|
|
961
|
+
message.scaleEnd !== undefined && (obj.scaleEnd = message.scaleEnd ? Vector3.toJSON(message.scaleEnd) : undefined);
|
|
962
|
+
return obj;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
export function create<I extends Exact<DeepPartial<MoveRotateScale>, I>>(base?: I): MoveRotateScale {
|
|
966
|
+
return MoveRotateScale.fromPartial(base ?? {});
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export function fromPartial<I extends Exact<DeepPartial<MoveRotateScale>, I>>(object: I): MoveRotateScale {
|
|
970
|
+
const message = createBaseMoveRotateScale();
|
|
971
|
+
message.positionStart = (object.positionStart !== undefined && object.positionStart !== null)
|
|
972
|
+
? Vector3.fromPartial(object.positionStart)
|
|
973
|
+
: undefined;
|
|
974
|
+
message.positionEnd = (object.positionEnd !== undefined && object.positionEnd !== null)
|
|
975
|
+
? Vector3.fromPartial(object.positionEnd)
|
|
976
|
+
: undefined;
|
|
977
|
+
message.rotationStart = (object.rotationStart !== undefined && object.rotationStart !== null)
|
|
978
|
+
? Quaternion.fromPartial(object.rotationStart)
|
|
979
|
+
: undefined;
|
|
980
|
+
message.rotationEnd = (object.rotationEnd !== undefined && object.rotationEnd !== null)
|
|
981
|
+
? Quaternion.fromPartial(object.rotationEnd)
|
|
982
|
+
: undefined;
|
|
983
|
+
message.scaleStart = (object.scaleStart !== undefined && object.scaleStart !== null)
|
|
984
|
+
? Vector3.fromPartial(object.scaleStart)
|
|
985
|
+
: undefined;
|
|
986
|
+
message.scaleEnd = (object.scaleEnd !== undefined && object.scaleEnd !== null)
|
|
987
|
+
? Vector3.fromPartial(object.scaleEnd)
|
|
988
|
+
: undefined;
|
|
989
|
+
return message;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
810
993
|
function createBaseTextureMove(): TextureMove {
|
|
811
994
|
return { start: undefined, end: undefined, movementType: undefined };
|
|
812
995
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-22672716807.commit-22c32c9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "decentraland/protocol.git",
|
|
6
6
|
"homepage": "https://github.com/decentraland/protocol#readme",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "./scripts/check-proto-compabitility.sh"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@protobuf-ts/protoc": "^2.
|
|
16
|
+
"@protobuf-ts/protoc": "^2.11.0",
|
|
17
17
|
"proto-compatibility-tool": "^1.1.2-20220925163655.commit-25bd040",
|
|
18
18
|
"typescript": "^5.0.4"
|
|
19
19
|
},
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"out-js",
|
|
31
31
|
"public"
|
|
32
32
|
],
|
|
33
|
-
"commit": "
|
|
33
|
+
"commit": "22c32c9e22436ba016b833b3caf76cb15d10ab8a"
|
|
34
34
|
}
|
|
@@ -18,6 +18,7 @@ message Packet {
|
|
|
18
18
|
PlayerEmote player_emote = 9;
|
|
19
19
|
SceneEmote scene_emote = 10;
|
|
20
20
|
MovementCompressed movement_compressed = 12;
|
|
21
|
+
LookAtPosition look_at_position = 13;
|
|
21
22
|
}
|
|
22
23
|
uint32 protocol_version = 11;
|
|
23
24
|
}
|
|
@@ -51,26 +52,58 @@ message Movement {
|
|
|
51
52
|
float movement_blend_value = 8;
|
|
52
53
|
float slide_blend_value = 9;
|
|
53
54
|
bool is_grounded = 10;
|
|
54
|
-
bool is_jumping = 11;
|
|
55
|
+
bool is_jumping = 11; // deprecated
|
|
56
|
+
int32 jump_count = 24;
|
|
55
57
|
bool is_long_jump = 12;
|
|
56
58
|
bool is_long_fall = 13;
|
|
57
59
|
bool is_falling = 14;
|
|
58
60
|
bool is_stunned = 15;
|
|
61
|
+
GlideState glide_state = 23;
|
|
59
62
|
float rotation_y = 16;
|
|
60
63
|
// interpolation
|
|
61
64
|
bool is_instant = 17;
|
|
62
65
|
bool is_emoting = 18;
|
|
66
|
+
// head-sync (enabled flags + world-space yaw and pitch angles, in degrees)
|
|
67
|
+
bool head_ik_yaw_enabled = 19;
|
|
68
|
+
bool head_ik_pitch_enabled = 20;
|
|
69
|
+
float head_yaw = 21;
|
|
70
|
+
float head_pitch = 22;
|
|
71
|
+
enum GlideState {
|
|
72
|
+
PROP_CLOSED = 0;
|
|
73
|
+
OPENING_PROP = 1;
|
|
74
|
+
GLIDING = 2;
|
|
75
|
+
CLOSING_PROP = 3;
|
|
76
|
+
}
|
|
63
77
|
}
|
|
64
78
|
|
|
65
79
|
message MovementCompressed {
|
|
66
80
|
int32 temporal_data = 1; // bit-compressed: timestamp + animations
|
|
67
81
|
int64 movement_data = 2; // bit-compressed: position + velocity
|
|
82
|
+
int32 head_sync_data = 3; // bit-compressed: enabled flags + yaw + pitch
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
message PlayerEmote {
|
|
71
86
|
uint32 incremental_id = 1;
|
|
72
87
|
string urn = 2;
|
|
73
88
|
float timestamp = 3;
|
|
89
|
+
optional bool is_stopping = 4; // true means the emote has been stopped in the sender's client
|
|
90
|
+
optional bool is_repeating = 5; // true when it is not the first time the looping animation plays
|
|
91
|
+
optional int32 interaction_id = 6; // identifies an interaction univocaly, established when the start animation is triggered
|
|
92
|
+
optional int32 social_emote_outcome = 7; // -1 means it does not use an outcome animation
|
|
93
|
+
optional bool is_reacting = 8; // to a social emote started by other user
|
|
94
|
+
optional string social_emote_initiator = 9; // wallet address of the user that initiated social emote
|
|
95
|
+
optional string target_avatar = 10; // wallet address of the user whose avatar is the target of a directed emote
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Message sent to force an avatar to look at a position
|
|
99
|
+
message LookAtPosition
|
|
100
|
+
{
|
|
101
|
+
float timestamp = 1;
|
|
102
|
+
// world position
|
|
103
|
+
float position_x = 2;
|
|
104
|
+
float position_y = 3;
|
|
105
|
+
float position_z = 4;
|
|
106
|
+
string target_avatar_wallet_address = 5;
|
|
74
107
|
}
|
|
75
108
|
|
|
76
109
|
message SceneEmote {
|
|
@@ -103,6 +136,10 @@ message ProfileResponse {
|
|
|
103
136
|
message Chat {
|
|
104
137
|
string message = 1;
|
|
105
138
|
double timestamp = 2;
|
|
139
|
+
|
|
140
|
+
// Extension: optional forwarded_from to identify the original sender when
|
|
141
|
+
// messages are forwarded through an SFU
|
|
142
|
+
optional string forwarded_from = 3;
|
|
106
143
|
}
|
|
107
144
|
|
|
108
145
|
message Scene {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
5
|
+
option (common.ecs_component_id) = 1212;
|
|
6
|
+
|
|
7
|
+
enum PBAudioAnalysisMode {
|
|
8
|
+
MODE_RAW = 0;
|
|
9
|
+
MODE_LOGARITHMIC = 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message PBAudioAnalysis {
|
|
13
|
+
|
|
14
|
+
// Parameters section
|
|
15
|
+
PBAudioAnalysisMode mode = 1;
|
|
16
|
+
|
|
17
|
+
// Used only when mode == MODE_LOGARITHMIC
|
|
18
|
+
optional float amplitude_gain = 100;
|
|
19
|
+
optional float bands_gain = 101;
|
|
20
|
+
// End when mode == MODE_LOGARITHMIC
|
|
21
|
+
|
|
22
|
+
// End Parameters section
|
|
23
|
+
|
|
24
|
+
// Result section
|
|
25
|
+
float amplitude = 200;
|
|
26
|
+
|
|
27
|
+
// Protobuf doesn't support fixed arrays -> 8 band fields
|
|
28
|
+
float band_0 = 201;
|
|
29
|
+
float band_1 = 202;
|
|
30
|
+
float band_2 = 203;
|
|
31
|
+
float band_3 = 204;
|
|
32
|
+
float band_4 = 205;
|
|
33
|
+
float band_5 = 206;
|
|
34
|
+
float band_6 = 207;
|
|
35
|
+
float band_7 = 208;
|
|
36
|
+
|
|
37
|
+
// End Result section
|
|
38
|
+
|
|
39
|
+
// Future fields
|
|
40
|
+
// float spectral_centroid = 13;
|
|
41
|
+
// float spectral_flux = 14;
|
|
42
|
+
// bool onset = 15;
|
|
43
|
+
// float bpm = 16;
|
|
44
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
|
|
5
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
|
|
7
|
+
option (common.ecs_component_id) = 1211;
|
|
8
|
+
|
|
9
|
+
// The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
|
|
10
|
+
// as the avatar movement speed, jump height etc.
|
|
11
|
+
message PBAvatarLocomotionSettings {
|
|
12
|
+
optional float walk_speed = 1; // Maximum speed when walking (in meters per second)
|
|
13
|
+
optional float jog_speed = 2; // Maximum speed when jogging (in meters per second)
|
|
14
|
+
optional float run_speed = 3; // Maximum speed when running (in meters per second)
|
|
15
|
+
optional float jump_height = 4; // Height of a regular jump (in meters)
|
|
16
|
+
optional float run_jump_height = 5; // Height of a jump while running (in meters)
|
|
17
|
+
optional float hard_landing_cooldown = 6; // Cooldown time after a hard landing before the avatar can move again (in seconds)
|
|
18
|
+
optional float double_jump_height = 7; // Height of the double jump (in meters)
|
|
19
|
+
optional float gliding_speed = 8; // Maximum speed when gliding (in meters per second)
|
|
20
|
+
optional float gliding_falling_speed = 9; // Maximum falling speed when gliding (in meters per second)
|
|
21
|
+
}
|
|
@@ -17,6 +17,7 @@ enum InputAction {
|
|
|
17
17
|
IA_ACTION_4 = 11;
|
|
18
18
|
IA_ACTION_5 = 12;
|
|
19
19
|
IA_ACTION_6 = 13;
|
|
20
|
+
IA_MODIFIER = 14;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
// PointerEventType is a kind of interaction that can be detected.
|
|
@@ -25,4 +26,11 @@ enum PointerEventType {
|
|
|
25
26
|
PET_DOWN = 1;
|
|
26
27
|
PET_HOVER_ENTER = 2;
|
|
27
28
|
PET_HOVER_LEAVE = 3;
|
|
29
|
+
PET_PROXIMITY_ENTER = 4;
|
|
30
|
+
PET_PROXIMITY_LEAVE = 5;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
enum InteractionType {
|
|
34
|
+
CURSOR = 0;
|
|
35
|
+
PROXIMITY = 1;
|
|
28
36
|
}
|
|
@@ -25,4 +25,4 @@ message PBLightSource {
|
|
|
25
25
|
optional float inner_angle = 9; // default = 21.8. Inner angle can't be higher than outer angle, otherwise will default to same value. Min value is 0. Max value is 179.
|
|
26
26
|
optional float outer_angle = 10; // default = 30. Outer angle can't be lower than inner angle, otherwise will inner angle will be set to same value. Max value is 179.
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|
|
@@ -51,11 +51,13 @@ message PBPointerEvents {
|
|
|
51
51
|
optional bool show_feedback = 4; // enable or disable hover text and highlight (default true)
|
|
52
52
|
optional bool show_highlight = 5; // enable or disable hover highlight (default true)
|
|
53
53
|
optional float max_player_distance = 6; // range of interaction from the avatar's position (default 0)
|
|
54
|
+
optional uint32 priority = 7; // resolution order when multiple events overlap, higher wins (default 0)
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
message Entry {
|
|
57
58
|
common.PointerEventType event_type = 1; // the kind of interaction to detect
|
|
58
59
|
Info event_info = 2; // additional configuration for this detection
|
|
60
|
+
optional common.InteractionType interaction_type = 3; // the type of interaction source (default 0 == CURSOR)
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
repeated Entry pointer_events = 1; // the list of relevant events to detect
|