@dcl/protocol 1.0.0-8789372854.commit-f692c7a → 1.0.0-8879141840.commit-9fe6ed4

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.
@@ -22,7 +22,17 @@ export interface Packet {
22
22
  } | {
23
23
  $case: "voice";
24
24
  voice: Voice;
25
+ } | {
26
+ $case: "movement";
27
+ movement: Movement;
28
+ } | {
29
+ $case: "playerEmote";
30
+ playerEmote: PlayerEmote;
31
+ } | {
32
+ $case: "sceneEmote";
33
+ sceneEmote: SceneEmote;
25
34
  } | undefined;
35
+ protocolVersion: number;
26
36
  }
27
37
  export interface Position {
28
38
  /** command number */
@@ -37,6 +47,35 @@ export interface Position {
37
47
  rotationZ: number;
38
48
  rotationW: number;
39
49
  }
50
+ export interface Movement {
51
+ /** command number */
52
+ timestamp: number;
53
+ /** world position */
54
+ positionX: number;
55
+ positionY: number;
56
+ positionZ: number;
57
+ /** velocity */
58
+ velocityX: number;
59
+ velocityY: number;
60
+ velocityZ: number;
61
+ /** animations */
62
+ movementBlendValue: number;
63
+ slideBlendValue: number;
64
+ isGrounded: boolean;
65
+ isJumping: boolean;
66
+ isLongJump: boolean;
67
+ isLongFall: boolean;
68
+ isFalling: boolean;
69
+ isStunned: boolean;
70
+ }
71
+ export interface PlayerEmote {
72
+ incrementalId: number;
73
+ urn: string;
74
+ }
75
+ export interface SceneEmote {
76
+ sceneEntityId: string;
77
+ source: string;
78
+ }
40
79
  export interface AnnounceProfileVersion {
41
80
  profileVersion: number;
42
81
  }
@@ -83,6 +122,30 @@ export declare namespace Position {
83
122
  function create<I extends Exact<DeepPartial<Position>, I>>(base?: I): Position;
84
123
  function fromPartial<I extends Exact<DeepPartial<Position>, I>>(object: I): Position;
85
124
  }
125
+ export declare namespace Movement {
126
+ function encode(message: Movement, writer?: _m0.Writer): _m0.Writer;
127
+ function decode(input: _m0.Reader | Uint8Array, length?: number): Movement;
128
+ function fromJSON(object: any): Movement;
129
+ function toJSON(message: Movement): unknown;
130
+ function create<I extends Exact<DeepPartial<Movement>, I>>(base?: I): Movement;
131
+ function fromPartial<I extends Exact<DeepPartial<Movement>, I>>(object: I): Movement;
132
+ }
133
+ export declare namespace PlayerEmote {
134
+ function encode(message: PlayerEmote, writer?: _m0.Writer): _m0.Writer;
135
+ function decode(input: _m0.Reader | Uint8Array, length?: number): PlayerEmote;
136
+ function fromJSON(object: any): PlayerEmote;
137
+ function toJSON(message: PlayerEmote): unknown;
138
+ function create<I extends Exact<DeepPartial<PlayerEmote>, I>>(base?: I): PlayerEmote;
139
+ function fromPartial<I extends Exact<DeepPartial<PlayerEmote>, I>>(object: I): PlayerEmote;
140
+ }
141
+ export declare namespace SceneEmote {
142
+ function encode(message: SceneEmote, writer?: _m0.Writer): _m0.Writer;
143
+ function decode(input: _m0.Reader | Uint8Array, length?: number): SceneEmote;
144
+ function fromJSON(object: any): SceneEmote;
145
+ function toJSON(message: SceneEmote): unknown;
146
+ function create<I extends Exact<DeepPartial<SceneEmote>, I>>(base?: I): SceneEmote;
147
+ function fromPartial<I extends Exact<DeepPartial<SceneEmote>, I>>(object: I): SceneEmote;
148
+ }
86
149
  export declare namespace AnnounceProfileVersion {
87
150
  function encode(message: AnnounceProfileVersion, writer?: _m0.Writer): _m0.Writer;
88
151
  function decode(input: _m0.Reader | Uint8Array, length?: number): AnnounceProfileVersion;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Voice = exports.Scene = exports.Chat = exports.ProfileResponse = exports.ProfileRequest = exports.AnnounceProfileVersion = exports.Position = exports.Packet = exports.voice_VoiceCodecToJSON = exports.voice_VoiceCodecFromJSON = exports.Voice_VoiceCodec = exports.protobufPackage = void 0;
6
+ exports.Voice = exports.Scene = exports.Chat = exports.ProfileResponse = exports.ProfileRequest = exports.AnnounceProfileVersion = exports.SceneEmote = exports.PlayerEmote = exports.Movement = exports.Position = exports.Packet = exports.voice_VoiceCodecToJSON = exports.voice_VoiceCodecFromJSON = exports.Voice_VoiceCodec = exports.protobufPackage = void 0;
7
7
  /* eslint-disable */
8
8
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
9
9
  exports.protobufPackage = "decentraland.kernel.comms.rfc4";
@@ -35,7 +35,7 @@ function voice_VoiceCodecToJSON(object) {
35
35
  }
36
36
  exports.voice_VoiceCodecToJSON = voice_VoiceCodecToJSON;
37
37
  function createBasePacket() {
38
- return { message: undefined };
38
+ return { message: undefined, protocolVersion: 0 };
39
39
  }
40
40
  var Packet;
41
41
  (function (Packet) {
@@ -63,6 +63,18 @@ var Packet;
63
63
  case "voice":
64
64
  Voice.encode(message.message.voice, writer.uint32(58).fork()).ldelim();
65
65
  break;
66
+ case "movement":
67
+ Movement.encode(message.message.movement, writer.uint32(66).fork()).ldelim();
68
+ break;
69
+ case "playerEmote":
70
+ PlayerEmote.encode(message.message.playerEmote, writer.uint32(74).fork()).ldelim();
71
+ break;
72
+ case "sceneEmote":
73
+ SceneEmote.encode(message.message.sceneEmote, writer.uint32(82).fork()).ldelim();
74
+ break;
75
+ }
76
+ if (message.protocolVersion !== 0) {
77
+ writer.uint32(88).uint32(message.protocolVersion);
66
78
  }
67
79
  return writer;
68
80
  }
@@ -122,6 +134,30 @@ var Packet;
122
134
  }
123
135
  message.message = { $case: "voice", voice: Voice.decode(reader, reader.uint32()) };
124
136
  continue;
137
+ case 8:
138
+ if (tag !== 66) {
139
+ break;
140
+ }
141
+ message.message = { $case: "movement", movement: Movement.decode(reader, reader.uint32()) };
142
+ continue;
143
+ case 9:
144
+ if (tag !== 74) {
145
+ break;
146
+ }
147
+ message.message = { $case: "playerEmote", playerEmote: PlayerEmote.decode(reader, reader.uint32()) };
148
+ continue;
149
+ case 10:
150
+ if (tag !== 82) {
151
+ break;
152
+ }
153
+ message.message = { $case: "sceneEmote", sceneEmote: SceneEmote.decode(reader, reader.uint32()) };
154
+ continue;
155
+ case 11:
156
+ if (tag !== 88) {
157
+ break;
158
+ }
159
+ message.protocolVersion = reader.uint32();
160
+ continue;
125
161
  }
126
162
  if ((tag & 7) === 4 || tag === 0) {
127
163
  break;
@@ -147,12 +183,19 @@ var Packet;
147
183
  ? { $case: "scene", scene: Scene.fromJSON(object.scene) }
148
184
  : isSet(object.voice)
149
185
  ? { $case: "voice", voice: Voice.fromJSON(object.voice) }
150
- : undefined,
186
+ : isSet(object.movement)
187
+ ? { $case: "movement", movement: Movement.fromJSON(object.movement) }
188
+ : isSet(object.playerEmote)
189
+ ? { $case: "playerEmote", playerEmote: PlayerEmote.fromJSON(object.playerEmote) }
190
+ : isSet(object.sceneEmote)
191
+ ? { $case: "sceneEmote", sceneEmote: SceneEmote.fromJSON(object.sceneEmote) }
192
+ : undefined,
193
+ protocolVersion: isSet(object.protocolVersion) ? Number(object.protocolVersion) : 0,
151
194
  };
152
195
  }
153
196
  Packet.fromJSON = fromJSON;
154
197
  function toJSON(message) {
155
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
198
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
156
199
  const obj = {};
157
200
  ((_a = message.message) === null || _a === void 0 ? void 0 : _a.$case) === "position" &&
158
201
  (obj.position = ((_b = message.message) === null || _b === void 0 ? void 0 : _b.position) ? Position.toJSON((_c = message.message) === null || _c === void 0 ? void 0 : _c.position) : undefined);
@@ -174,6 +217,13 @@ var Packet;
174
217
  (obj.scene = ((_s = message.message) === null || _s === void 0 ? void 0 : _s.scene) ? Scene.toJSON((_t = message.message) === null || _t === void 0 ? void 0 : _t.scene) : undefined);
175
218
  ((_u = message.message) === null || _u === void 0 ? void 0 : _u.$case) === "voice" &&
176
219
  (obj.voice = ((_v = message.message) === null || _v === void 0 ? void 0 : _v.voice) ? Voice.toJSON((_w = message.message) === null || _w === void 0 ? void 0 : _w.voice) : undefined);
220
+ ((_x = message.message) === null || _x === void 0 ? void 0 : _x.$case) === "movement" &&
221
+ (obj.movement = ((_y = message.message) === null || _y === void 0 ? void 0 : _y.movement) ? Movement.toJSON((_z = message.message) === null || _z === void 0 ? void 0 : _z.movement) : undefined);
222
+ ((_0 = message.message) === null || _0 === void 0 ? void 0 : _0.$case) === "playerEmote" &&
223
+ (obj.playerEmote = ((_1 = message.message) === null || _1 === void 0 ? void 0 : _1.playerEmote) ? PlayerEmote.toJSON((_2 = message.message) === null || _2 === void 0 ? void 0 : _2.playerEmote) : undefined);
224
+ ((_3 = message.message) === null || _3 === void 0 ? void 0 : _3.$case) === "sceneEmote" &&
225
+ (obj.sceneEmote = ((_4 = message.message) === null || _4 === void 0 ? void 0 : _4.sceneEmote) ? SceneEmote.toJSON((_5 = message.message) === null || _5 === void 0 ? void 0 : _5.sceneEmote) : undefined);
226
+ message.protocolVersion !== undefined && (obj.protocolVersion = Math.round(message.protocolVersion));
177
227
  return obj;
178
228
  }
179
229
  Packet.toJSON = toJSON;
@@ -182,7 +232,7 @@ var Packet;
182
232
  }
183
233
  Packet.create = create;
184
234
  function fromPartial(object) {
185
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
235
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
186
236
  const message = createBasePacket();
187
237
  if (((_a = object.message) === null || _a === void 0 ? void 0 : _a.$case) === "position" &&
188
238
  ((_b = object.message) === null || _b === void 0 ? void 0 : _b.position) !== undefined &&
@@ -222,6 +272,22 @@ var Packet;
222
272
  if (((_u = object.message) === null || _u === void 0 ? void 0 : _u.$case) === "voice" && ((_v = object.message) === null || _v === void 0 ? void 0 : _v.voice) !== undefined && ((_w = object.message) === null || _w === void 0 ? void 0 : _w.voice) !== null) {
223
273
  message.message = { $case: "voice", voice: Voice.fromPartial(object.message.voice) };
224
274
  }
275
+ if (((_x = object.message) === null || _x === void 0 ? void 0 : _x.$case) === "movement" &&
276
+ ((_y = object.message) === null || _y === void 0 ? void 0 : _y.movement) !== undefined &&
277
+ ((_z = object.message) === null || _z === void 0 ? void 0 : _z.movement) !== null) {
278
+ message.message = { $case: "movement", movement: Movement.fromPartial(object.message.movement) };
279
+ }
280
+ if (((_0 = object.message) === null || _0 === void 0 ? void 0 : _0.$case) === "playerEmote" &&
281
+ ((_1 = object.message) === null || _1 === void 0 ? void 0 : _1.playerEmote) !== undefined &&
282
+ ((_2 = object.message) === null || _2 === void 0 ? void 0 : _2.playerEmote) !== null) {
283
+ message.message = { $case: "playerEmote", playerEmote: PlayerEmote.fromPartial(object.message.playerEmote) };
284
+ }
285
+ if (((_3 = object.message) === null || _3 === void 0 ? void 0 : _3.$case) === "sceneEmote" &&
286
+ ((_4 = object.message) === null || _4 === void 0 ? void 0 : _4.sceneEmote) !== undefined &&
287
+ ((_5 = object.message) === null || _5 === void 0 ? void 0 : _5.sceneEmote) !== null) {
288
+ message.message = { $case: "sceneEmote", sceneEmote: SceneEmote.fromPartial(object.message.sceneEmote) };
289
+ }
290
+ message.protocolVersion = (_6 = object.protocolVersion) !== null && _6 !== void 0 ? _6 : 0;
225
291
  return message;
226
292
  }
227
293
  Packet.fromPartial = fromPartial;
@@ -368,6 +434,388 @@ var Position;
368
434
  }
369
435
  Position.fromPartial = fromPartial;
370
436
  })(Position || (exports.Position = Position = {}));
437
+ function createBaseMovement() {
438
+ return {
439
+ timestamp: 0,
440
+ positionX: 0,
441
+ positionY: 0,
442
+ positionZ: 0,
443
+ velocityX: 0,
444
+ velocityY: 0,
445
+ velocityZ: 0,
446
+ movementBlendValue: 0,
447
+ slideBlendValue: 0,
448
+ isGrounded: false,
449
+ isJumping: false,
450
+ isLongJump: false,
451
+ isLongFall: false,
452
+ isFalling: false,
453
+ isStunned: false,
454
+ };
455
+ }
456
+ var Movement;
457
+ (function (Movement) {
458
+ function encode(message, writer = minimal_1.default.Writer.create()) {
459
+ if (message.timestamp !== 0) {
460
+ writer.uint32(13).float(message.timestamp);
461
+ }
462
+ if (message.positionX !== 0) {
463
+ writer.uint32(21).float(message.positionX);
464
+ }
465
+ if (message.positionY !== 0) {
466
+ writer.uint32(29).float(message.positionY);
467
+ }
468
+ if (message.positionZ !== 0) {
469
+ writer.uint32(37).float(message.positionZ);
470
+ }
471
+ if (message.velocityX !== 0) {
472
+ writer.uint32(45).float(message.velocityX);
473
+ }
474
+ if (message.velocityY !== 0) {
475
+ writer.uint32(53).float(message.velocityY);
476
+ }
477
+ if (message.velocityZ !== 0) {
478
+ writer.uint32(61).float(message.velocityZ);
479
+ }
480
+ if (message.movementBlendValue !== 0) {
481
+ writer.uint32(69).float(message.movementBlendValue);
482
+ }
483
+ if (message.slideBlendValue !== 0) {
484
+ writer.uint32(77).float(message.slideBlendValue);
485
+ }
486
+ if (message.isGrounded === true) {
487
+ writer.uint32(80).bool(message.isGrounded);
488
+ }
489
+ if (message.isJumping === true) {
490
+ writer.uint32(88).bool(message.isJumping);
491
+ }
492
+ if (message.isLongJump === true) {
493
+ writer.uint32(96).bool(message.isLongJump);
494
+ }
495
+ if (message.isLongFall === true) {
496
+ writer.uint32(104).bool(message.isLongFall);
497
+ }
498
+ if (message.isFalling === true) {
499
+ writer.uint32(112).bool(message.isFalling);
500
+ }
501
+ if (message.isStunned === true) {
502
+ writer.uint32(120).bool(message.isStunned);
503
+ }
504
+ return writer;
505
+ }
506
+ Movement.encode = encode;
507
+ function decode(input, length) {
508
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
509
+ let end = length === undefined ? reader.len : reader.pos + length;
510
+ const message = createBaseMovement();
511
+ while (reader.pos < end) {
512
+ const tag = reader.uint32();
513
+ switch (tag >>> 3) {
514
+ case 1:
515
+ if (tag !== 13) {
516
+ break;
517
+ }
518
+ message.timestamp = reader.float();
519
+ continue;
520
+ case 2:
521
+ if (tag !== 21) {
522
+ break;
523
+ }
524
+ message.positionX = reader.float();
525
+ continue;
526
+ case 3:
527
+ if (tag !== 29) {
528
+ break;
529
+ }
530
+ message.positionY = reader.float();
531
+ continue;
532
+ case 4:
533
+ if (tag !== 37) {
534
+ break;
535
+ }
536
+ message.positionZ = reader.float();
537
+ continue;
538
+ case 5:
539
+ if (tag !== 45) {
540
+ break;
541
+ }
542
+ message.velocityX = reader.float();
543
+ continue;
544
+ case 6:
545
+ if (tag !== 53) {
546
+ break;
547
+ }
548
+ message.velocityY = reader.float();
549
+ continue;
550
+ case 7:
551
+ if (tag !== 61) {
552
+ break;
553
+ }
554
+ message.velocityZ = reader.float();
555
+ continue;
556
+ case 8:
557
+ if (tag !== 69) {
558
+ break;
559
+ }
560
+ message.movementBlendValue = reader.float();
561
+ continue;
562
+ case 9:
563
+ if (tag !== 77) {
564
+ break;
565
+ }
566
+ message.slideBlendValue = reader.float();
567
+ continue;
568
+ case 10:
569
+ if (tag !== 80) {
570
+ break;
571
+ }
572
+ message.isGrounded = reader.bool();
573
+ continue;
574
+ case 11:
575
+ if (tag !== 88) {
576
+ break;
577
+ }
578
+ message.isJumping = reader.bool();
579
+ continue;
580
+ case 12:
581
+ if (tag !== 96) {
582
+ break;
583
+ }
584
+ message.isLongJump = reader.bool();
585
+ continue;
586
+ case 13:
587
+ if (tag !== 104) {
588
+ break;
589
+ }
590
+ message.isLongFall = reader.bool();
591
+ continue;
592
+ case 14:
593
+ if (tag !== 112) {
594
+ break;
595
+ }
596
+ message.isFalling = reader.bool();
597
+ continue;
598
+ case 15:
599
+ if (tag !== 120) {
600
+ break;
601
+ }
602
+ message.isStunned = reader.bool();
603
+ continue;
604
+ }
605
+ if ((tag & 7) === 4 || tag === 0) {
606
+ break;
607
+ }
608
+ reader.skipType(tag & 7);
609
+ }
610
+ return message;
611
+ }
612
+ Movement.decode = decode;
613
+ function fromJSON(object) {
614
+ return {
615
+ timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
616
+ positionX: isSet(object.positionX) ? Number(object.positionX) : 0,
617
+ positionY: isSet(object.positionY) ? Number(object.positionY) : 0,
618
+ positionZ: isSet(object.positionZ) ? Number(object.positionZ) : 0,
619
+ velocityX: isSet(object.velocityX) ? Number(object.velocityX) : 0,
620
+ velocityY: isSet(object.velocityY) ? Number(object.velocityY) : 0,
621
+ velocityZ: isSet(object.velocityZ) ? Number(object.velocityZ) : 0,
622
+ movementBlendValue: isSet(object.movementBlendValue) ? Number(object.movementBlendValue) : 0,
623
+ slideBlendValue: isSet(object.slideBlendValue) ? Number(object.slideBlendValue) : 0,
624
+ isGrounded: isSet(object.isGrounded) ? Boolean(object.isGrounded) : false,
625
+ isJumping: isSet(object.isJumping) ? Boolean(object.isJumping) : false,
626
+ isLongJump: isSet(object.isLongJump) ? Boolean(object.isLongJump) : false,
627
+ isLongFall: isSet(object.isLongFall) ? Boolean(object.isLongFall) : false,
628
+ isFalling: isSet(object.isFalling) ? Boolean(object.isFalling) : false,
629
+ isStunned: isSet(object.isStunned) ? Boolean(object.isStunned) : false,
630
+ };
631
+ }
632
+ Movement.fromJSON = fromJSON;
633
+ function toJSON(message) {
634
+ const obj = {};
635
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp);
636
+ message.positionX !== undefined && (obj.positionX = message.positionX);
637
+ message.positionY !== undefined && (obj.positionY = message.positionY);
638
+ message.positionZ !== undefined && (obj.positionZ = message.positionZ);
639
+ message.velocityX !== undefined && (obj.velocityX = message.velocityX);
640
+ message.velocityY !== undefined && (obj.velocityY = message.velocityY);
641
+ message.velocityZ !== undefined && (obj.velocityZ = message.velocityZ);
642
+ message.movementBlendValue !== undefined && (obj.movementBlendValue = message.movementBlendValue);
643
+ message.slideBlendValue !== undefined && (obj.slideBlendValue = message.slideBlendValue);
644
+ message.isGrounded !== undefined && (obj.isGrounded = message.isGrounded);
645
+ message.isJumping !== undefined && (obj.isJumping = message.isJumping);
646
+ message.isLongJump !== undefined && (obj.isLongJump = message.isLongJump);
647
+ message.isLongFall !== undefined && (obj.isLongFall = message.isLongFall);
648
+ message.isFalling !== undefined && (obj.isFalling = message.isFalling);
649
+ message.isStunned !== undefined && (obj.isStunned = message.isStunned);
650
+ return obj;
651
+ }
652
+ Movement.toJSON = toJSON;
653
+ function create(base) {
654
+ return Movement.fromPartial(base !== null && base !== void 0 ? base : {});
655
+ }
656
+ Movement.create = create;
657
+ function fromPartial(object) {
658
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
659
+ const message = createBaseMovement();
660
+ message.timestamp = (_a = object.timestamp) !== null && _a !== void 0 ? _a : 0;
661
+ message.positionX = (_b = object.positionX) !== null && _b !== void 0 ? _b : 0;
662
+ message.positionY = (_c = object.positionY) !== null && _c !== void 0 ? _c : 0;
663
+ message.positionZ = (_d = object.positionZ) !== null && _d !== void 0 ? _d : 0;
664
+ message.velocityX = (_e = object.velocityX) !== null && _e !== void 0 ? _e : 0;
665
+ message.velocityY = (_f = object.velocityY) !== null && _f !== void 0 ? _f : 0;
666
+ message.velocityZ = (_g = object.velocityZ) !== null && _g !== void 0 ? _g : 0;
667
+ message.movementBlendValue = (_h = object.movementBlendValue) !== null && _h !== void 0 ? _h : 0;
668
+ message.slideBlendValue = (_j = object.slideBlendValue) !== null && _j !== void 0 ? _j : 0;
669
+ message.isGrounded = (_k = object.isGrounded) !== null && _k !== void 0 ? _k : false;
670
+ message.isJumping = (_l = object.isJumping) !== null && _l !== void 0 ? _l : false;
671
+ message.isLongJump = (_m = object.isLongJump) !== null && _m !== void 0 ? _m : false;
672
+ message.isLongFall = (_o = object.isLongFall) !== null && _o !== void 0 ? _o : false;
673
+ message.isFalling = (_p = object.isFalling) !== null && _p !== void 0 ? _p : false;
674
+ message.isStunned = (_q = object.isStunned) !== null && _q !== void 0 ? _q : false;
675
+ return message;
676
+ }
677
+ Movement.fromPartial = fromPartial;
678
+ })(Movement || (exports.Movement = Movement = {}));
679
+ function createBasePlayerEmote() {
680
+ return { incrementalId: 0, urn: "" };
681
+ }
682
+ var PlayerEmote;
683
+ (function (PlayerEmote) {
684
+ function encode(message, writer = minimal_1.default.Writer.create()) {
685
+ if (message.incrementalId !== 0) {
686
+ writer.uint32(8).uint32(message.incrementalId);
687
+ }
688
+ if (message.urn !== "") {
689
+ writer.uint32(18).string(message.urn);
690
+ }
691
+ return writer;
692
+ }
693
+ PlayerEmote.encode = encode;
694
+ function decode(input, length) {
695
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
696
+ let end = length === undefined ? reader.len : reader.pos + length;
697
+ const message = createBasePlayerEmote();
698
+ while (reader.pos < end) {
699
+ const tag = reader.uint32();
700
+ switch (tag >>> 3) {
701
+ case 1:
702
+ if (tag !== 8) {
703
+ break;
704
+ }
705
+ message.incrementalId = reader.uint32();
706
+ continue;
707
+ case 2:
708
+ if (tag !== 18) {
709
+ break;
710
+ }
711
+ message.urn = reader.string();
712
+ continue;
713
+ }
714
+ if ((tag & 7) === 4 || tag === 0) {
715
+ break;
716
+ }
717
+ reader.skipType(tag & 7);
718
+ }
719
+ return message;
720
+ }
721
+ PlayerEmote.decode = decode;
722
+ function fromJSON(object) {
723
+ return {
724
+ incrementalId: isSet(object.incrementalId) ? Number(object.incrementalId) : 0,
725
+ urn: isSet(object.urn) ? String(object.urn) : "",
726
+ };
727
+ }
728
+ PlayerEmote.fromJSON = fromJSON;
729
+ function toJSON(message) {
730
+ const obj = {};
731
+ message.incrementalId !== undefined && (obj.incrementalId = Math.round(message.incrementalId));
732
+ message.urn !== undefined && (obj.urn = message.urn);
733
+ return obj;
734
+ }
735
+ PlayerEmote.toJSON = toJSON;
736
+ function create(base) {
737
+ return PlayerEmote.fromPartial(base !== null && base !== void 0 ? base : {});
738
+ }
739
+ PlayerEmote.create = create;
740
+ function fromPartial(object) {
741
+ var _a, _b;
742
+ const message = createBasePlayerEmote();
743
+ message.incrementalId = (_a = object.incrementalId) !== null && _a !== void 0 ? _a : 0;
744
+ message.urn = (_b = object.urn) !== null && _b !== void 0 ? _b : "";
745
+ return message;
746
+ }
747
+ PlayerEmote.fromPartial = fromPartial;
748
+ })(PlayerEmote || (exports.PlayerEmote = PlayerEmote = {}));
749
+ function createBaseSceneEmote() {
750
+ return { sceneEntityId: "", source: "" };
751
+ }
752
+ var SceneEmote;
753
+ (function (SceneEmote) {
754
+ function encode(message, writer = minimal_1.default.Writer.create()) {
755
+ if (message.sceneEntityId !== "") {
756
+ writer.uint32(10).string(message.sceneEntityId);
757
+ }
758
+ if (message.source !== "") {
759
+ writer.uint32(18).string(message.source);
760
+ }
761
+ return writer;
762
+ }
763
+ SceneEmote.encode = encode;
764
+ function decode(input, length) {
765
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
766
+ let end = length === undefined ? reader.len : reader.pos + length;
767
+ const message = createBaseSceneEmote();
768
+ while (reader.pos < end) {
769
+ const tag = reader.uint32();
770
+ switch (tag >>> 3) {
771
+ case 1:
772
+ if (tag !== 10) {
773
+ break;
774
+ }
775
+ message.sceneEntityId = reader.string();
776
+ continue;
777
+ case 2:
778
+ if (tag !== 18) {
779
+ break;
780
+ }
781
+ message.source = reader.string();
782
+ continue;
783
+ }
784
+ if ((tag & 7) === 4 || tag === 0) {
785
+ break;
786
+ }
787
+ reader.skipType(tag & 7);
788
+ }
789
+ return message;
790
+ }
791
+ SceneEmote.decode = decode;
792
+ function fromJSON(object) {
793
+ return {
794
+ sceneEntityId: isSet(object.sceneEntityId) ? String(object.sceneEntityId) : "",
795
+ source: isSet(object.source) ? String(object.source) : "",
796
+ };
797
+ }
798
+ SceneEmote.fromJSON = fromJSON;
799
+ function toJSON(message) {
800
+ const obj = {};
801
+ message.sceneEntityId !== undefined && (obj.sceneEntityId = message.sceneEntityId);
802
+ message.source !== undefined && (obj.source = message.source);
803
+ return obj;
804
+ }
805
+ SceneEmote.toJSON = toJSON;
806
+ function create(base) {
807
+ return SceneEmote.fromPartial(base !== null && base !== void 0 ? base : {});
808
+ }
809
+ SceneEmote.create = create;
810
+ function fromPartial(object) {
811
+ var _a, _b;
812
+ const message = createBaseSceneEmote();
813
+ message.sceneEntityId = (_a = object.sceneEntityId) !== null && _a !== void 0 ? _a : "";
814
+ message.source = (_b = object.source) !== null && _b !== void 0 ? _b : "";
815
+ return message;
816
+ }
817
+ SceneEmote.fromPartial = fromPartial;
818
+ })(SceneEmote || (exports.SceneEmote = SceneEmote = {}));
371
819
  function createBaseAnnounceProfileVersion() {
372
820
  return { profileVersion: 0 };
373
821
  }