@dcl/protocol 1.0.0-30361475985.commit-df8a4ff → 1.0.0-30376440685.commit-2726089
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/README.md +217 -0
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +64 -0
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +251 -1
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.d.ts +21 -0
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +124 -4
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +8 -0
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js +35 -1
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +263 -0
- package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +166 -2
- package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +34 -0
- package/package.json +9 -6
- package/proto/decentraland/common/options.proto +51 -0
- package/proto/decentraland/common/quantization_example.proto +164 -0
- package/proto/decentraland/kernel/apis/restricted_actions.proto +39 -0
- package/proto/decentraland/kernel/comms/rfc4/comms.proto +11 -0
- package/proto/decentraland/pulse/pulse_client.proto +79 -0
- package/proto/decentraland/pulse/pulse_server.proto +144 -0
- package/proto/decentraland/pulse/pulse_shared.proto +57 -0
- package/proto/decentraland/sdk/components/avatar_shape.proto +5 -0
- package/proto/decentraland/sdk/components/light_source.proto +1 -1
- package/protoc-gen-bitwise/generator_csharp.js +248 -0
- package/protoc-gen-bitwise/options.js +139 -0
- package/protoc-gen-bitwise/plugin.js +87 -0
- package/protoc-gen-bitwise/runtime/cs/Quantize.cs +70 -0
- package/protoc-gen-bitwise/wire.js +239 -0
- package/proto/buf.yaml +0 -47
- package/proto/google/LICENSE +0 -27
- package/proto/google/README.md +0 -1
- package/proto/google/api/annotations.json +0 -83
- package/proto/google/api/annotations.proto +0 -11
- package/proto/google/api/http.json +0 -86
- package/proto/google/api/http.proto +0 -31
- package/proto/google/protobuf/api.json +0 -118
- package/proto/google/protobuf/api.proto +0 -34
- package/proto/google/protobuf/descriptor.json +0 -739
- package/proto/google/protobuf/descriptor.proto +0 -286
- package/proto/google/protobuf/source_context.json +0 -20
- package/proto/google/protobuf/source_context.proto +0 -7
- package/proto/google/protobuf/type.json +0 -202
- package/proto/google/protobuf/type.proto +0 -89
|
@@ -5,6 +5,135 @@ import { AvatarMask, avatarMaskFromJSON, avatarMaskToJSON } from "../../sdk/comp
|
|
|
5
5
|
|
|
6
6
|
export const protobufPackage = "decentraland.kernel.apis";
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Identifies which fullscreen explorer panel OpenExplorerUi targets.
|
|
10
|
+
* EU_SETTINGS holds 0 so an unset `ui` field defaults to the least-intrusive panel.
|
|
11
|
+
*/
|
|
12
|
+
export enum ExplorerUi {
|
|
13
|
+
EU_SETTINGS = 0,
|
|
14
|
+
EU_MAP = 1,
|
|
15
|
+
EU_BACKPACK = 2,
|
|
16
|
+
EU_CAMERA_REEL = 3,
|
|
17
|
+
EU_COMMUNITIES = 4,
|
|
18
|
+
EU_PLACES = 5,
|
|
19
|
+
EU_EVENTS = 6,
|
|
20
|
+
UNRECOGNIZED = -1,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function explorerUiFromJSON(object: any): ExplorerUi {
|
|
24
|
+
switch (object) {
|
|
25
|
+
case 0:
|
|
26
|
+
case "EU_SETTINGS":
|
|
27
|
+
return ExplorerUi.EU_SETTINGS;
|
|
28
|
+
case 1:
|
|
29
|
+
case "EU_MAP":
|
|
30
|
+
return ExplorerUi.EU_MAP;
|
|
31
|
+
case 2:
|
|
32
|
+
case "EU_BACKPACK":
|
|
33
|
+
return ExplorerUi.EU_BACKPACK;
|
|
34
|
+
case 3:
|
|
35
|
+
case "EU_CAMERA_REEL":
|
|
36
|
+
return ExplorerUi.EU_CAMERA_REEL;
|
|
37
|
+
case 4:
|
|
38
|
+
case "EU_COMMUNITIES":
|
|
39
|
+
return ExplorerUi.EU_COMMUNITIES;
|
|
40
|
+
case 5:
|
|
41
|
+
case "EU_PLACES":
|
|
42
|
+
return ExplorerUi.EU_PLACES;
|
|
43
|
+
case 6:
|
|
44
|
+
case "EU_EVENTS":
|
|
45
|
+
return ExplorerUi.EU_EVENTS;
|
|
46
|
+
case -1:
|
|
47
|
+
case "UNRECOGNIZED":
|
|
48
|
+
default:
|
|
49
|
+
return ExplorerUi.UNRECOGNIZED;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function explorerUiToJSON(object: ExplorerUi): string {
|
|
54
|
+
switch (object) {
|
|
55
|
+
case ExplorerUi.EU_SETTINGS:
|
|
56
|
+
return "EU_SETTINGS";
|
|
57
|
+
case ExplorerUi.EU_MAP:
|
|
58
|
+
return "EU_MAP";
|
|
59
|
+
case ExplorerUi.EU_BACKPACK:
|
|
60
|
+
return "EU_BACKPACK";
|
|
61
|
+
case ExplorerUi.EU_CAMERA_REEL:
|
|
62
|
+
return "EU_CAMERA_REEL";
|
|
63
|
+
case ExplorerUi.EU_COMMUNITIES:
|
|
64
|
+
return "EU_COMMUNITIES";
|
|
65
|
+
case ExplorerUi.EU_PLACES:
|
|
66
|
+
return "EU_PLACES";
|
|
67
|
+
case ExplorerUi.EU_EVENTS:
|
|
68
|
+
return "EU_EVENTS";
|
|
69
|
+
case ExplorerUi.UNRECOGNIZED:
|
|
70
|
+
default:
|
|
71
|
+
return "UNRECOGNIZED";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Verdict of an OpenExplorerUi request (enum rather than a bool so new outcomes stay expressible). */
|
|
76
|
+
export enum OpenExplorerUiResult {
|
|
77
|
+
UNSPECIFIED = 0,
|
|
78
|
+
OPENED = 1,
|
|
79
|
+
/** WAS_ALREADY_OPEN - a fullscreen panel is already open */
|
|
80
|
+
WAS_ALREADY_OPEN = 2,
|
|
81
|
+
/** REJECTED_NOT_CURRENT_SCENE - the standard restricted-actions current-scene gate rejected the call */
|
|
82
|
+
REJECTED_NOT_CURRENT_SCENE = 3,
|
|
83
|
+
/** REJECTED_FEATURE_DISABLED - the requested section is hidden by feature flags or client doesn't have that feature */
|
|
84
|
+
REJECTED_FEATURE_DISABLED = 4,
|
|
85
|
+
/** REJECTED_NO_USER_GESTURE - rejected: the call did not originate from a user gesture */
|
|
86
|
+
REJECTED_NO_USER_GESTURE = 5,
|
|
87
|
+
UNRECOGNIZED = -1,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function openExplorerUiResultFromJSON(object: any): OpenExplorerUiResult {
|
|
91
|
+
switch (object) {
|
|
92
|
+
case 0:
|
|
93
|
+
case "UNSPECIFIED":
|
|
94
|
+
return OpenExplorerUiResult.UNSPECIFIED;
|
|
95
|
+
case 1:
|
|
96
|
+
case "OPENED":
|
|
97
|
+
return OpenExplorerUiResult.OPENED;
|
|
98
|
+
case 2:
|
|
99
|
+
case "WAS_ALREADY_OPEN":
|
|
100
|
+
return OpenExplorerUiResult.WAS_ALREADY_OPEN;
|
|
101
|
+
case 3:
|
|
102
|
+
case "REJECTED_NOT_CURRENT_SCENE":
|
|
103
|
+
return OpenExplorerUiResult.REJECTED_NOT_CURRENT_SCENE;
|
|
104
|
+
case 4:
|
|
105
|
+
case "REJECTED_FEATURE_DISABLED":
|
|
106
|
+
return OpenExplorerUiResult.REJECTED_FEATURE_DISABLED;
|
|
107
|
+
case 5:
|
|
108
|
+
case "REJECTED_NO_USER_GESTURE":
|
|
109
|
+
return OpenExplorerUiResult.REJECTED_NO_USER_GESTURE;
|
|
110
|
+
case -1:
|
|
111
|
+
case "UNRECOGNIZED":
|
|
112
|
+
default:
|
|
113
|
+
return OpenExplorerUiResult.UNRECOGNIZED;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function openExplorerUiResultToJSON(object: OpenExplorerUiResult): string {
|
|
118
|
+
switch (object) {
|
|
119
|
+
case OpenExplorerUiResult.UNSPECIFIED:
|
|
120
|
+
return "UNSPECIFIED";
|
|
121
|
+
case OpenExplorerUiResult.OPENED:
|
|
122
|
+
return "OPENED";
|
|
123
|
+
case OpenExplorerUiResult.WAS_ALREADY_OPEN:
|
|
124
|
+
return "WAS_ALREADY_OPEN";
|
|
125
|
+
case OpenExplorerUiResult.REJECTED_NOT_CURRENT_SCENE:
|
|
126
|
+
return "REJECTED_NOT_CURRENT_SCENE";
|
|
127
|
+
case OpenExplorerUiResult.REJECTED_FEATURE_DISABLED:
|
|
128
|
+
return "REJECTED_FEATURE_DISABLED";
|
|
129
|
+
case OpenExplorerUiResult.REJECTED_NO_USER_GESTURE:
|
|
130
|
+
return "REJECTED_NO_USER_GESTURE";
|
|
131
|
+
case OpenExplorerUiResult.UNRECOGNIZED:
|
|
132
|
+
default:
|
|
133
|
+
return "UNRECOGNIZED";
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
8
137
|
export interface MovePlayerToRequest {
|
|
9
138
|
newRelativePosition: Vector3 | undefined;
|
|
10
139
|
cameraTarget?: Vector3 | undefined;
|
|
@@ -74,6 +203,15 @@ export interface EmptyResponse {
|
|
|
74
203
|
export interface StopEmoteRequest {
|
|
75
204
|
}
|
|
76
205
|
|
|
206
|
+
export interface OpenExplorerUiRequest {
|
|
207
|
+
ui: ExplorerUi;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface OpenExplorerUiResponse {
|
|
211
|
+
/** Carries only the verdict of the open action. */
|
|
212
|
+
openResult: OpenExplorerUiResult;
|
|
213
|
+
}
|
|
214
|
+
|
|
77
215
|
function createBaseMovePlayerToRequest(): MovePlayerToRequest {
|
|
78
216
|
return { newRelativePosition: undefined, cameraTarget: undefined, avatarTarget: undefined, duration: undefined };
|
|
79
217
|
}
|
|
@@ -1029,6 +1167,122 @@ export namespace StopEmoteRequest {
|
|
|
1029
1167
|
}
|
|
1030
1168
|
}
|
|
1031
1169
|
|
|
1170
|
+
function createBaseOpenExplorerUiRequest(): OpenExplorerUiRequest {
|
|
1171
|
+
return { ui: 0 };
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
export namespace OpenExplorerUiRequest {
|
|
1175
|
+
export function encode(message: OpenExplorerUiRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1176
|
+
if (message.ui !== 0) {
|
|
1177
|
+
writer.uint32(8).int32(message.ui);
|
|
1178
|
+
}
|
|
1179
|
+
return writer;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): OpenExplorerUiRequest {
|
|
1183
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1184
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1185
|
+
const message = createBaseOpenExplorerUiRequest();
|
|
1186
|
+
while (reader.pos < end) {
|
|
1187
|
+
const tag = reader.uint32();
|
|
1188
|
+
switch (tag >>> 3) {
|
|
1189
|
+
case 1:
|
|
1190
|
+
if (tag !== 8) {
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
message.ui = reader.int32() as any;
|
|
1195
|
+
continue;
|
|
1196
|
+
}
|
|
1197
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1198
|
+
break;
|
|
1199
|
+
}
|
|
1200
|
+
reader.skipType(tag & 7);
|
|
1201
|
+
}
|
|
1202
|
+
return message;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
export function fromJSON(object: any): OpenExplorerUiRequest {
|
|
1206
|
+
return { ui: isSet(object.ui) ? explorerUiFromJSON(object.ui) : 0 };
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
export function toJSON(message: OpenExplorerUiRequest): unknown {
|
|
1210
|
+
const obj: any = {};
|
|
1211
|
+
message.ui !== undefined && (obj.ui = explorerUiToJSON(message.ui));
|
|
1212
|
+
return obj;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
export function create<I extends Exact<DeepPartial<OpenExplorerUiRequest>, I>>(base?: I): OpenExplorerUiRequest {
|
|
1216
|
+
return OpenExplorerUiRequest.fromPartial(base ?? {});
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
export function fromPartial<I extends Exact<DeepPartial<OpenExplorerUiRequest>, I>>(
|
|
1220
|
+
object: I,
|
|
1221
|
+
): OpenExplorerUiRequest {
|
|
1222
|
+
const message = createBaseOpenExplorerUiRequest();
|
|
1223
|
+
message.ui = object.ui ?? 0;
|
|
1224
|
+
return message;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
function createBaseOpenExplorerUiResponse(): OpenExplorerUiResponse {
|
|
1229
|
+
return { openResult: 0 };
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
export namespace OpenExplorerUiResponse {
|
|
1233
|
+
export function encode(message: OpenExplorerUiResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
1234
|
+
if (message.openResult !== 0) {
|
|
1235
|
+
writer.uint32(8).int32(message.openResult);
|
|
1236
|
+
}
|
|
1237
|
+
return writer;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): OpenExplorerUiResponse {
|
|
1241
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
1242
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1243
|
+
const message = createBaseOpenExplorerUiResponse();
|
|
1244
|
+
while (reader.pos < end) {
|
|
1245
|
+
const tag = reader.uint32();
|
|
1246
|
+
switch (tag >>> 3) {
|
|
1247
|
+
case 1:
|
|
1248
|
+
if (tag !== 8) {
|
|
1249
|
+
break;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
message.openResult = reader.int32() as any;
|
|
1253
|
+
continue;
|
|
1254
|
+
}
|
|
1255
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1256
|
+
break;
|
|
1257
|
+
}
|
|
1258
|
+
reader.skipType(tag & 7);
|
|
1259
|
+
}
|
|
1260
|
+
return message;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
export function fromJSON(object: any): OpenExplorerUiResponse {
|
|
1264
|
+
return { openResult: isSet(object.openResult) ? openExplorerUiResultFromJSON(object.openResult) : 0 };
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
export function toJSON(message: OpenExplorerUiResponse): unknown {
|
|
1268
|
+
const obj: any = {};
|
|
1269
|
+
message.openResult !== undefined && (obj.openResult = openExplorerUiResultToJSON(message.openResult));
|
|
1270
|
+
return obj;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
export function create<I extends Exact<DeepPartial<OpenExplorerUiResponse>, I>>(base?: I): OpenExplorerUiResponse {
|
|
1274
|
+
return OpenExplorerUiResponse.fromPartial(base ?? {});
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
export function fromPartial<I extends Exact<DeepPartial<OpenExplorerUiResponse>, I>>(
|
|
1278
|
+
object: I,
|
|
1279
|
+
): OpenExplorerUiResponse {
|
|
1280
|
+
const message = createBaseOpenExplorerUiResponse();
|
|
1281
|
+
message.openResult = object.openResult ?? 0;
|
|
1282
|
+
return message;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1032
1286
|
export type RestrictedActionsServiceDefinition = typeof RestrictedActionsServiceDefinition;
|
|
1033
1287
|
export const RestrictedActionsServiceDefinition = {
|
|
1034
1288
|
name: "RestrictedActionsService",
|
|
@@ -1131,6 +1385,15 @@ export const RestrictedActionsServiceDefinition = {
|
|
|
1131
1385
|
responseStream: false,
|
|
1132
1386
|
options: {},
|
|
1133
1387
|
},
|
|
1388
|
+
/** OpenExplorerUi opens a specific fullscreen explorer panel and returns the open verdict. */
|
|
1389
|
+
openExplorerUi: {
|
|
1390
|
+
name: "OpenExplorerUi",
|
|
1391
|
+
requestType: OpenExplorerUiRequest,
|
|
1392
|
+
requestStream: false,
|
|
1393
|
+
responseType: OpenExplorerUiResponse,
|
|
1394
|
+
responseStream: false,
|
|
1395
|
+
options: {},
|
|
1396
|
+
},
|
|
1134
1397
|
},
|
|
1135
1398
|
} as const;
|
|
1136
1399
|
|
|
@@ -137,6 +137,36 @@ export interface PlayerEmote {
|
|
|
137
137
|
incrementalId: number;
|
|
138
138
|
urn: string;
|
|
139
139
|
timestamp: number;
|
|
140
|
+
/** true means the emote has been stopped in the sender's client */
|
|
141
|
+
isStopping?:
|
|
142
|
+
| boolean
|
|
143
|
+
| undefined;
|
|
144
|
+
/** true when it is not the first time the looping animation plays */
|
|
145
|
+
isRepeating?:
|
|
146
|
+
| boolean
|
|
147
|
+
| undefined;
|
|
148
|
+
/** identifies an interaction univocaly, established when the start animation is triggered */
|
|
149
|
+
interactionId?:
|
|
150
|
+
| number
|
|
151
|
+
| undefined;
|
|
152
|
+
/** -1 means it does not use an outcome animation */
|
|
153
|
+
socialEmoteOutcome?:
|
|
154
|
+
| number
|
|
155
|
+
| undefined;
|
|
156
|
+
/** to a social emote started by other user */
|
|
157
|
+
isReacting?:
|
|
158
|
+
| boolean
|
|
159
|
+
| undefined;
|
|
160
|
+
/** wallet address of the user that initiated social emote */
|
|
161
|
+
socialEmoteInitiator?:
|
|
162
|
+
| string
|
|
163
|
+
| undefined;
|
|
164
|
+
/** wallet address of the user whose avatar is the target of a directed emote */
|
|
165
|
+
targetAvatar?:
|
|
166
|
+
| string
|
|
167
|
+
| undefined;
|
|
168
|
+
/** mask for which bones an animation applies to. */
|
|
169
|
+
mask?: number | undefined;
|
|
140
170
|
}
|
|
141
171
|
|
|
142
172
|
export interface SceneEmote {
|
|
@@ -161,6 +191,11 @@ export interface ProfileResponse {
|
|
|
161
191
|
export interface Chat {
|
|
162
192
|
message: string;
|
|
163
193
|
timestamp: number;
|
|
194
|
+
/**
|
|
195
|
+
* Extension: optional forwarded_from to identify the original sender when
|
|
196
|
+
* messages are forwarded through an SFU
|
|
197
|
+
*/
|
|
198
|
+
forwardedFrom?: string | undefined;
|
|
164
199
|
}
|
|
165
200
|
|
|
166
201
|
export interface Scene {
|
|
@@ -1287,7 +1322,19 @@ export namespace MovementCompressed {
|
|
|
1287
1322
|
}
|
|
1288
1323
|
|
|
1289
1324
|
function createBasePlayerEmote(): PlayerEmote {
|
|
1290
|
-
return {
|
|
1325
|
+
return {
|
|
1326
|
+
incrementalId: 0,
|
|
1327
|
+
urn: "",
|
|
1328
|
+
timestamp: 0,
|
|
1329
|
+
isStopping: undefined,
|
|
1330
|
+
isRepeating: undefined,
|
|
1331
|
+
interactionId: undefined,
|
|
1332
|
+
socialEmoteOutcome: undefined,
|
|
1333
|
+
isReacting: undefined,
|
|
1334
|
+
socialEmoteInitiator: undefined,
|
|
1335
|
+
targetAvatar: undefined,
|
|
1336
|
+
mask: undefined,
|
|
1337
|
+
};
|
|
1291
1338
|
}
|
|
1292
1339
|
|
|
1293
1340
|
export namespace PlayerEmote {
|
|
@@ -1301,6 +1348,30 @@ export namespace PlayerEmote {
|
|
|
1301
1348
|
if (message.timestamp !== 0) {
|
|
1302
1349
|
writer.uint32(29).float(message.timestamp);
|
|
1303
1350
|
}
|
|
1351
|
+
if (message.isStopping !== undefined) {
|
|
1352
|
+
writer.uint32(32).bool(message.isStopping);
|
|
1353
|
+
}
|
|
1354
|
+
if (message.isRepeating !== undefined) {
|
|
1355
|
+
writer.uint32(40).bool(message.isRepeating);
|
|
1356
|
+
}
|
|
1357
|
+
if (message.interactionId !== undefined) {
|
|
1358
|
+
writer.uint32(48).int32(message.interactionId);
|
|
1359
|
+
}
|
|
1360
|
+
if (message.socialEmoteOutcome !== undefined) {
|
|
1361
|
+
writer.uint32(56).int32(message.socialEmoteOutcome);
|
|
1362
|
+
}
|
|
1363
|
+
if (message.isReacting !== undefined) {
|
|
1364
|
+
writer.uint32(64).bool(message.isReacting);
|
|
1365
|
+
}
|
|
1366
|
+
if (message.socialEmoteInitiator !== undefined) {
|
|
1367
|
+
writer.uint32(74).string(message.socialEmoteInitiator);
|
|
1368
|
+
}
|
|
1369
|
+
if (message.targetAvatar !== undefined) {
|
|
1370
|
+
writer.uint32(82).string(message.targetAvatar);
|
|
1371
|
+
}
|
|
1372
|
+
if (message.mask !== undefined) {
|
|
1373
|
+
writer.uint32(88).uint32(message.mask);
|
|
1374
|
+
}
|
|
1304
1375
|
return writer;
|
|
1305
1376
|
}
|
|
1306
1377
|
|
|
@@ -1332,6 +1403,62 @@ export namespace PlayerEmote {
|
|
|
1332
1403
|
|
|
1333
1404
|
message.timestamp = reader.float();
|
|
1334
1405
|
continue;
|
|
1406
|
+
case 4:
|
|
1407
|
+
if (tag !== 32) {
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
message.isStopping = reader.bool();
|
|
1412
|
+
continue;
|
|
1413
|
+
case 5:
|
|
1414
|
+
if (tag !== 40) {
|
|
1415
|
+
break;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
message.isRepeating = reader.bool();
|
|
1419
|
+
continue;
|
|
1420
|
+
case 6:
|
|
1421
|
+
if (tag !== 48) {
|
|
1422
|
+
break;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
message.interactionId = reader.int32();
|
|
1426
|
+
continue;
|
|
1427
|
+
case 7:
|
|
1428
|
+
if (tag !== 56) {
|
|
1429
|
+
break;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
message.socialEmoteOutcome = reader.int32();
|
|
1433
|
+
continue;
|
|
1434
|
+
case 8:
|
|
1435
|
+
if (tag !== 64) {
|
|
1436
|
+
break;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
message.isReacting = reader.bool();
|
|
1440
|
+
continue;
|
|
1441
|
+
case 9:
|
|
1442
|
+
if (tag !== 74) {
|
|
1443
|
+
break;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
message.socialEmoteInitiator = reader.string();
|
|
1447
|
+
continue;
|
|
1448
|
+
case 10:
|
|
1449
|
+
if (tag !== 82) {
|
|
1450
|
+
break;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
message.targetAvatar = reader.string();
|
|
1454
|
+
continue;
|
|
1455
|
+
case 11:
|
|
1456
|
+
if (tag !== 88) {
|
|
1457
|
+
break;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
message.mask = reader.uint32();
|
|
1461
|
+
continue;
|
|
1335
1462
|
}
|
|
1336
1463
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1337
1464
|
break;
|
|
@@ -1346,6 +1473,14 @@ export namespace PlayerEmote {
|
|
|
1346
1473
|
incrementalId: isSet(object.incrementalId) ? Number(object.incrementalId) : 0,
|
|
1347
1474
|
urn: isSet(object.urn) ? String(object.urn) : "",
|
|
1348
1475
|
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
1476
|
+
isStopping: isSet(object.isStopping) ? Boolean(object.isStopping) : undefined,
|
|
1477
|
+
isRepeating: isSet(object.isRepeating) ? Boolean(object.isRepeating) : undefined,
|
|
1478
|
+
interactionId: isSet(object.interactionId) ? Number(object.interactionId) : undefined,
|
|
1479
|
+
socialEmoteOutcome: isSet(object.socialEmoteOutcome) ? Number(object.socialEmoteOutcome) : undefined,
|
|
1480
|
+
isReacting: isSet(object.isReacting) ? Boolean(object.isReacting) : undefined,
|
|
1481
|
+
socialEmoteInitiator: isSet(object.socialEmoteInitiator) ? String(object.socialEmoteInitiator) : undefined,
|
|
1482
|
+
targetAvatar: isSet(object.targetAvatar) ? String(object.targetAvatar) : undefined,
|
|
1483
|
+
mask: isSet(object.mask) ? Number(object.mask) : undefined,
|
|
1349
1484
|
};
|
|
1350
1485
|
}
|
|
1351
1486
|
|
|
@@ -1354,6 +1489,14 @@ export namespace PlayerEmote {
|
|
|
1354
1489
|
message.incrementalId !== undefined && (obj.incrementalId = Math.round(message.incrementalId));
|
|
1355
1490
|
message.urn !== undefined && (obj.urn = message.urn);
|
|
1356
1491
|
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
1492
|
+
message.isStopping !== undefined && (obj.isStopping = message.isStopping);
|
|
1493
|
+
message.isRepeating !== undefined && (obj.isRepeating = message.isRepeating);
|
|
1494
|
+
message.interactionId !== undefined && (obj.interactionId = Math.round(message.interactionId));
|
|
1495
|
+
message.socialEmoteOutcome !== undefined && (obj.socialEmoteOutcome = Math.round(message.socialEmoteOutcome));
|
|
1496
|
+
message.isReacting !== undefined && (obj.isReacting = message.isReacting);
|
|
1497
|
+
message.socialEmoteInitiator !== undefined && (obj.socialEmoteInitiator = message.socialEmoteInitiator);
|
|
1498
|
+
message.targetAvatar !== undefined && (obj.targetAvatar = message.targetAvatar);
|
|
1499
|
+
message.mask !== undefined && (obj.mask = Math.round(message.mask));
|
|
1357
1500
|
return obj;
|
|
1358
1501
|
}
|
|
1359
1502
|
|
|
@@ -1366,6 +1509,14 @@ export namespace PlayerEmote {
|
|
|
1366
1509
|
message.incrementalId = object.incrementalId ?? 0;
|
|
1367
1510
|
message.urn = object.urn ?? "";
|
|
1368
1511
|
message.timestamp = object.timestamp ?? 0;
|
|
1512
|
+
message.isStopping = object.isStopping ?? undefined;
|
|
1513
|
+
message.isRepeating = object.isRepeating ?? undefined;
|
|
1514
|
+
message.interactionId = object.interactionId ?? undefined;
|
|
1515
|
+
message.socialEmoteOutcome = object.socialEmoteOutcome ?? undefined;
|
|
1516
|
+
message.isReacting = object.isReacting ?? undefined;
|
|
1517
|
+
message.socialEmoteInitiator = object.socialEmoteInitiator ?? undefined;
|
|
1518
|
+
message.targetAvatar = object.targetAvatar ?? undefined;
|
|
1519
|
+
message.mask = object.mask ?? undefined;
|
|
1369
1520
|
return message;
|
|
1370
1521
|
}
|
|
1371
1522
|
}
|
|
@@ -1642,7 +1793,7 @@ export namespace ProfileResponse {
|
|
|
1642
1793
|
}
|
|
1643
1794
|
|
|
1644
1795
|
function createBaseChat(): Chat {
|
|
1645
|
-
return { message: "", timestamp: 0 };
|
|
1796
|
+
return { message: "", timestamp: 0, forwardedFrom: undefined };
|
|
1646
1797
|
}
|
|
1647
1798
|
|
|
1648
1799
|
export namespace Chat {
|
|
@@ -1653,6 +1804,9 @@ export namespace Chat {
|
|
|
1653
1804
|
if (message.timestamp !== 0) {
|
|
1654
1805
|
writer.uint32(17).double(message.timestamp);
|
|
1655
1806
|
}
|
|
1807
|
+
if (message.forwardedFrom !== undefined) {
|
|
1808
|
+
writer.uint32(26).string(message.forwardedFrom);
|
|
1809
|
+
}
|
|
1656
1810
|
return writer;
|
|
1657
1811
|
}
|
|
1658
1812
|
|
|
@@ -1677,6 +1831,13 @@ export namespace Chat {
|
|
|
1677
1831
|
|
|
1678
1832
|
message.timestamp = reader.double();
|
|
1679
1833
|
continue;
|
|
1834
|
+
case 3:
|
|
1835
|
+
if (tag !== 26) {
|
|
1836
|
+
break;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
message.forwardedFrom = reader.string();
|
|
1840
|
+
continue;
|
|
1680
1841
|
}
|
|
1681
1842
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1682
1843
|
break;
|
|
@@ -1690,6 +1851,7 @@ export namespace Chat {
|
|
|
1690
1851
|
return {
|
|
1691
1852
|
message: isSet(object.message) ? String(object.message) : "",
|
|
1692
1853
|
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
|
1854
|
+
forwardedFrom: isSet(object.forwardedFrom) ? String(object.forwardedFrom) : undefined,
|
|
1693
1855
|
};
|
|
1694
1856
|
}
|
|
1695
1857
|
|
|
@@ -1697,6 +1859,7 @@ export namespace Chat {
|
|
|
1697
1859
|
const obj: any = {};
|
|
1698
1860
|
message.message !== undefined && (obj.message = message.message);
|
|
1699
1861
|
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
|
1862
|
+
message.forwardedFrom !== undefined && (obj.forwardedFrom = message.forwardedFrom);
|
|
1700
1863
|
return obj;
|
|
1701
1864
|
}
|
|
1702
1865
|
|
|
@@ -1708,6 +1871,7 @@ export namespace Chat {
|
|
|
1708
1871
|
const message = createBaseChat();
|
|
1709
1872
|
message.message = object.message ?? "";
|
|
1710
1873
|
message.timestamp = object.timestamp ?? 0;
|
|
1874
|
+
message.forwardedFrom = object.forwardedFrom ?? undefined;
|
|
1711
1875
|
return message;
|
|
1712
1876
|
}
|
|
1713
1877
|
}
|
|
@@ -5,6 +5,40 @@ import { Color3 } from "../../common/colors.gen";
|
|
|
5
5
|
|
|
6
6
|
export const protobufPackage = "decentraland.sdk.components";
|
|
7
7
|
|
|
8
|
+
/** Mask for which bones an animation applies to. */
|
|
9
|
+
export enum AvatarEmoteMask {
|
|
10
|
+
AEM_FULL_BODY = 0,
|
|
11
|
+
AEM_UPPER_BODY = 1,
|
|
12
|
+
UNRECOGNIZED = -1,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function avatarEmoteMaskFromJSON(object: any): AvatarEmoteMask {
|
|
16
|
+
switch (object) {
|
|
17
|
+
case 0:
|
|
18
|
+
case "AEM_FULL_BODY":
|
|
19
|
+
return AvatarEmoteMask.AEM_FULL_BODY;
|
|
20
|
+
case 1:
|
|
21
|
+
case "AEM_UPPER_BODY":
|
|
22
|
+
return AvatarEmoteMask.AEM_UPPER_BODY;
|
|
23
|
+
case -1:
|
|
24
|
+
case "UNRECOGNIZED":
|
|
25
|
+
default:
|
|
26
|
+
return AvatarEmoteMask.UNRECOGNIZED;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function avatarEmoteMaskToJSON(object: AvatarEmoteMask): string {
|
|
31
|
+
switch (object) {
|
|
32
|
+
case AvatarEmoteMask.AEM_FULL_BODY:
|
|
33
|
+
return "AEM_FULL_BODY";
|
|
34
|
+
case AvatarEmoteMask.AEM_UPPER_BODY:
|
|
35
|
+
return "AEM_UPPER_BODY";
|
|
36
|
+
case AvatarEmoteMask.UNRECOGNIZED:
|
|
37
|
+
default:
|
|
38
|
+
return "UNRECOGNIZED";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
8
42
|
/**
|
|
9
43
|
* The AvatarShape component contains the information required to draw and animate avatar, acting as
|
|
10
44
|
* a simplified GLTF container for this specific case.
|
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-30376440685.commit-2726089",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"main": "index.js",
|
|
15
15
|
"scripts": {
|
|
16
|
-
"test": "./scripts/check-proto-compabitility.sh"
|
|
16
|
+
"test": "./scripts/check-proto-compabitility.sh",
|
|
17
|
+
"gen:test": "node protoc-gen-bitwise/test/generator.test.js"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
19
|
-
"@protobuf-ts/protoc": "^2.
|
|
20
|
+
"@protobuf-ts/protoc": "^2.11.0",
|
|
20
21
|
"proto-compatibility-tool": "^1.1.2-20220925163655.commit-25bd040",
|
|
21
22
|
"typescript": "^5.0.4"
|
|
22
23
|
},
|
|
@@ -28,10 +29,12 @@
|
|
|
28
29
|
"protobufjs": "7.2.4"
|
|
29
30
|
},
|
|
30
31
|
"files": [
|
|
31
|
-
"proto",
|
|
32
|
+
"proto/decentraland",
|
|
32
33
|
"out-ts",
|
|
33
34
|
"out-js",
|
|
34
|
-
"public"
|
|
35
|
+
"public",
|
|
36
|
+
"protoc-gen-bitwise/*.js",
|
|
37
|
+
"protoc-gen-bitwise/runtime"
|
|
35
38
|
],
|
|
36
|
-
"commit": "
|
|
39
|
+
"commit": "2726089f694644e752fbbb15fa152a83eeeeecd6"
|
|
37
40
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.common;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/descriptor.proto";
|
|
6
|
+
|
|
7
|
+
// Options for quantizing a float value stored as a uint32 field.
|
|
8
|
+
// The float is clamped to [min, max] and uniformly quantized to N bits;
|
|
9
|
+
// protobuf encodes the resulting uint32 as a varint on the wire.
|
|
10
|
+
// The generator emits a float {Name}Quantized accessor in the partial class.
|
|
11
|
+
message QuantizedFloatOptions {
|
|
12
|
+
float min = 1;
|
|
13
|
+
float max = 2;
|
|
14
|
+
uint32 bits = 3;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Options for quantizing a signed float with a power-law curve, stored as a uint32 field.
|
|
18
|
+
// The value is split into an (bits-1)-bit linear unorm magnitude `u in [0, 1]` plus a sign,
|
|
19
|
+
// and reconstructed as `value = sign * max * u^pow`. Because `u = 0` maps to exactly `0`, zero is
|
|
20
|
+
// representable (unlike the linear quantizer, whose codes straddle zero), and `pow > 1` concentrates
|
|
21
|
+
// resolution near zero — useful for fields like velocity that need fine detail at low magnitudes and
|
|
22
|
+
// only coarse detail near the extremes. The range is symmetric ([-max, max]); there is no `min`.
|
|
23
|
+
// The encoded layout puts the magnitude in the high bits and the sign in the LSB
|
|
24
|
+
// (`(magnitude << 1) | sign`), so the varint cost tracks magnitude, not direction: a small `|value|`
|
|
25
|
+
// of either sign stays in one varint byte. Zero canonicalizes to `0`, so proto3 omits a stopped field.
|
|
26
|
+
// The generator emits a float {Name}Quantized accessor, same as the linear option.
|
|
27
|
+
message QuantizedPowerFloatOptions {
|
|
28
|
+
float max = 1;
|
|
29
|
+
float pow = 2;
|
|
30
|
+
uint32 bits = 3;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Options for bit-packing an integer field into fewer than 32 bits.
|
|
34
|
+
message BitPackedOptions {
|
|
35
|
+
uint32 bits = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
extend google.protobuf.FieldOptions {
|
|
39
|
+
// Apply to uint32 fields to enable quantized float encoding.
|
|
40
|
+
// Example: uint32 dx = 1 [(decentraland.common.quantized) = { min: -100.0, max: 100.0, bits: 16 }];
|
|
41
|
+
QuantizedFloatOptions quantized = 50001;
|
|
42
|
+
|
|
43
|
+
// Apply to uint32 fields to pack into fewer bits.
|
|
44
|
+
// Example: uint32 entity_id = 4 [(decentraland.common.bit_packed) = { bits: 20 }];
|
|
45
|
+
BitPackedOptions bit_packed = 50002;
|
|
46
|
+
|
|
47
|
+
// Apply to uint32 fields to enable power-law quantized float encoding (sign + magnitude curve).
|
|
48
|
+
// A field carries either `quantized` or `quantized_power`, not both.
|
|
49
|
+
// Example: uint32 velocity_x = 9 [(decentraland.common.quantized_power) = { max: 50.0, pow: 2.0, bits: 8 }];
|
|
50
|
+
QuantizedPowerFloatOptions quantized_power = 50003;
|
|
51
|
+
}
|