@dcl/protocol 1.0.0-22578238676.commit-38e6cb5 → 1.0.0-22583117520.commit-28394c4

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.
Files changed (110) hide show
  1. package/out-js/decentraland/common/texture.gen.d.ts +0 -18
  2. package/out-js/decentraland/common/texture.gen.js +4 -104
  3. package/out-js/decentraland/common/texture.gen.js.map +1 -1
  4. package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +0 -70
  5. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +1 -228
  6. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
  7. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +0 -2
  8. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +2 -19
  9. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
  10. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +0 -41
  11. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +3 -241
  12. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
  13. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +0 -2
  14. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +1 -19
  15. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
  16. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +1 -35
  17. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +3 -172
  18. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
  19. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +0 -4
  20. package/out-js/decentraland/sdk/components/common/input_action.gen.js +0 -24
  21. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
  22. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +0 -19
  23. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +3 -90
  24. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
  25. package/out-js/decentraland/sdk/components/material.gen.d.ts +0 -20
  26. package/out-js/decentraland/sdk/components/material.gen.js +2 -86
  27. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
  28. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +0 -18
  29. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +4 -90
  30. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
  31. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +3 -19
  32. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +4 -90
  33. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
  34. package/out-js/decentraland/sdk/components/raycast.gen.d.ts +0 -13
  35. package/out-js/decentraland/sdk/components/raycast.gen.js +2 -64
  36. package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
  37. package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +0 -4
  38. package/out-js/decentraland/sdk/components/ui_text.gen.js +1 -30
  39. package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
  40. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +0 -33
  41. package/out-js/decentraland/sdk/components/ui_transform.gen.js +3 -176
  42. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
  43. package/out-ts/decentraland/common/texture.gen.ts +4 -119
  44. package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +0 -242
  45. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +1 -20
  46. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +1 -292
  47. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +1 -23
  48. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +2 -218
  49. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +0 -24
  50. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +2 -108
  51. package/out-ts/decentraland/sdk/components/material.gen.ts +1 -102
  52. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +0 -99
  53. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +3 -100
  54. package/out-ts/decentraland/sdk/components/raycast.gen.ts +1 -73
  55. package/out-ts/decentraland/sdk/components/ui_text.gen.ts +1 -40
  56. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +0 -193
  57. package/package.json +3 -6
  58. package/proto/decentraland/common/texture.proto +1 -8
  59. package/proto/decentraland/kernel/apis/restricted_actions.proto +0 -22
  60. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +1 -2
  61. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +0 -21
  62. package/proto/decentraland/sdk/components/avatar_shape.proto +0 -1
  63. package/proto/decentraland/sdk/components/camera_mode_area.proto +3 -22
  64. package/proto/decentraland/sdk/components/common/input_action.proto +0 -4
  65. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +0 -13
  66. package/proto/decentraland/sdk/components/material.proto +1 -13
  67. package/proto/decentraland/sdk/components/mesh_collider.proto +0 -7
  68. package/proto/decentraland/sdk/components/mesh_renderer.proto +3 -8
  69. package/proto/decentraland/sdk/components/physics_combined_force.proto +21 -0
  70. package/proto/decentraland/sdk/components/physics_combined_impulse.proto +23 -0
  71. package/proto/decentraland/sdk/components/primary_pointer_info.proto +0 -5
  72. package/proto/decentraland/sdk/components/raycast.proto +0 -13
  73. package/proto/decentraland/sdk/components/ui_text.proto +0 -3
  74. package/proto/decentraland/sdk/components/ui_transform.proto +0 -20
  75. package/public/sdk-components.proto +0 -4
  76. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +0 -45
  77. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +0 -138
  78. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +0 -1
  79. package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +0 -34
  80. package/out-js/decentraland/sdk/components/avatar_movement.gen.js +0 -101
  81. package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +0 -1
  82. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +0 -44
  83. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +0 -178
  84. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +0 -1
  85. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +0 -66
  86. package/out-js/decentraland/sdk/components/gltf_node.gen.js +0 -69
  87. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +0 -1
  88. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +0 -43
  89. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +0 -122
  90. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +0 -1
  91. package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +0 -50
  92. package/out-js/decentraland/sdk/components/input_modifier.gen.js +0 -207
  93. package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +0 -1
  94. package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +0 -183
  95. package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +0 -119
  96. package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +0 -210
  97. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +0 -116
  98. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +0 -139
  99. package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +0 -235
  100. package/proto/decentraland/sdk/components/avatar_locomotion_settings.proto +0 -18
  101. package/proto/decentraland/sdk/components/avatar_movement.proto +0 -45
  102. package/proto/decentraland/sdk/components/avatar_movement_info.proto +0 -20
  103. package/proto/decentraland/sdk/components/camera_layer.proto +0 -30
  104. package/proto/decentraland/sdk/components/camera_layers.proto +0 -11
  105. package/proto/decentraland/sdk/components/global_light.proto +0 -22
  106. package/proto/decentraland/sdk/components/gltf_node.proto +0 -42
  107. package/proto/decentraland/sdk/components/gltf_node_state.proto +0 -20
  108. package/proto/decentraland/sdk/components/texture_camera.proto +0 -46
  109. package/proto/decentraland/sdk/components/ui_canvas.proto +0 -16
  110. package/proto/decentraland/sdk/components/ui_scroll_result.proto +0 -12
@@ -1,183 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
-
4
- export const protobufPackage = "decentraland.sdk.components";
5
-
6
- /**
7
- * The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
8
- * as the avatar movement speed, jump height etc.
9
- */
10
- export interface PBAvatarLocomotionSettings {
11
- /** Maximum speed when walking (in meters per second) */
12
- walkSpeed?:
13
- | number
14
- | undefined;
15
- /** Maximum speed when jogging (in meters per second) */
16
- jogSpeed?:
17
- | number
18
- | undefined;
19
- /** Maximum speed when running (in meters per second) */
20
- runSpeed?:
21
- | number
22
- | undefined;
23
- /** Height of a regular jump (in meters) */
24
- jumpHeight?:
25
- | number
26
- | undefined;
27
- /** Height of a jump while running (in meters) */
28
- runJumpHeight?:
29
- | number
30
- | undefined;
31
- /** Cooldown time after a hard landing before the avatar can move again (in seconds) */
32
- hardLandingCooldown?: number | undefined;
33
- }
34
-
35
- function createBasePBAvatarLocomotionSettings(): PBAvatarLocomotionSettings {
36
- return {
37
- walkSpeed: undefined,
38
- jogSpeed: undefined,
39
- runSpeed: undefined,
40
- jumpHeight: undefined,
41
- runJumpHeight: undefined,
42
- hardLandingCooldown: undefined,
43
- };
44
- }
45
-
46
- export namespace PBAvatarLocomotionSettings {
47
- export function encode(message: PBAvatarLocomotionSettings, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
48
- if (message.walkSpeed !== undefined) {
49
- writer.uint32(13).float(message.walkSpeed);
50
- }
51
- if (message.jogSpeed !== undefined) {
52
- writer.uint32(21).float(message.jogSpeed);
53
- }
54
- if (message.runSpeed !== undefined) {
55
- writer.uint32(29).float(message.runSpeed);
56
- }
57
- if (message.jumpHeight !== undefined) {
58
- writer.uint32(37).float(message.jumpHeight);
59
- }
60
- if (message.runJumpHeight !== undefined) {
61
- writer.uint32(45).float(message.runJumpHeight);
62
- }
63
- if (message.hardLandingCooldown !== undefined) {
64
- writer.uint32(53).float(message.hardLandingCooldown);
65
- }
66
- return writer;
67
- }
68
-
69
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarLocomotionSettings {
70
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
71
- let end = length === undefined ? reader.len : reader.pos + length;
72
- const message = createBasePBAvatarLocomotionSettings();
73
- while (reader.pos < end) {
74
- const tag = reader.uint32();
75
- switch (tag >>> 3) {
76
- case 1:
77
- if (tag !== 13) {
78
- break;
79
- }
80
-
81
- message.walkSpeed = reader.float();
82
- continue;
83
- case 2:
84
- if (tag !== 21) {
85
- break;
86
- }
87
-
88
- message.jogSpeed = reader.float();
89
- continue;
90
- case 3:
91
- if (tag !== 29) {
92
- break;
93
- }
94
-
95
- message.runSpeed = reader.float();
96
- continue;
97
- case 4:
98
- if (tag !== 37) {
99
- break;
100
- }
101
-
102
- message.jumpHeight = reader.float();
103
- continue;
104
- case 5:
105
- if (tag !== 45) {
106
- break;
107
- }
108
-
109
- message.runJumpHeight = reader.float();
110
- continue;
111
- case 6:
112
- if (tag !== 53) {
113
- break;
114
- }
115
-
116
- message.hardLandingCooldown = reader.float();
117
- continue;
118
- }
119
- if ((tag & 7) === 4 || tag === 0) {
120
- break;
121
- }
122
- reader.skipType(tag & 7);
123
- }
124
- return message;
125
- }
126
-
127
- export function fromJSON(object: any): PBAvatarLocomotionSettings {
128
- return {
129
- walkSpeed: isSet(object.walkSpeed) ? Number(object.walkSpeed) : undefined,
130
- jogSpeed: isSet(object.jogSpeed) ? Number(object.jogSpeed) : undefined,
131
- runSpeed: isSet(object.runSpeed) ? Number(object.runSpeed) : undefined,
132
- jumpHeight: isSet(object.jumpHeight) ? Number(object.jumpHeight) : undefined,
133
- runJumpHeight: isSet(object.runJumpHeight) ? Number(object.runJumpHeight) : undefined,
134
- hardLandingCooldown: isSet(object.hardLandingCooldown) ? Number(object.hardLandingCooldown) : undefined,
135
- };
136
- }
137
-
138
- export function toJSON(message: PBAvatarLocomotionSettings): unknown {
139
- const obj: any = {};
140
- message.walkSpeed !== undefined && (obj.walkSpeed = message.walkSpeed);
141
- message.jogSpeed !== undefined && (obj.jogSpeed = message.jogSpeed);
142
- message.runSpeed !== undefined && (obj.runSpeed = message.runSpeed);
143
- message.jumpHeight !== undefined && (obj.jumpHeight = message.jumpHeight);
144
- message.runJumpHeight !== undefined && (obj.runJumpHeight = message.runJumpHeight);
145
- message.hardLandingCooldown !== undefined && (obj.hardLandingCooldown = message.hardLandingCooldown);
146
- return obj;
147
- }
148
-
149
- export function create<I extends Exact<DeepPartial<PBAvatarLocomotionSettings>, I>>(
150
- base?: I,
151
- ): PBAvatarLocomotionSettings {
152
- return PBAvatarLocomotionSettings.fromPartial(base ?? {});
153
- }
154
-
155
- export function fromPartial<I extends Exact<DeepPartial<PBAvatarLocomotionSettings>, I>>(
156
- object: I,
157
- ): PBAvatarLocomotionSettings {
158
- const message = createBasePBAvatarLocomotionSettings();
159
- message.walkSpeed = object.walkSpeed ?? undefined;
160
- message.jogSpeed = object.jogSpeed ?? undefined;
161
- message.runSpeed = object.runSpeed ?? undefined;
162
- message.jumpHeight = object.jumpHeight ?? undefined;
163
- message.runJumpHeight = object.runJumpHeight ?? undefined;
164
- message.hardLandingCooldown = object.hardLandingCooldown ?? undefined;
165
- return message;
166
- }
167
- }
168
-
169
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
170
-
171
- export type DeepPartial<T> = T extends Builtin ? T
172
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
173
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
174
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
175
- : Partial<T>;
176
-
177
- type KeysOfUnion<T> = T extends T ? keyof T : never;
178
- export type Exact<P, I extends P> = P extends Builtin ? P
179
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
180
-
181
- function isSet(value: any): boolean {
182
- return value !== null && value !== undefined;
183
- }
@@ -1,119 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
- import { Vector3 } from "../../common/vectors.gen";
4
-
5
- export const protobufPackage = "decentraland.sdk.components";
6
-
7
- export interface PBAvatarMovement {
8
- velocity:
9
- | Vector3
10
- | undefined;
11
- /** 0-360, we don't allow pitch/roll */
12
- orientation: number;
13
- groundDirection?: Vector3 | undefined;
14
- }
15
-
16
- function createBasePBAvatarMovement(): PBAvatarMovement {
17
- return { velocity: undefined, orientation: 0, groundDirection: undefined };
18
- }
19
-
20
- export namespace PBAvatarMovement {
21
- export function encode(message: PBAvatarMovement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
22
- if (message.velocity !== undefined) {
23
- Vector3.encode(message.velocity, writer.uint32(10).fork()).ldelim();
24
- }
25
- if (message.orientation !== 0) {
26
- writer.uint32(21).float(message.orientation);
27
- }
28
- if (message.groundDirection !== undefined) {
29
- Vector3.encode(message.groundDirection, writer.uint32(26).fork()).ldelim();
30
- }
31
- return writer;
32
- }
33
-
34
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarMovement {
35
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
36
- let end = length === undefined ? reader.len : reader.pos + length;
37
- const message = createBasePBAvatarMovement();
38
- while (reader.pos < end) {
39
- const tag = reader.uint32();
40
- switch (tag >>> 3) {
41
- case 1:
42
- if (tag !== 10) {
43
- break;
44
- }
45
-
46
- message.velocity = Vector3.decode(reader, reader.uint32());
47
- continue;
48
- case 2:
49
- if (tag !== 21) {
50
- break;
51
- }
52
-
53
- message.orientation = reader.float();
54
- continue;
55
- case 3:
56
- if (tag !== 26) {
57
- break;
58
- }
59
-
60
- message.groundDirection = Vector3.decode(reader, reader.uint32());
61
- continue;
62
- }
63
- if ((tag & 7) === 4 || tag === 0) {
64
- break;
65
- }
66
- reader.skipType(tag & 7);
67
- }
68
- return message;
69
- }
70
-
71
- export function fromJSON(object: any): PBAvatarMovement {
72
- return {
73
- velocity: isSet(object.velocity) ? Vector3.fromJSON(object.velocity) : undefined,
74
- orientation: isSet(object.orientation) ? Number(object.orientation) : 0,
75
- groundDirection: isSet(object.groundDirection) ? Vector3.fromJSON(object.groundDirection) : undefined,
76
- };
77
- }
78
-
79
- export function toJSON(message: PBAvatarMovement): unknown {
80
- const obj: any = {};
81
- message.velocity !== undefined && (obj.velocity = message.velocity ? Vector3.toJSON(message.velocity) : undefined);
82
- message.orientation !== undefined && (obj.orientation = message.orientation);
83
- message.groundDirection !== undefined &&
84
- (obj.groundDirection = message.groundDirection ? Vector3.toJSON(message.groundDirection) : undefined);
85
- return obj;
86
- }
87
-
88
- export function create<I extends Exact<DeepPartial<PBAvatarMovement>, I>>(base?: I): PBAvatarMovement {
89
- return PBAvatarMovement.fromPartial(base ?? {});
90
- }
91
-
92
- export function fromPartial<I extends Exact<DeepPartial<PBAvatarMovement>, I>>(object: I): PBAvatarMovement {
93
- const message = createBasePBAvatarMovement();
94
- message.velocity = (object.velocity !== undefined && object.velocity !== null)
95
- ? Vector3.fromPartial(object.velocity)
96
- : undefined;
97
- message.orientation = object.orientation ?? 0;
98
- message.groundDirection = (object.groundDirection !== undefined && object.groundDirection !== null)
99
- ? Vector3.fromPartial(object.groundDirection)
100
- : undefined;
101
- return message;
102
- }
103
- }
104
-
105
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
106
-
107
- export type DeepPartial<T> = T extends Builtin ? T
108
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
109
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
110
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
111
- : Partial<T>;
112
-
113
- type KeysOfUnion<T> = T extends T ? keyof T : never;
114
- export type Exact<P, I extends P> = P extends Builtin ? P
115
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
116
-
117
- function isSet(value: any): boolean {
118
- return value !== null && value !== undefined;
119
- }
@@ -1,210 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
- import { Vector3 } from "../../common/vectors.gen";
4
- import { PBAvatarLocomotionSettings } from "./avatar_locomotion_settings.gen";
5
- import { PBInputModifier } from "./input_modifier.gen";
6
-
7
- export const protobufPackage = "decentraland.sdk.components";
8
-
9
- export interface PBAvatarMovementInfo {
10
- /** the length of time the current step velocity will apply for */
11
- stepTime: number;
12
- /** the length of time the previous step velocity applied for */
13
- previousStepTime: number;
14
- /** the velocity requested for the previous frame */
15
- requestedVelocity:
16
- | Vector3
17
- | undefined;
18
- /** the resulting velocity taking collisions into account */
19
- actualVelocity:
20
- | Vector3
21
- | undefined;
22
- /** the velocity imparted by movement of the "ground" platform or pushing from other moving colliders */
23
- externalVelocity: Vector3 | undefined;
24
- activeAvatarLocomotionSettings: PBAvatarLocomotionSettings | undefined;
25
- activeInputModifier: PBInputModifier | undefined;
26
- }
27
-
28
- function createBasePBAvatarMovementInfo(): PBAvatarMovementInfo {
29
- return {
30
- stepTime: 0,
31
- previousStepTime: 0,
32
- requestedVelocity: undefined,
33
- actualVelocity: undefined,
34
- externalVelocity: undefined,
35
- activeAvatarLocomotionSettings: undefined,
36
- activeInputModifier: undefined,
37
- };
38
- }
39
-
40
- export namespace PBAvatarMovementInfo {
41
- export function encode(message: PBAvatarMovementInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
42
- if (message.stepTime !== 0) {
43
- writer.uint32(13).float(message.stepTime);
44
- }
45
- if (message.previousStepTime !== 0) {
46
- writer.uint32(21).float(message.previousStepTime);
47
- }
48
- if (message.requestedVelocity !== undefined) {
49
- Vector3.encode(message.requestedVelocity, writer.uint32(26).fork()).ldelim();
50
- }
51
- if (message.actualVelocity !== undefined) {
52
- Vector3.encode(message.actualVelocity, writer.uint32(34).fork()).ldelim();
53
- }
54
- if (message.externalVelocity !== undefined) {
55
- Vector3.encode(message.externalVelocity, writer.uint32(42).fork()).ldelim();
56
- }
57
- if (message.activeAvatarLocomotionSettings !== undefined) {
58
- PBAvatarLocomotionSettings.encode(message.activeAvatarLocomotionSettings, writer.uint32(50).fork()).ldelim();
59
- }
60
- if (message.activeInputModifier !== undefined) {
61
- PBInputModifier.encode(message.activeInputModifier, writer.uint32(58).fork()).ldelim();
62
- }
63
- return writer;
64
- }
65
-
66
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarMovementInfo {
67
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
68
- let end = length === undefined ? reader.len : reader.pos + length;
69
- const message = createBasePBAvatarMovementInfo();
70
- while (reader.pos < end) {
71
- const tag = reader.uint32();
72
- switch (tag >>> 3) {
73
- case 1:
74
- if (tag !== 13) {
75
- break;
76
- }
77
-
78
- message.stepTime = reader.float();
79
- continue;
80
- case 2:
81
- if (tag !== 21) {
82
- break;
83
- }
84
-
85
- message.previousStepTime = reader.float();
86
- continue;
87
- case 3:
88
- if (tag !== 26) {
89
- break;
90
- }
91
-
92
- message.requestedVelocity = Vector3.decode(reader, reader.uint32());
93
- continue;
94
- case 4:
95
- if (tag !== 34) {
96
- break;
97
- }
98
-
99
- message.actualVelocity = Vector3.decode(reader, reader.uint32());
100
- continue;
101
- case 5:
102
- if (tag !== 42) {
103
- break;
104
- }
105
-
106
- message.externalVelocity = Vector3.decode(reader, reader.uint32());
107
- continue;
108
- case 6:
109
- if (tag !== 50) {
110
- break;
111
- }
112
-
113
- message.activeAvatarLocomotionSettings = PBAvatarLocomotionSettings.decode(reader, reader.uint32());
114
- continue;
115
- case 7:
116
- if (tag !== 58) {
117
- break;
118
- }
119
-
120
- message.activeInputModifier = PBInputModifier.decode(reader, reader.uint32());
121
- continue;
122
- }
123
- if ((tag & 7) === 4 || tag === 0) {
124
- break;
125
- }
126
- reader.skipType(tag & 7);
127
- }
128
- return message;
129
- }
130
-
131
- export function fromJSON(object: any): PBAvatarMovementInfo {
132
- return {
133
- stepTime: isSet(object.stepTime) ? Number(object.stepTime) : 0,
134
- previousStepTime: isSet(object.previousStepTime) ? Number(object.previousStepTime) : 0,
135
- requestedVelocity: isSet(object.requestedVelocity) ? Vector3.fromJSON(object.requestedVelocity) : undefined,
136
- actualVelocity: isSet(object.actualVelocity) ? Vector3.fromJSON(object.actualVelocity) : undefined,
137
- externalVelocity: isSet(object.externalVelocity) ? Vector3.fromJSON(object.externalVelocity) : undefined,
138
- activeAvatarLocomotionSettings: isSet(object.activeAvatarLocomotionSettings)
139
- ? PBAvatarLocomotionSettings.fromJSON(object.activeAvatarLocomotionSettings)
140
- : undefined,
141
- activeInputModifier: isSet(object.activeInputModifier)
142
- ? PBInputModifier.fromJSON(object.activeInputModifier)
143
- : undefined,
144
- };
145
- }
146
-
147
- export function toJSON(message: PBAvatarMovementInfo): unknown {
148
- const obj: any = {};
149
- message.stepTime !== undefined && (obj.stepTime = message.stepTime);
150
- message.previousStepTime !== undefined && (obj.previousStepTime = message.previousStepTime);
151
- message.requestedVelocity !== undefined &&
152
- (obj.requestedVelocity = message.requestedVelocity ? Vector3.toJSON(message.requestedVelocity) : undefined);
153
- message.actualVelocity !== undefined &&
154
- (obj.actualVelocity = message.actualVelocity ? Vector3.toJSON(message.actualVelocity) : undefined);
155
- message.externalVelocity !== undefined &&
156
- (obj.externalVelocity = message.externalVelocity ? Vector3.toJSON(message.externalVelocity) : undefined);
157
- message.activeAvatarLocomotionSettings !== undefined &&
158
- (obj.activeAvatarLocomotionSettings = message.activeAvatarLocomotionSettings
159
- ? PBAvatarLocomotionSettings.toJSON(message.activeAvatarLocomotionSettings)
160
- : undefined);
161
- message.activeInputModifier !== undefined &&
162
- (obj.activeInputModifier = message.activeInputModifier
163
- ? PBInputModifier.toJSON(message.activeInputModifier)
164
- : undefined);
165
- return obj;
166
- }
167
-
168
- export function create<I extends Exact<DeepPartial<PBAvatarMovementInfo>, I>>(base?: I): PBAvatarMovementInfo {
169
- return PBAvatarMovementInfo.fromPartial(base ?? {});
170
- }
171
-
172
- export function fromPartial<I extends Exact<DeepPartial<PBAvatarMovementInfo>, I>>(object: I): PBAvatarMovementInfo {
173
- const message = createBasePBAvatarMovementInfo();
174
- message.stepTime = object.stepTime ?? 0;
175
- message.previousStepTime = object.previousStepTime ?? 0;
176
- message.requestedVelocity = (object.requestedVelocity !== undefined && object.requestedVelocity !== null)
177
- ? Vector3.fromPartial(object.requestedVelocity)
178
- : undefined;
179
- message.actualVelocity = (object.actualVelocity !== undefined && object.actualVelocity !== null)
180
- ? Vector3.fromPartial(object.actualVelocity)
181
- : undefined;
182
- message.externalVelocity = (object.externalVelocity !== undefined && object.externalVelocity !== null)
183
- ? Vector3.fromPartial(object.externalVelocity)
184
- : undefined;
185
- message.activeAvatarLocomotionSettings =
186
- (object.activeAvatarLocomotionSettings !== undefined && object.activeAvatarLocomotionSettings !== null)
187
- ? PBAvatarLocomotionSettings.fromPartial(object.activeAvatarLocomotionSettings)
188
- : undefined;
189
- message.activeInputModifier = (object.activeInputModifier !== undefined && object.activeInputModifier !== null)
190
- ? PBInputModifier.fromPartial(object.activeInputModifier)
191
- : undefined;
192
- return message;
193
- }
194
- }
195
-
196
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
197
-
198
- export type DeepPartial<T> = T extends Builtin ? T
199
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
200
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
201
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
202
- : Partial<T>;
203
-
204
- type KeysOfUnion<T> = T extends T ? keyof T : never;
205
- export type Exact<P, I extends P> = P extends Builtin ? P
206
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
207
-
208
- function isSet(value: any): boolean {
209
- return value !== null && value !== undefined;
210
- }
@@ -1,116 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
-
4
- export const protobufPackage = "decentraland.sdk.components";
5
-
6
- /**
7
- * a GltfNode links a scene entity with a node from within a gltf, allowing the scene to inspect it or modify it.
8
- * This component must be added to a direct child of an entity with a PBGltfContainer component, or
9
- * to a direct child of another entity with a GltfNode component, and the referenced gltf node must be a descendent of the gltf node
10
- * in the parent.
11
- * The name must match the path of one of the nodes within the Gltf. These are available on the GltfContainerLoadingState component.
12
- *
13
- * The renderer will attach a PBGltfNodeState to the entity describing the state. Once the state is `GNS_READY`,
14
- * - the `Transform` will be updated to match the position of the node within the gltf (relative to the gltf root, or the parent node),
15
- * - a `MeshRenderer` with a GltfMesh mesh type will be added (if the gltf node has a mesh).
16
- * - a `MeshCollider` with a GltfMesh mesh type will be added (if the gltf node has a collider).
17
- * - a `Material` component including a GltfMaterial reference will be added (if the gltf node has a material).
18
- *
19
- * After creation, if an animation moves the node, the `Transform` will be updated.
20
- *
21
- * From the scene, you can modify various components to alter the gltf node:
22
- * - modifying the `Transform` position/rotation/scale will move the node. The position is interpreted relative to the gltf root (or parent node),
23
- * regardless of any intermediate gltf node hierarchy.
24
- * If an animation is playing, the animation takes priority and the scene entity's position will be updated to match the animation.
25
- * - `Visibility` can be added to hide or show the node and it's children in the gltf hierarchy.
26
- * - `MeshRenderer` can be added/modified/removed to create/modify/remove a mesh on the node.
27
- * - `MeshCollider` can be added/modified/removed to create/modify/remove a collider on the node.
28
- * - `Material` can be added or modified to change the material properties. If the gltf node has a material, the original material will be
29
- * used as a base, and any gltf features (e.g. occlusion maps) from the gtlf spec that the renderer supports but that are not exposed in the
30
- * PBMaterial will be maintained.
31
- *
32
- * The scene can add additional entities as children to the gltf node, but structural modifications of the gltf are not possible:
33
- * - changing the scene hierarchy will not change the gltf node hierarchy. Moving the entity out of the gltf will sever the link and
34
- * change the state to `GNS_FAILED`.
35
- * - deleting the scene entity will not delete the gltf node.
36
- *
37
- * Removing the GltfNode will revert any changes to the original gltf. If the GltfNode component is removed and the mesh/collider/material
38
- * are not removed, this will result in a duplication of these components as the previously-linked entity will retain it's components and
39
- * the gltf node will also be displayed.
40
- */
41
- export interface PBGltfNode {
42
- /** the path of the target node in the Gltf. */
43
- path: string;
44
- }
45
-
46
- function createBasePBGltfNode(): PBGltfNode {
47
- return { path: "" };
48
- }
49
-
50
- export namespace PBGltfNode {
51
- export function encode(message: PBGltfNode, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
52
- if (message.path !== "") {
53
- writer.uint32(10).string(message.path);
54
- }
55
- return writer;
56
- }
57
-
58
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBGltfNode {
59
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
60
- let end = length === undefined ? reader.len : reader.pos + length;
61
- const message = createBasePBGltfNode();
62
- while (reader.pos < end) {
63
- const tag = reader.uint32();
64
- switch (tag >>> 3) {
65
- case 1:
66
- if (tag !== 10) {
67
- break;
68
- }
69
-
70
- message.path = reader.string();
71
- continue;
72
- }
73
- if ((tag & 7) === 4 || tag === 0) {
74
- break;
75
- }
76
- reader.skipType(tag & 7);
77
- }
78
- return message;
79
- }
80
-
81
- export function fromJSON(object: any): PBGltfNode {
82
- return { path: isSet(object.path) ? String(object.path) : "" };
83
- }
84
-
85
- export function toJSON(message: PBGltfNode): unknown {
86
- const obj: any = {};
87
- message.path !== undefined && (obj.path = message.path);
88
- return obj;
89
- }
90
-
91
- export function create<I extends Exact<DeepPartial<PBGltfNode>, I>>(base?: I): PBGltfNode {
92
- return PBGltfNode.fromPartial(base ?? {});
93
- }
94
-
95
- export function fromPartial<I extends Exact<DeepPartial<PBGltfNode>, I>>(object: I): PBGltfNode {
96
- const message = createBasePBGltfNode();
97
- message.path = object.path ?? "";
98
- return message;
99
- }
100
- }
101
-
102
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
103
-
104
- export type DeepPartial<T> = T extends Builtin ? T
105
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
106
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
107
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
108
- : Partial<T>;
109
-
110
- type KeysOfUnion<T> = T extends T ? keyof T : never;
111
- export type Exact<P, I extends P> = P extends Builtin ? P
112
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
113
-
114
- function isSet(value: any): boolean {
115
- return value !== null && value !== undefined;
116
- }