@dcl/protocol 1.0.0-19966879226.commit-64a5330 → 1.0.0-20302100396.commit-b2ab885
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 +41 -0
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +301 -10
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +356 -2
- package/package.json +2 -2
- package/proto/decentraland/kernel/comms/rfc4/comms.proto +25 -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 {
|
|
@@ -181,6 +225,9 @@ export namespace Packet {
|
|
|
181
225
|
case "movementCompressed":
|
|
182
226
|
MovementCompressed.encode(message.message.movementCompressed, writer.uint32(98).fork()).ldelim();
|
|
183
227
|
break;
|
|
228
|
+
case "lookAtPosition":
|
|
229
|
+
LookAtPosition.encode(message.message.lookAtPosition, writer.uint32(106).fork()).ldelim();
|
|
230
|
+
break;
|
|
184
231
|
}
|
|
185
232
|
if (message.protocolVersion !== 0) {
|
|
186
233
|
writer.uint32(88).uint32(message.protocolVersion);
|
|
@@ -281,6 +328,13 @@ export namespace Packet {
|
|
|
281
328
|
movementCompressed: MovementCompressed.decode(reader, reader.uint32()),
|
|
282
329
|
};
|
|
283
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;
|
|
284
338
|
case 11:
|
|
285
339
|
if (tag !== 88) {
|
|
286
340
|
break;
|
|
@@ -321,6 +375,8 @@ export namespace Packet {
|
|
|
321
375
|
? { $case: "sceneEmote", sceneEmote: SceneEmote.fromJSON(object.sceneEmote) }
|
|
322
376
|
: isSet(object.movementCompressed)
|
|
323
377
|
? { $case: "movementCompressed", movementCompressed: MovementCompressed.fromJSON(object.movementCompressed) }
|
|
378
|
+
: isSet(object.lookAtPosition)
|
|
379
|
+
? { $case: "lookAtPosition", lookAtPosition: LookAtPosition.fromJSON(object.lookAtPosition) }
|
|
324
380
|
: undefined,
|
|
325
381
|
protocolVersion: isSet(object.protocolVersion) ? Number(object.protocolVersion) : 0,
|
|
326
382
|
};
|
|
@@ -358,6 +414,10 @@ export namespace Packet {
|
|
|
358
414
|
(obj.movementCompressed = message.message?.movementCompressed
|
|
359
415
|
? MovementCompressed.toJSON(message.message?.movementCompressed)
|
|
360
416
|
: undefined);
|
|
417
|
+
message.message?.$case === "lookAtPosition" &&
|
|
418
|
+
(obj.lookAtPosition = message.message?.lookAtPosition
|
|
419
|
+
? LookAtPosition.toJSON(message.message?.lookAtPosition)
|
|
420
|
+
: undefined);
|
|
361
421
|
message.protocolVersion !== undefined && (obj.protocolVersion = Math.round(message.protocolVersion));
|
|
362
422
|
return obj;
|
|
363
423
|
}
|
|
@@ -445,6 +505,16 @@ export namespace Packet {
|
|
|
445
505
|
movementCompressed: MovementCompressed.fromPartial(object.message.movementCompressed),
|
|
446
506
|
};
|
|
447
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
|
+
}
|
|
448
518
|
message.protocolVersion = object.protocolVersion ?? 0;
|
|
449
519
|
return message;
|
|
450
520
|
}
|
|
@@ -619,6 +689,10 @@ function createBaseMovement(): Movement {
|
|
|
619
689
|
rotationY: 0,
|
|
620
690
|
isInstant: false,
|
|
621
691
|
isEmoting: false,
|
|
692
|
+
headIkYawEnabled: false,
|
|
693
|
+
headIkPitchEnabled: false,
|
|
694
|
+
headYaw: 0,
|
|
695
|
+
headPitch: 0,
|
|
622
696
|
};
|
|
623
697
|
}
|
|
624
698
|
|
|
@@ -678,6 +752,18 @@ export namespace Movement {
|
|
|
678
752
|
if (message.isEmoting === true) {
|
|
679
753
|
writer.uint32(144).bool(message.isEmoting);
|
|
680
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
|
+
}
|
|
681
767
|
return writer;
|
|
682
768
|
}
|
|
683
769
|
|
|
@@ -814,6 +900,34 @@ export namespace Movement {
|
|
|
814
900
|
|
|
815
901
|
message.isEmoting = reader.bool();
|
|
816
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;
|
|
817
931
|
}
|
|
818
932
|
if ((tag & 7) === 4 || tag === 0) {
|
|
819
933
|
break;
|
|
@@ -843,6 +957,10 @@ export namespace Movement {
|
|
|
843
957
|
rotationY: isSet(object.rotationY) ? Number(object.rotationY) : 0,
|
|
844
958
|
isInstant: isSet(object.isInstant) ? Boolean(object.isInstant) : false,
|
|
845
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,
|
|
846
964
|
};
|
|
847
965
|
}
|
|
848
966
|
|
|
@@ -866,6 +984,10 @@ export namespace Movement {
|
|
|
866
984
|
message.rotationY !== undefined && (obj.rotationY = message.rotationY);
|
|
867
985
|
message.isInstant !== undefined && (obj.isInstant = message.isInstant);
|
|
868
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);
|
|
869
991
|
return obj;
|
|
870
992
|
}
|
|
871
993
|
|
|
@@ -893,12 +1015,16 @@ export namespace Movement {
|
|
|
893
1015
|
message.rotationY = object.rotationY ?? 0;
|
|
894
1016
|
message.isInstant = object.isInstant ?? false;
|
|
895
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;
|
|
896
1022
|
return message;
|
|
897
1023
|
}
|
|
898
1024
|
}
|
|
899
1025
|
|
|
900
1026
|
function createBaseMovementCompressed(): MovementCompressed {
|
|
901
|
-
return { temporalData: 0, movementData: 0 };
|
|
1027
|
+
return { temporalData: 0, movementData: 0, headSyncData: 0 };
|
|
902
1028
|
}
|
|
903
1029
|
|
|
904
1030
|
export namespace MovementCompressed {
|
|
@@ -909,6 +1035,9 @@ export namespace MovementCompressed {
|
|
|
909
1035
|
if (message.movementData !== 0) {
|
|
910
1036
|
writer.uint32(16).int64(message.movementData);
|
|
911
1037
|
}
|
|
1038
|
+
if (message.headSyncData !== 0) {
|
|
1039
|
+
writer.uint32(24).int32(message.headSyncData);
|
|
1040
|
+
}
|
|
912
1041
|
return writer;
|
|
913
1042
|
}
|
|
914
1043
|
|
|
@@ -933,6 +1062,13 @@ export namespace MovementCompressed {
|
|
|
933
1062
|
|
|
934
1063
|
message.movementData = longToNumber(reader.int64() as Long);
|
|
935
1064
|
continue;
|
|
1065
|
+
case 3:
|
|
1066
|
+
if (tag !== 24) {
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
message.headSyncData = reader.int32();
|
|
1071
|
+
continue;
|
|
936
1072
|
}
|
|
937
1073
|
if ((tag & 7) === 4 || tag === 0) {
|
|
938
1074
|
break;
|
|
@@ -946,6 +1082,7 @@ export namespace MovementCompressed {
|
|
|
946
1082
|
return {
|
|
947
1083
|
temporalData: isSet(object.temporalData) ? Number(object.temporalData) : 0,
|
|
948
1084
|
movementData: isSet(object.movementData) ? Number(object.movementData) : 0,
|
|
1085
|
+
headSyncData: isSet(object.headSyncData) ? Number(object.headSyncData) : 0,
|
|
949
1086
|
};
|
|
950
1087
|
}
|
|
951
1088
|
|
|
@@ -953,6 +1090,7 @@ export namespace MovementCompressed {
|
|
|
953
1090
|
const obj: any = {};
|
|
954
1091
|
message.temporalData !== undefined && (obj.temporalData = Math.round(message.temporalData));
|
|
955
1092
|
message.movementData !== undefined && (obj.movementData = Math.round(message.movementData));
|
|
1093
|
+
message.headSyncData !== undefined && (obj.headSyncData = Math.round(message.headSyncData));
|
|
956
1094
|
return obj;
|
|
957
1095
|
}
|
|
958
1096
|
|
|
@@ -964,12 +1102,24 @@ export namespace MovementCompressed {
|
|
|
964
1102
|
const message = createBaseMovementCompressed();
|
|
965
1103
|
message.temporalData = object.temporalData ?? 0;
|
|
966
1104
|
message.movementData = object.movementData ?? 0;
|
|
1105
|
+
message.headSyncData = object.headSyncData ?? 0;
|
|
967
1106
|
return message;
|
|
968
1107
|
}
|
|
969
1108
|
}
|
|
970
1109
|
|
|
971
1110
|
function createBasePlayerEmote(): PlayerEmote {
|
|
972
|
-
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
|
+
};
|
|
973
1123
|
}
|
|
974
1124
|
|
|
975
1125
|
export namespace PlayerEmote {
|
|
@@ -983,6 +1133,27 @@ export namespace PlayerEmote {
|
|
|
983
1133
|
if (message.timestamp !== 0) {
|
|
984
1134
|
writer.uint32(29).float(message.timestamp);
|
|
985
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
|
+
}
|
|
986
1157
|
return writer;
|
|
987
1158
|
}
|
|
988
1159
|
|
|
@@ -1014,6 +1185,55 @@ export namespace PlayerEmote {
|
|
|
1014
1185
|
|
|
1015
1186
|
message.timestamp = reader.float();
|
|
1016
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;
|
|
1017
1237
|
}
|
|
1018
1238
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1019
1239
|
break;
|
|
@@ -1028,6 +1248,13 @@ export namespace PlayerEmote {
|
|
|
1028
1248
|
incrementalId: isSet(object.incrementalId) ? Number(object.incrementalId) : 0,
|
|
1029
1249
|
urn: isSet(object.urn) ? String(object.urn) : "",
|
|
1030
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,
|
|
1031
1258
|
};
|
|
1032
1259
|
}
|
|
1033
1260
|
|
|
@@ -1036,6 +1263,13 @@ export namespace PlayerEmote {
|
|
|
1036
1263
|
message.incrementalId !== undefined && (obj.incrementalId = Math.round(message.incrementalId));
|
|
1037
1264
|
message.urn !== undefined && (obj.urn = message.urn);
|
|
1038
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);
|
|
1039
1273
|
return obj;
|
|
1040
1274
|
}
|
|
1041
1275
|
|
|
@@ -1048,6 +1282,126 @@ export namespace PlayerEmote {
|
|
|
1048
1282
|
message.incrementalId = object.incrementalId ?? 0;
|
|
1049
1283
|
message.urn = object.urn ?? "";
|
|
1050
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 ?? "";
|
|
1051
1405
|
return message;
|
|
1052
1406
|
}
|
|
1053
1407
|
}
|
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-20302100396.commit-b2ab885",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "decentraland/protocol.git",
|
|
6
6
|
"homepage": "https://github.com/decentraland/protocol#readme",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"out-js",
|
|
31
31
|
"public"
|
|
32
32
|
],
|
|
33
|
-
"commit": "
|
|
33
|
+
"commit": "b2ab885e610f54d772904f91b44e72188b697c2e"
|
|
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 {
|