@dcl/protocol 1.0.0-21487639770.commit-ba66987 → 1.0.0-21519717333.commit-3b5ca01
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 +46 -0
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +315 -12
- 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 +1 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +6 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +375 -3
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +6 -0
- package/package.json +3 -3
- package/proto/decentraland/kernel/comms/rfc4/comms.proto +29 -0
- package/proto/decentraland/sdk/components/asset_load.proto +10 -0
- package/proto/decentraland/sdk/components/asset_load_loading_state.proto +16 -0
- package/proto/decentraland/sdk/components/audio_analysis.proto +44 -0
- package/proto/decentraland/sdk/components/avatar_locomotion_settings.proto +18 -0
- package/proto/decentraland/sdk/components/common/input_action.proto +1 -0
- package/proto/decentraland/sdk/components/light_source.proto +1 -1
- package/proto/decentraland/sdk/components/virtual_camera.proto +2 -0
|
@@ -17,6 +17,7 @@ export interface Packet {
|
|
|
17
17
|
| { $case: "playerEmote"; playerEmote: PlayerEmote }
|
|
18
18
|
| { $case: "sceneEmote"; sceneEmote: SceneEmote }
|
|
19
19
|
| { $case: "movementCompressed"; movementCompressed: MovementCompressed }
|
|
20
|
+
| { $case: "lookAtPosition"; lookAtPosition: LookAtPosition }
|
|
20
21
|
| undefined;
|
|
21
22
|
protocolVersion: number;
|
|
22
23
|
}
|
|
@@ -59,6 +60,11 @@ export interface Movement {
|
|
|
59
60
|
/** interpolation */
|
|
60
61
|
isInstant: boolean;
|
|
61
62
|
isEmoting: boolean;
|
|
63
|
+
/** head-sync (enabled flags + world-space yaw and pitch angles, in degrees) */
|
|
64
|
+
headIkYawEnabled: boolean;
|
|
65
|
+
headIkPitchEnabled: boolean;
|
|
66
|
+
headYaw: number;
|
|
67
|
+
headPitch: number;
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
export interface MovementCompressed {
|
|
@@ -66,12 +72,50 @@ export interface MovementCompressed {
|
|
|
66
72
|
temporalData: number;
|
|
67
73
|
/** bit-compressed: position + velocity */
|
|
68
74
|
movementData: number;
|
|
75
|
+
/** bit-compressed: enabled flags + yaw + pitch */
|
|
76
|
+
headSyncData: number;
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
export interface PlayerEmote {
|
|
72
80
|
incrementalId: number;
|
|
73
81
|
urn: string;
|
|
74
82
|
timestamp: number;
|
|
83
|
+
/** true means the emote has been stopped in the sender's client */
|
|
84
|
+
isStopping?:
|
|
85
|
+
| boolean
|
|
86
|
+
| undefined;
|
|
87
|
+
/** true when it is not the first time the looping animation plays */
|
|
88
|
+
isRepeating?:
|
|
89
|
+
| boolean
|
|
90
|
+
| undefined;
|
|
91
|
+
/** identifies an interaction univocaly, established when the start animation is triggered */
|
|
92
|
+
interactionId?:
|
|
93
|
+
| number
|
|
94
|
+
| undefined;
|
|
95
|
+
/** -1 means it does not use an outcome animation */
|
|
96
|
+
socialEmoteOutcome?:
|
|
97
|
+
| number
|
|
98
|
+
| undefined;
|
|
99
|
+
/** to a social emote started by other user */
|
|
100
|
+
isReacting?:
|
|
101
|
+
| boolean
|
|
102
|
+
| undefined;
|
|
103
|
+
/** wallet address of the user that initiated social emote */
|
|
104
|
+
socialEmoteInitiator?:
|
|
105
|
+
| string
|
|
106
|
+
| undefined;
|
|
107
|
+
/** wallet address of the user whose avatar is the target of a directed emote */
|
|
108
|
+
targetAvatar?: string | undefined;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Message sent to force an avatar to look at a position */
|
|
112
|
+
export interface LookAtPosition {
|
|
113
|
+
timestamp: number;
|
|
114
|
+
/** world position */
|
|
115
|
+
positionX: number;
|
|
116
|
+
positionY: number;
|
|
117
|
+
positionZ: number;
|
|
118
|
+
targetAvatarWalletAddress: string;
|
|
75
119
|
}
|
|
76
120
|
|
|
77
121
|
export interface SceneEmote {
|
|
@@ -96,6 +140,11 @@ export interface ProfileResponse {
|
|
|
96
140
|
export interface Chat {
|
|
97
141
|
message: string;
|
|
98
142
|
timestamp: number;
|
|
143
|
+
/**
|
|
144
|
+
* Extension: optional forwarded_from to identify the original sender when
|
|
145
|
+
* messages are forwarded through an SFU
|
|
146
|
+
*/
|
|
147
|
+
forwardedFrom?: string | undefined;
|
|
99
148
|
}
|
|
100
149
|
|
|
101
150
|
export interface Scene {
|
|
@@ -176,6 +225,9 @@ export namespace Packet {
|
|
|
176
225
|
case "movementCompressed":
|
|
177
226
|
MovementCompressed.encode(message.message.movementCompressed, writer.uint32(98).fork()).ldelim();
|
|
178
227
|
break;
|
|
228
|
+
case "lookAtPosition":
|
|
229
|
+
LookAtPosition.encode(message.message.lookAtPosition, writer.uint32(106).fork()).ldelim();
|
|
230
|
+
break;
|
|
179
231
|
}
|
|
180
232
|
if (message.protocolVersion !== 0) {
|
|
181
233
|
writer.uint32(88).uint32(message.protocolVersion);
|
|
@@ -276,6 +328,13 @@ export namespace Packet {
|
|
|
276
328
|
movementCompressed: MovementCompressed.decode(reader, reader.uint32()),
|
|
277
329
|
};
|
|
278
330
|
continue;
|
|
331
|
+
case 13:
|
|
332
|
+
if (tag !== 106) {
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
message.message = { $case: "lookAtPosition", lookAtPosition: LookAtPosition.decode(reader, reader.uint32()) };
|
|
337
|
+
continue;
|
|
279
338
|
case 11:
|
|
280
339
|
if (tag !== 88) {
|
|
281
340
|
break;
|
|
@@ -316,6 +375,8 @@ export namespace Packet {
|
|
|
316
375
|
? { $case: "sceneEmote", sceneEmote: SceneEmote.fromJSON(object.sceneEmote) }
|
|
317
376
|
: isSet(object.movementCompressed)
|
|
318
377
|
? { $case: "movementCompressed", movementCompressed: MovementCompressed.fromJSON(object.movementCompressed) }
|
|
378
|
+
: isSet(object.lookAtPosition)
|
|
379
|
+
? { $case: "lookAtPosition", lookAtPosition: LookAtPosition.fromJSON(object.lookAtPosition) }
|
|
319
380
|
: undefined,
|
|
320
381
|
protocolVersion: isSet(object.protocolVersion) ? Number(object.protocolVersion) : 0,
|
|
321
382
|
};
|
|
@@ -353,6 +414,10 @@ export namespace Packet {
|
|
|
353
414
|
(obj.movementCompressed = message.message?.movementCompressed
|
|
354
415
|
? MovementCompressed.toJSON(message.message?.movementCompressed)
|
|
355
416
|
: undefined);
|
|
417
|
+
message.message?.$case === "lookAtPosition" &&
|
|
418
|
+
(obj.lookAtPosition = message.message?.lookAtPosition
|
|
419
|
+
? LookAtPosition.toJSON(message.message?.lookAtPosition)
|
|
420
|
+
: undefined);
|
|
356
421
|
message.protocolVersion !== undefined && (obj.protocolVersion = Math.round(message.protocolVersion));
|
|
357
422
|
return obj;
|
|
358
423
|
}
|
|
@@ -440,6 +505,16 @@ export namespace Packet {
|
|
|
440
505
|
movementCompressed: MovementCompressed.fromPartial(object.message.movementCompressed),
|
|
441
506
|
};
|
|
442
507
|
}
|
|
508
|
+
if (
|
|
509
|
+
object.message?.$case === "lookAtPosition" &&
|
|
510
|
+
object.message?.lookAtPosition !== undefined &&
|
|
511
|
+
object.message?.lookAtPosition !== null
|
|
512
|
+
) {
|
|
513
|
+
message.message = {
|
|
514
|
+
$case: "lookAtPosition",
|
|
515
|
+
lookAtPosition: LookAtPosition.fromPartial(object.message.lookAtPosition),
|
|
516
|
+
};
|
|
517
|
+
}
|
|
443
518
|
message.protocolVersion = object.protocolVersion ?? 0;
|
|
444
519
|
return message;
|
|
445
520
|
}
|
|
@@ -614,6 +689,10 @@ function createBaseMovement(): Movement {
|
|
|
614
689
|
rotationY: 0,
|
|
615
690
|
isInstant: false,
|
|
616
691
|
isEmoting: false,
|
|
692
|
+
headIkYawEnabled: false,
|
|
693
|
+
headIkPitchEnabled: false,
|
|
694
|
+
headYaw: 0,
|
|
695
|
+
headPitch: 0,
|
|
617
696
|
};
|
|
618
697
|
}
|
|
619
698
|
|
|
@@ -673,6 +752,18 @@ export namespace Movement {
|
|
|
673
752
|
if (message.isEmoting === true) {
|
|
674
753
|
writer.uint32(144).bool(message.isEmoting);
|
|
675
754
|
}
|
|
755
|
+
if (message.headIkYawEnabled === true) {
|
|
756
|
+
writer.uint32(152).bool(message.headIkYawEnabled);
|
|
757
|
+
}
|
|
758
|
+
if (message.headIkPitchEnabled === true) {
|
|
759
|
+
writer.uint32(160).bool(message.headIkPitchEnabled);
|
|
760
|
+
}
|
|
761
|
+
if (message.headYaw !== 0) {
|
|
762
|
+
writer.uint32(173).float(message.headYaw);
|
|
763
|
+
}
|
|
764
|
+
if (message.headPitch !== 0) {
|
|
765
|
+
writer.uint32(181).float(message.headPitch);
|
|
766
|
+
}
|
|
676
767
|
return writer;
|
|
677
768
|
}
|
|
678
769
|
|
|
@@ -809,6 +900,34 @@ export namespace Movement {
|
|
|
809
900
|
|
|
810
901
|
message.isEmoting = reader.bool();
|
|
811
902
|
continue;
|
|
903
|
+
case 19:
|
|
904
|
+
if (tag !== 152) {
|
|
905
|
+
break;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
message.headIkYawEnabled = reader.bool();
|
|
909
|
+
continue;
|
|
910
|
+
case 20:
|
|
911
|
+
if (tag !== 160) {
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
message.headIkPitchEnabled = reader.bool();
|
|
916
|
+
continue;
|
|
917
|
+
case 21:
|
|
918
|
+
if (tag !== 173) {
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
message.headYaw = reader.float();
|
|
923
|
+
continue;
|
|
924
|
+
case 22:
|
|
925
|
+
if (tag !== 181) {
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
message.headPitch = reader.float();
|
|
930
|
+
continue;
|
|
812
931
|
}
|
|
813
932
|
if ((tag & 7) === 4 || tag === 0) {
|
|
814
933
|
break;
|
|
@@ -838,6 +957,10 @@ export namespace Movement {
|
|
|
838
957
|
rotationY: isSet(object.rotationY) ? Number(object.rotationY) : 0,
|
|
839
958
|
isInstant: isSet(object.isInstant) ? Boolean(object.isInstant) : false,
|
|
840
959
|
isEmoting: isSet(object.isEmoting) ? Boolean(object.isEmoting) : false,
|
|
960
|
+
headIkYawEnabled: isSet(object.headIkYawEnabled) ? Boolean(object.headIkYawEnabled) : false,
|
|
961
|
+
headIkPitchEnabled: isSet(object.headIkPitchEnabled) ? Boolean(object.headIkPitchEnabled) : false,
|
|
962
|
+
headYaw: isSet(object.headYaw) ? Number(object.headYaw) : 0,
|
|
963
|
+
headPitch: isSet(object.headPitch) ? Number(object.headPitch) : 0,
|
|
841
964
|
};
|
|
842
965
|
}
|
|
843
966
|
|
|
@@ -861,6 +984,10 @@ export namespace Movement {
|
|
|
861
984
|
message.rotationY !== undefined && (obj.rotationY = message.rotationY);
|
|
862
985
|
message.isInstant !== undefined && (obj.isInstant = message.isInstant);
|
|
863
986
|
message.isEmoting !== undefined && (obj.isEmoting = message.isEmoting);
|
|
987
|
+
message.headIkYawEnabled !== undefined && (obj.headIkYawEnabled = message.headIkYawEnabled);
|
|
988
|
+
message.headIkPitchEnabled !== undefined && (obj.headIkPitchEnabled = message.headIkPitchEnabled);
|
|
989
|
+
message.headYaw !== undefined && (obj.headYaw = message.headYaw);
|
|
990
|
+
message.headPitch !== undefined && (obj.headPitch = message.headPitch);
|
|
864
991
|
return obj;
|
|
865
992
|
}
|
|
866
993
|
|
|
@@ -888,12 +1015,16 @@ export namespace Movement {
|
|
|
888
1015
|
message.rotationY = object.rotationY ?? 0;
|
|
889
1016
|
message.isInstant = object.isInstant ?? false;
|
|
890
1017
|
message.isEmoting = object.isEmoting ?? false;
|
|
1018
|
+
message.headIkYawEnabled = object.headIkYawEnabled ?? false;
|
|
1019
|
+
message.headIkPitchEnabled = object.headIkPitchEnabled ?? false;
|
|
1020
|
+
message.headYaw = object.headYaw ?? 0;
|
|
1021
|
+
message.headPitch = object.headPitch ?? 0;
|
|
891
1022
|
return message;
|
|
892
1023
|
}
|
|
893
1024
|
}
|
|
894
1025
|
|
|
895
1026
|
function createBaseMovementCompressed(): MovementCompressed {
|
|
896
|
-
return { temporalData: 0, movementData: 0 };
|
|
1027
|
+
return { temporalData: 0, movementData: 0, headSyncData: 0 };
|
|
897
1028
|
}
|
|
898
1029
|
|
|
899
1030
|
export namespace MovementCompressed {
|
|
@@ -904,6 +1035,9 @@ export namespace MovementCompressed {
|
|
|
904
1035
|
if (message.movementData !== 0) {
|
|
905
1036
|
writer.uint32(16).int64(message.movementData);
|
|
906
1037
|
}
|
|
1038
|
+
if (message.headSyncData !== 0) {
|
|
1039
|
+
writer.uint32(24).int32(message.headSyncData);
|
|
1040
|
+
}
|
|
907
1041
|
return writer;
|
|
908
1042
|
}
|
|
909
1043
|
|
|
@@ -928,6 +1062,13 @@ export namespace MovementCompressed {
|
|
|
928
1062
|
|
|
929
1063
|
message.movementData = longToNumber(reader.int64() as Long);
|
|
930
1064
|
continue;
|
|
1065
|
+
case 3:
|
|
1066
|
+
if (tag !== 24) {
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
message.headSyncData = reader.int32();
|
|
1071
|
+
continue;
|
|
931
1072
|
}
|
|
932
1073
|
if ((tag & 7) === 4 || tag === 0) {
|
|
933
1074
|
break;
|
|
@@ -941,6 +1082,7 @@ export namespace MovementCompressed {
|
|
|
941
1082
|
return {
|
|
942
1083
|
temporalData: isSet(object.temporalData) ? Number(object.temporalData) : 0,
|
|
943
1084
|
movementData: isSet(object.movementData) ? Number(object.movementData) : 0,
|
|
1085
|
+
headSyncData: isSet(object.headSyncData) ? Number(object.headSyncData) : 0,
|
|
944
1086
|
};
|
|
945
1087
|
}
|
|
946
1088
|
|
|
@@ -948,6 +1090,7 @@ export namespace MovementCompressed {
|
|
|
948
1090
|
const obj: any = {};
|
|
949
1091
|
message.temporalData !== undefined && (obj.temporalData = Math.round(message.temporalData));
|
|
950
1092
|
message.movementData !== undefined && (obj.movementData = Math.round(message.movementData));
|
|
1093
|
+
message.headSyncData !== undefined && (obj.headSyncData = Math.round(message.headSyncData));
|
|
951
1094
|
return obj;
|
|
952
1095
|
}
|
|
953
1096
|
|
|
@@ -959,12 +1102,24 @@ export namespace MovementCompressed {
|
|
|
959
1102
|
const message = createBaseMovementCompressed();
|
|
960
1103
|
message.temporalData = object.temporalData ?? 0;
|
|
961
1104
|
message.movementData = object.movementData ?? 0;
|
|
1105
|
+
message.headSyncData = object.headSyncData ?? 0;
|
|
962
1106
|
return message;
|
|
963
1107
|
}
|
|
964
1108
|
}
|
|
965
1109
|
|
|
966
1110
|
function createBasePlayerEmote(): PlayerEmote {
|
|
967
|
-
return {
|
|
1111
|
+
return {
|
|
1112
|
+
incrementalId: 0,
|
|
1113
|
+
urn: "",
|
|
1114
|
+
timestamp: 0,
|
|
1115
|
+
isStopping: undefined,
|
|
1116
|
+
isRepeating: undefined,
|
|
1117
|
+
interactionId: undefined,
|
|
1118
|
+
socialEmoteOutcome: undefined,
|
|
1119
|
+
isReacting: undefined,
|
|
1120
|
+
socialEmoteInitiator: undefined,
|
|
1121
|
+
targetAvatar: undefined,
|
|
1122
|
+
};
|
|
968
1123
|
}
|
|
969
1124
|
|
|
970
1125
|
export namespace PlayerEmote {
|
|
@@ -978,6 +1133,27 @@ export namespace PlayerEmote {
|
|
|
978
1133
|
if (message.timestamp !== 0) {
|
|
979
1134
|
writer.uint32(29).float(message.timestamp);
|
|
980
1135
|
}
|
|
1136
|
+
if (message.isStopping !== undefined) {
|
|
1137
|
+
writer.uint32(32).bool(message.isStopping);
|
|
1138
|
+
}
|
|
1139
|
+
if (message.isRepeating !== undefined) {
|
|
1140
|
+
writer.uint32(40).bool(message.isRepeating);
|
|
1141
|
+
}
|
|
1142
|
+
if (message.interactionId !== undefined) {
|
|
1143
|
+
writer.uint32(48).int32(message.interactionId);
|
|
1144
|
+
}
|
|
1145
|
+
if (message.socialEmoteOutcome !== undefined) {
|
|
1146
|
+
writer.uint32(56).int32(message.socialEmoteOutcome);
|
|
1147
|
+
}
|
|
1148
|
+
if (message.isReacting !== undefined) {
|
|
1149
|
+
writer.uint32(64).bool(message.isReacting);
|
|
1150
|
+
}
|
|
1151
|
+
if (message.socialEmoteInitiator !== undefined) {
|
|
1152
|
+
writer.uint32(74).string(message.socialEmoteInitiator);
|
|
1153
|
+
}
|
|
1154
|
+
if (message.targetAvatar !== undefined) {
|
|
1155
|
+
writer.uint32(82).string(message.targetAvatar);
|
|
1156
|
+
}
|
|
981
1157
|
return writer;
|
|
982
1158
|
}
|
|
983
1159
|
|
|
@@ -1009,6 +1185,55 @@ export namespace PlayerEmote {
|
|
|
1009
1185
|
|
|
1010
1186
|
message.timestamp = reader.float();
|
|
1011
1187
|
continue;
|
|
1188
|
+
case 4:
|
|
1189
|
+
if (tag !== 32) {
|
|
1190
|
+
break;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
message.isStopping = reader.bool();
|
|
1194
|
+
continue;
|
|
1195
|
+
case 5:
|
|
1196
|
+
if (tag !== 40) {
|
|
1197
|
+
break;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
message.isRepeating = reader.bool();
|
|
1201
|
+
continue;
|
|
1202
|
+
case 6:
|
|
1203
|
+
if (tag !== 48) {
|
|
1204
|
+
break;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
message.interactionId = reader.int32();
|
|
1208
|
+
continue;
|
|
1209
|
+
case 7:
|
|
1210
|
+
if (tag !== 56) {
|
|
1211
|
+
break;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
message.socialEmoteOutcome = reader.int32();
|
|
1215
|
+
continue;
|
|
1216
|
+
case 8:
|
|
1217
|
+
if (tag !== 64) {
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
message.isReacting = reader.bool();
|
|
1222
|
+
continue;
|
|
1223
|
+
case 9:
|
|
1224
|
+
if (tag !== 74) {
|
|
1225
|
+
break;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
message.socialEmoteInitiator = reader.string();
|
|
1229
|
+
continue;
|
|
1230
|
+
case 10:
|
|
1231
|
+
if (tag !== 82) {
|
|
1232
|
+
break;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
message.targetAvatar = reader.string();
|
|
1236
|
+
continue;
|
|
1012
1237
|
}
|
|
1013
1238
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1014
1239
|
break;
|
|
@@ -1023,6 +1248,13 @@ export namespace PlayerEmote {
|
|
|
1023
1248
|
incrementalId: isSet(object.incrementalId) ? Number(object.incrementalId) : 0,
|
|
1024
1249
|
urn: isSet(object.urn) ? String(object.urn) : "",
|
|
1025
1250
|
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
1251
|
+
isStopping: isSet(object.isStopping) ? Boolean(object.isStopping) : undefined,
|
|
1252
|
+
isRepeating: isSet(object.isRepeating) ? Boolean(object.isRepeating) : undefined,
|
|
1253
|
+
interactionId: isSet(object.interactionId) ? Number(object.interactionId) : undefined,
|
|
1254
|
+
socialEmoteOutcome: isSet(object.socialEmoteOutcome) ? Number(object.socialEmoteOutcome) : undefined,
|
|
1255
|
+
isReacting: isSet(object.isReacting) ? Boolean(object.isReacting) : undefined,
|
|
1256
|
+
socialEmoteInitiator: isSet(object.socialEmoteInitiator) ? String(object.socialEmoteInitiator) : undefined,
|
|
1257
|
+
targetAvatar: isSet(object.targetAvatar) ? String(object.targetAvatar) : undefined,
|
|
1026
1258
|
};
|
|
1027
1259
|
}
|
|
1028
1260
|
|
|
@@ -1031,6 +1263,13 @@ export namespace PlayerEmote {
|
|
|
1031
1263
|
message.incrementalId !== undefined && (obj.incrementalId = Math.round(message.incrementalId));
|
|
1032
1264
|
message.urn !== undefined && (obj.urn = message.urn);
|
|
1033
1265
|
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
1266
|
+
message.isStopping !== undefined && (obj.isStopping = message.isStopping);
|
|
1267
|
+
message.isRepeating !== undefined && (obj.isRepeating = message.isRepeating);
|
|
1268
|
+
message.interactionId !== undefined && (obj.interactionId = Math.round(message.interactionId));
|
|
1269
|
+
message.socialEmoteOutcome !== undefined && (obj.socialEmoteOutcome = Math.round(message.socialEmoteOutcome));
|
|
1270
|
+
message.isReacting !== undefined && (obj.isReacting = message.isReacting);
|
|
1271
|
+
message.socialEmoteInitiator !== undefined && (obj.socialEmoteInitiator = message.socialEmoteInitiator);
|
|
1272
|
+
message.targetAvatar !== undefined && (obj.targetAvatar = message.targetAvatar);
|
|
1034
1273
|
return obj;
|
|
1035
1274
|
}
|
|
1036
1275
|
|
|
@@ -1043,6 +1282,126 @@ export namespace PlayerEmote {
|
|
|
1043
1282
|
message.incrementalId = object.incrementalId ?? 0;
|
|
1044
1283
|
message.urn = object.urn ?? "";
|
|
1045
1284
|
message.timestamp = object.timestamp ?? 0;
|
|
1285
|
+
message.isStopping = object.isStopping ?? undefined;
|
|
1286
|
+
message.isRepeating = object.isRepeating ?? undefined;
|
|
1287
|
+
message.interactionId = object.interactionId ?? undefined;
|
|
1288
|
+
message.socialEmoteOutcome = object.socialEmoteOutcome ?? undefined;
|
|
1289
|
+
message.isReacting = object.isReacting ?? undefined;
|
|
1290
|
+
message.socialEmoteInitiator = object.socialEmoteInitiator ?? undefined;
|
|
1291
|
+
message.targetAvatar = object.targetAvatar ?? undefined;
|
|
1292
|
+
return message;
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
function createBaseLookAtPosition(): LookAtPosition {
|
|
1297
|
+
return { timestamp: 0, positionX: 0, positionY: 0, positionZ: 0, targetAvatarWalletAddress: "" };
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
export namespace LookAtPosition {
|
|
1301
|
+
export function encode(message: LookAtPosition, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1302
|
+
if (message.timestamp !== 0) {
|
|
1303
|
+
writer.uint32(13).float(message.timestamp);
|
|
1304
|
+
}
|
|
1305
|
+
if (message.positionX !== 0) {
|
|
1306
|
+
writer.uint32(21).float(message.positionX);
|
|
1307
|
+
}
|
|
1308
|
+
if (message.positionY !== 0) {
|
|
1309
|
+
writer.uint32(29).float(message.positionY);
|
|
1310
|
+
}
|
|
1311
|
+
if (message.positionZ !== 0) {
|
|
1312
|
+
writer.uint32(37).float(message.positionZ);
|
|
1313
|
+
}
|
|
1314
|
+
if (message.targetAvatarWalletAddress !== "") {
|
|
1315
|
+
writer.uint32(42).string(message.targetAvatarWalletAddress);
|
|
1316
|
+
}
|
|
1317
|
+
return writer;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): LookAtPosition {
|
|
1321
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1322
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1323
|
+
const message = createBaseLookAtPosition();
|
|
1324
|
+
while (reader.pos < end) {
|
|
1325
|
+
const tag = reader.uint32();
|
|
1326
|
+
switch (tag >>> 3) {
|
|
1327
|
+
case 1:
|
|
1328
|
+
if (tag !== 13) {
|
|
1329
|
+
break;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
message.timestamp = reader.float();
|
|
1333
|
+
continue;
|
|
1334
|
+
case 2:
|
|
1335
|
+
if (tag !== 21) {
|
|
1336
|
+
break;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
message.positionX = reader.float();
|
|
1340
|
+
continue;
|
|
1341
|
+
case 3:
|
|
1342
|
+
if (tag !== 29) {
|
|
1343
|
+
break;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
message.positionY = reader.float();
|
|
1347
|
+
continue;
|
|
1348
|
+
case 4:
|
|
1349
|
+
if (tag !== 37) {
|
|
1350
|
+
break;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
message.positionZ = reader.float();
|
|
1354
|
+
continue;
|
|
1355
|
+
case 5:
|
|
1356
|
+
if (tag !== 42) {
|
|
1357
|
+
break;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
message.targetAvatarWalletAddress = reader.string();
|
|
1361
|
+
continue;
|
|
1362
|
+
}
|
|
1363
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1364
|
+
break;
|
|
1365
|
+
}
|
|
1366
|
+
reader.skipType(tag & 7);
|
|
1367
|
+
}
|
|
1368
|
+
return message;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
export function fromJSON(object: any): LookAtPosition {
|
|
1372
|
+
return {
|
|
1373
|
+
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
1374
|
+
positionX: isSet(object.positionX) ? Number(object.positionX) : 0,
|
|
1375
|
+
positionY: isSet(object.positionY) ? Number(object.positionY) : 0,
|
|
1376
|
+
positionZ: isSet(object.positionZ) ? Number(object.positionZ) : 0,
|
|
1377
|
+
targetAvatarWalletAddress: isSet(object.targetAvatarWalletAddress)
|
|
1378
|
+
? String(object.targetAvatarWalletAddress)
|
|
1379
|
+
: "",
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
export function toJSON(message: LookAtPosition): unknown {
|
|
1384
|
+
const obj: any = {};
|
|
1385
|
+
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
1386
|
+
message.positionX !== undefined && (obj.positionX = message.positionX);
|
|
1387
|
+
message.positionY !== undefined && (obj.positionY = message.positionY);
|
|
1388
|
+
message.positionZ !== undefined && (obj.positionZ = message.positionZ);
|
|
1389
|
+
message.targetAvatarWalletAddress !== undefined &&
|
|
1390
|
+
(obj.targetAvatarWalletAddress = message.targetAvatarWalletAddress);
|
|
1391
|
+
return obj;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
export function create<I extends Exact<DeepPartial<LookAtPosition>, I>>(base?: I): LookAtPosition {
|
|
1395
|
+
return LookAtPosition.fromPartial(base ?? {});
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
export function fromPartial<I extends Exact<DeepPartial<LookAtPosition>, I>>(object: I): LookAtPosition {
|
|
1399
|
+
const message = createBaseLookAtPosition();
|
|
1400
|
+
message.timestamp = object.timestamp ?? 0;
|
|
1401
|
+
message.positionX = object.positionX ?? 0;
|
|
1402
|
+
message.positionY = object.positionY ?? 0;
|
|
1403
|
+
message.positionZ = object.positionZ ?? 0;
|
|
1404
|
+
message.targetAvatarWalletAddress = object.targetAvatarWalletAddress ?? "";
|
|
1046
1405
|
return message;
|
|
1047
1406
|
}
|
|
1048
1407
|
}
|
|
@@ -1319,7 +1678,7 @@ export namespace ProfileResponse {
|
|
|
1319
1678
|
}
|
|
1320
1679
|
|
|
1321
1680
|
function createBaseChat(): Chat {
|
|
1322
|
-
return { message: "", timestamp: 0 };
|
|
1681
|
+
return { message: "", timestamp: 0, forwardedFrom: undefined };
|
|
1323
1682
|
}
|
|
1324
1683
|
|
|
1325
1684
|
export namespace Chat {
|
|
@@ -1330,6 +1689,9 @@ export namespace Chat {
|
|
|
1330
1689
|
if (message.timestamp !== 0) {
|
|
1331
1690
|
writer.uint32(17).double(message.timestamp);
|
|
1332
1691
|
}
|
|
1692
|
+
if (message.forwardedFrom !== undefined) {
|
|
1693
|
+
writer.uint32(26).string(message.forwardedFrom);
|
|
1694
|
+
}
|
|
1333
1695
|
return writer;
|
|
1334
1696
|
}
|
|
1335
1697
|
|
|
@@ -1354,6 +1716,13 @@ export namespace Chat {
|
|
|
1354
1716
|
|
|
1355
1717
|
message.timestamp = reader.double();
|
|
1356
1718
|
continue;
|
|
1719
|
+
case 3:
|
|
1720
|
+
if (tag !== 26) {
|
|
1721
|
+
break;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
message.forwardedFrom = reader.string();
|
|
1725
|
+
continue;
|
|
1357
1726
|
}
|
|
1358
1727
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1359
1728
|
break;
|
|
@@ -1367,6 +1736,7 @@ export namespace Chat {
|
|
|
1367
1736
|
return {
|
|
1368
1737
|
message: isSet(object.message) ? String(object.message) : "",
|
|
1369
1738
|
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
1739
|
+
forwardedFrom: isSet(object.forwardedFrom) ? String(object.forwardedFrom) : undefined,
|
|
1370
1740
|
};
|
|
1371
1741
|
}
|
|
1372
1742
|
|
|
@@ -1374,6 +1744,7 @@ export namespace Chat {
|
|
|
1374
1744
|
const obj: any = {};
|
|
1375
1745
|
message.message !== undefined && (obj.message = message.message);
|
|
1376
1746
|
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
1747
|
+
message.forwardedFrom !== undefined && (obj.forwardedFrom = message.forwardedFrom);
|
|
1377
1748
|
return obj;
|
|
1378
1749
|
}
|
|
1379
1750
|
|
|
@@ -1385,6 +1756,7 @@ export namespace Chat {
|
|
|
1385
1756
|
const message = createBaseChat();
|
|
1386
1757
|
message.message = object.message ?? "";
|
|
1387
1758
|
message.timestamp = object.timestamp ?? 0;
|
|
1759
|
+
message.forwardedFrom = object.forwardedFrom ?? undefined;
|
|
1388
1760
|
return message;
|
|
1389
1761
|
}
|
|
1390
1762
|
}
|
|
@@ -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";
|
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-21519717333.commit-3b5ca01",
|
|
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": "3b5ca015e5cf4b301faac5f81bd9bbaaf7acd57a"
|
|
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
|
}
|
|
@@ -60,17 +61,41 @@ message Movement {
|
|
|
60
61
|
// interpolation
|
|
61
62
|
bool is_instant = 17;
|
|
62
63
|
bool is_emoting = 18;
|
|
64
|
+
// head-sync (enabled flags + world-space yaw and pitch angles, in degrees)
|
|
65
|
+
bool head_ik_yaw_enabled = 19;
|
|
66
|
+
bool head_ik_pitch_enabled = 20;
|
|
67
|
+
float head_yaw = 21;
|
|
68
|
+
float head_pitch = 22;
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
message MovementCompressed {
|
|
66
72
|
int32 temporal_data = 1; // bit-compressed: timestamp + animations
|
|
67
73
|
int64 movement_data = 2; // bit-compressed: position + velocity
|
|
74
|
+
int32 head_sync_data = 3; // bit-compressed: enabled flags + yaw + pitch
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
message PlayerEmote {
|
|
71
78
|
uint32 incremental_id = 1;
|
|
72
79
|
string urn = 2;
|
|
73
80
|
float timestamp = 3;
|
|
81
|
+
optional bool is_stopping = 4; // true means the emote has been stopped in the sender's client
|
|
82
|
+
optional bool is_repeating = 5; // true when it is not the first time the looping animation plays
|
|
83
|
+
optional int32 interaction_id = 6; // identifies an interaction univocaly, established when the start animation is triggered
|
|
84
|
+
optional int32 social_emote_outcome = 7; // -1 means it does not use an outcome animation
|
|
85
|
+
optional bool is_reacting = 8; // to a social emote started by other user
|
|
86
|
+
optional string social_emote_initiator = 9; // wallet address of the user that initiated social emote
|
|
87
|
+
optional string target_avatar = 10; // wallet address of the user whose avatar is the target of a directed emote
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Message sent to force an avatar to look at a position
|
|
91
|
+
message LookAtPosition
|
|
92
|
+
{
|
|
93
|
+
float timestamp = 1;
|
|
94
|
+
// world position
|
|
95
|
+
float position_x = 2;
|
|
96
|
+
float position_y = 3;
|
|
97
|
+
float position_z = 4;
|
|
98
|
+
string target_avatar_wallet_address = 5;
|
|
74
99
|
}
|
|
75
100
|
|
|
76
101
|
message SceneEmote {
|
|
@@ -103,6 +128,10 @@ message ProfileResponse {
|
|
|
103
128
|
message Chat {
|
|
104
129
|
string message = 1;
|
|
105
130
|
double timestamp = 2;
|
|
131
|
+
|
|
132
|
+
// Extension: optional forwarded_from to identify the original sender when
|
|
133
|
+
// messages are forwarded through an SFU
|
|
134
|
+
optional string forwarded_from = 3;
|
|
106
135
|
}
|
|
107
136
|
|
|
108
137
|
message Scene {
|