@dcl/protocol 1.0.0-45443187908.commit-ad382e2 → 1.0.0-45872166367.commit-57a13e1

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 (156) hide show
  1. package/out-js/decentraland/common/gradient.gen.d.ts +50 -0
  2. package/out-js/decentraland/common/gradient.gen.js +147 -0
  3. package/out-js/decentraland/common/gradient.gen.js.map +1 -0
  4. package/out-js/decentraland/common/texture.gen.d.ts +0 -18
  5. package/out-js/decentraland/common/texture.gen.js +4 -104
  6. package/out-js/decentraland/common/texture.gen.js.map +1 -1
  7. package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +2 -113
  8. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +3 -387
  9. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
  10. package/out-js/decentraland/kernel/apis/scene_credits.gen.d.ts +186 -0
  11. package/out-js/decentraland/kernel/apis/scene_credits.gen.js +388 -0
  12. package/out-js/decentraland/kernel/apis/scene_credits.gen.js.map +1 -0
  13. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +0 -2
  14. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +2 -19
  15. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
  16. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +0 -2
  17. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +2 -14
  18. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
  19. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +27 -14
  20. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +1 -19
  21. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
  22. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +0 -2
  23. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +2 -14
  24. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
  25. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +0 -3
  26. package/out-js/decentraland/sdk/components/common/input_action.gen.js +0 -18
  27. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
  28. package/out-js/decentraland/sdk/components/environment_fog.gen.d.ts +44 -0
  29. package/out-js/decentraland/sdk/components/environment_fog.gen.js +86 -0
  30. package/out-js/decentraland/sdk/components/environment_fog.gen.js.map +1 -0
  31. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +0 -19
  32. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +3 -90
  33. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
  34. package/out-js/decentraland/sdk/components/material.gen.d.ts +0 -20
  35. package/out-js/decentraland/sdk/components/material.gen.js +2 -86
  36. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
  37. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +0 -18
  38. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +4 -90
  39. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
  40. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +3 -19
  41. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +4 -90
  42. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
  43. package/out-js/decentraland/sdk/components/raycast.gen.d.ts +0 -13
  44. package/out-js/decentraland/sdk/components/raycast.gen.js +2 -64
  45. package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
  46. package/out-js/decentraland/sdk/components/skybox.gen.d.ts +103 -0
  47. package/out-js/decentraland/sdk/components/skybox.gen.js +355 -0
  48. package/out-js/decentraland/sdk/components/skybox.gen.js.map +1 -0
  49. package/out-js/decentraland/sdk/components/sun.gen.d.ts +53 -0
  50. package/out-js/decentraland/sdk/components/{global_light.gen.js → sun.gen.js} +48 -37
  51. package/out-js/decentraland/sdk/components/sun.gen.js.map +1 -0
  52. package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +0 -4
  53. package/out-js/decentraland/sdk/components/ui_input.gen.js +2 -28
  54. package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -1
  55. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +0 -33
  56. package/out-js/decentraland/sdk/components/ui_transform.gen.js +3 -176
  57. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
  58. package/out-ts/decentraland/common/gradient.gen.ts +170 -0
  59. package/out-ts/decentraland/common/texture.gen.ts +4 -119
  60. package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +2 -414
  61. package/out-ts/decentraland/kernel/apis/scene_credits.gen.ts +459 -0
  62. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +1 -20
  63. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +1 -16
  64. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +28 -35
  65. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +1 -16
  66. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +0 -18
  67. package/out-ts/decentraland/sdk/components/environment_fog.gen.ts +113 -0
  68. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +2 -108
  69. package/out-ts/decentraland/sdk/components/material.gen.ts +1 -102
  70. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +0 -99
  71. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +3 -100
  72. package/out-ts/decentraland/sdk/components/raycast.gen.ts +1 -73
  73. package/out-ts/decentraland/sdk/components/skybox.gen.ts +440 -0
  74. package/out-ts/decentraland/sdk/components/sun.gen.ts +155 -0
  75. package/out-ts/decentraland/sdk/components/ui_input.gen.ts +0 -36
  76. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +0 -193
  77. package/package.json +2 -2
  78. package/proto/decentraland/common/gradient.proto +16 -0
  79. package/proto/decentraland/common/texture.proto +1 -8
  80. package/proto/decentraland/kernel/apis/restricted_actions.proto +0 -38
  81. package/proto/decentraland/kernel/apis/scene_credits.proto +108 -0
  82. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +1 -2
  83. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +0 -1
  84. package/proto/decentraland/sdk/components/avatar_shape.proto +32 -18
  85. package/proto/decentraland/sdk/components/camera_mode_area.proto +0 -1
  86. package/proto/decentraland/sdk/components/common/input_action.proto +0 -3
  87. package/proto/decentraland/sdk/components/environment_fog.proto +21 -0
  88. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +0 -13
  89. package/proto/decentraland/sdk/components/material.proto +1 -13
  90. package/proto/decentraland/sdk/components/mesh_collider.proto +0 -7
  91. package/proto/decentraland/sdk/components/mesh_renderer.proto +3 -8
  92. package/proto/decentraland/sdk/components/primary_pointer_info.proto +0 -5
  93. package/proto/decentraland/sdk/components/raycast.proto +0 -13
  94. package/proto/decentraland/sdk/components/skybox.proto +51 -0
  95. package/proto/decentraland/sdk/components/sun.proto +26 -0
  96. package/proto/decentraland/sdk/components/ui_input.proto +0 -2
  97. package/proto/decentraland/sdk/components/ui_transform.proto +0 -20
  98. package/public/sdk-apis.proto +1 -0
  99. package/public/sdk-components.proto +3 -10
  100. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +0 -51
  101. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +0 -177
  102. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +0 -1
  103. package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +0 -71
  104. package/out-js/decentraland/sdk/components/avatar_movement.gen.js +0 -303
  105. package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +0 -1
  106. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +0 -79
  107. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +0 -357
  108. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +0 -1
  109. package/out-js/decentraland/sdk/components/camera_layer.gen.d.ts +0 -46
  110. package/out-js/decentraland/sdk/components/camera_layer.gen.js +0 -162
  111. package/out-js/decentraland/sdk/components/camera_layer.gen.js.map +0 -1
  112. package/out-js/decentraland/sdk/components/camera_layers.gen.d.ts +0 -30
  113. package/out-js/decentraland/sdk/components/camera_layers.gen.js +0 -80
  114. package/out-js/decentraland/sdk/components/camera_layers.gen.js.map +0 -1
  115. package/out-js/decentraland/sdk/components/global_light.gen.d.ts +0 -50
  116. package/out-js/decentraland/sdk/components/global_light.gen.js.map +0 -1
  117. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +0 -66
  118. package/out-js/decentraland/sdk/components/gltf_node.gen.js +0 -69
  119. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +0 -1
  120. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +0 -43
  121. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +0 -122
  122. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +0 -1
  123. package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +0 -52
  124. package/out-js/decentraland/sdk/components/input_modifier.gen.js +0 -233
  125. package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +0 -1
  126. package/out-js/decentraland/sdk/components/texture_camera.gen.d.ts +0 -86
  127. package/out-js/decentraland/sdk/components/texture_camera.gen.js +0 -296
  128. package/out-js/decentraland/sdk/components/texture_camera.gen.js.map +0 -1
  129. package/out-js/decentraland/sdk/components/ui_canvas.gen.d.ts +0 -35
  130. package/out-js/decentraland/sdk/components/ui_canvas.gen.js +0 -98
  131. package/out-js/decentraland/sdk/components/ui_canvas.gen.js.map +0 -1
  132. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.d.ts +0 -31
  133. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js +0 -71
  134. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js.map +0 -1
  135. package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +0 -237
  136. package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +0 -372
  137. package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +0 -432
  138. package/out-ts/decentraland/sdk/components/camera_layer.gen.ts +0 -202
  139. package/out-ts/decentraland/sdk/components/camera_layers.gen.ts +0 -92
  140. package/out-ts/decentraland/sdk/components/global_light.gen.ts +0 -138
  141. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +0 -116
  142. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +0 -139
  143. package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +0 -265
  144. package/out-ts/decentraland/sdk/components/texture_camera.gen.ts +0 -362
  145. package/out-ts/decentraland/sdk/components/ui_canvas.gen.ts +0 -115
  146. package/out-ts/decentraland/sdk/components/ui_scroll_result.gen.ts +0 -83
  147. package/proto/decentraland/sdk/components/avatar_movement.proto +0 -62
  148. package/proto/decentraland/sdk/components/avatar_movement_info.proto +0 -36
  149. package/proto/decentraland/sdk/components/camera_layer.proto +0 -30
  150. package/proto/decentraland/sdk/components/camera_layers.proto +0 -11
  151. package/proto/decentraland/sdk/components/global_light.proto +0 -22
  152. package/proto/decentraland/sdk/components/gltf_node.proto +0 -42
  153. package/proto/decentraland/sdk/components/gltf_node_state.proto +0 -20
  154. package/proto/decentraland/sdk/components/texture_camera.proto +0 -46
  155. package/proto/decentraland/sdk/components/ui_canvas.proto +0 -16
  156. package/proto/decentraland/sdk/components/ui_scroll_result.proto +0 -12
@@ -9,16 +9,26 @@ export const protobufPackage = "decentraland.sdk.components";
9
9
  * The AvatarShape component contains the information required to draw and animate avatar, acting as
10
10
  * a simplified GLTF container for this specific case.
11
11
  *
12
- * All fields (except ID) are optional have reasonable default values. In the case of `wearables`,
12
+ * All fields (except ID) are optional and have reasonable default values. In the case of `wearables`,
13
13
  * each slot on the Avatar's body that is not explicitly included in the list has its own default.
14
14
  *
15
- * Note that, while AvatarShape can be attached to any Entity, it's only actually used in the global
16
- * Avatar Scene. Other requirements are usually better served by GLTFs.
15
+ * On most entities, AvatarShape draws an avatar, for example an NPC. Other requirements are usually
16
+ * better served by GLTFs.
17
+ *
18
+ * On a player entity (`engine.PlayerEntity` or the entity of another player), AvatarShape changes the
19
+ * look of that player's avatar:
20
+ * - An unset field keeps the value from the player's profile. The defaults below apply only to other entities.
21
+ * - A non-empty `wearables` replaces all the wearables. A body slot that it does not fill stays empty.
22
+ * An empty `wearables` is the same as unset.
23
+ * - Fields marked "ignored on player entities" have no effect.
24
+ * - The change is local to this client. It is not broadcast.
25
+ * - The change applies only while the scene that wrote it is the current scene.
26
+ * - AvatarBase and AvatarEquippedData keep the values from the profile.
17
27
  */
18
28
  export interface PBAvatarShape {
19
- /** the user ID */
29
+ /** the user ID; ignored on player entities */
20
30
  id: string;
21
- /** visible name (default: "NPC") */
31
+ /** visible name (default: "NPC"); ignored on player entities */
22
32
  name?:
23
33
  | string
24
34
  | undefined;
@@ -38,38 +48,39 @@ export interface PBAvatarShape {
38
48
  eyeColor?:
39
49
  | Color3
40
50
  | undefined;
41
- /** current emote animations */
51
+ /** current emote animations; ignored on player entities */
42
52
  expressionTriggerId?:
43
53
  | string
44
54
  | undefined;
45
- /** start of emote animations (in the same order) */
55
+ /** start of emote animations (in the same order); ignored on player entities */
46
56
  expressionTriggerTimestamp?:
47
57
  | number
48
58
  | undefined;
49
- /** whether to display the floating voice chat icon */
59
+ /** whether to display the floating voice chat icon; ignored on player entities */
50
60
  talking?:
51
61
  | boolean
52
62
  | undefined;
53
63
  /**
54
- * Wearable URNs, one for each body slot.
64
+ * Wearables, one per body slot. Each item is one of:
65
+ * - a wearable URN
66
+ * - the path of a GLB file in the scene content, named `<name>_<category>.glb`, for example `cap_hat.glb`
67
+ * If two items have the same category, the later item is used.
68
+ * A scene GLB is always visible and hides nothing. Exception: a `skin` GLB hides the body that it replaces.
69
+ * If an item is not a URN or a `.glb` path, or if it cannot be loaded, the item is skipped.
55
70
  * Default values for each unspecified slot:
56
71
  * Eyes : "urn:decentraland:off-chain:base-avatars:f_eyes_00",
57
72
  * Eyebrows: "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
58
- * Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00"
73
+ * Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00",
59
74
  * Hair : "urn:decentraland:off-chain:base-avatars:standard_hair",
60
75
  * Shirt : "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
61
76
  * Trousers: "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
62
- * Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"]
77
+ * Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
63
78
  */
64
79
  wearables: string[];
65
- /** available emotes (default empty) */
80
+ /** available emotes (default empty); ignored on player entities */
66
81
  emotes: string[];
67
82
  /** hides the skin + hair + facial features (default: false) */
68
- showOnlyWearables?:
69
- | boolean
70
- | undefined;
71
- /** slots that will render even if hidden */
72
- forceRender: string[];
83
+ showOnlyWearables?: boolean | undefined;
73
84
  }
74
85
 
75
86
  function createBasePBAvatarShape(): PBAvatarShape {
@@ -86,7 +97,6 @@ function createBasePBAvatarShape(): PBAvatarShape {
86
97
  wearables: [],
87
98
  emotes: [],
88
99
  showOnlyWearables: undefined,
89
- forceRender: [],
90
100
  };
91
101
  }
92
102
 
@@ -128,9 +138,6 @@ export namespace PBAvatarShape {
128
138
  if (message.showOnlyWearables !== undefined) {
129
139
  writer.uint32(96).bool(message.showOnlyWearables);
130
140
  }
131
- for (const v of message.forceRender) {
132
- writer.uint32(106).string(v!);
133
- }
134
141
  return writer;
135
142
  }
136
143
 
@@ -225,13 +232,6 @@ export namespace PBAvatarShape {
225
232
 
226
233
  message.showOnlyWearables = reader.bool();
227
234
  continue;
228
- case 13:
229
- if (tag !== 106) {
230
- break;
231
- }
232
-
233
- message.forceRender.push(reader.string());
234
- continue;
235
235
  }
236
236
  if ((tag & 7) === 4 || tag === 0) {
237
237
  break;
@@ -257,7 +257,6 @@ export namespace PBAvatarShape {
257
257
  wearables: Array.isArray(object?.wearables) ? object.wearables.map((e: any) => String(e)) : [],
258
258
  emotes: Array.isArray(object?.emotes) ? object.emotes.map((e: any) => String(e)) : [],
259
259
  showOnlyWearables: isSet(object.showOnlyWearables) ? Boolean(object.showOnlyWearables) : undefined,
260
- forceRender: Array.isArray(object?.forceRender) ? object.forceRender.map((e: any) => String(e)) : [],
261
260
  };
262
261
  }
263
262
 
@@ -286,11 +285,6 @@ export namespace PBAvatarShape {
286
285
  obj.emotes = [];
287
286
  }
288
287
  message.showOnlyWearables !== undefined && (obj.showOnlyWearables = message.showOnlyWearables);
289
- if (message.forceRender) {
290
- obj.forceRender = message.forceRender.map((e) => e);
291
- } else {
292
- obj.forceRender = [];
293
- }
294
288
  return obj;
295
289
  }
296
290
 
@@ -318,7 +312,6 @@ export namespace PBAvatarShape {
318
312
  message.wearables = object.wearables?.map((e) => e) || [];
319
313
  message.emotes = object.emotes?.map((e) => e) || [];
320
314
  message.showOnlyWearables = object.showOnlyWearables ?? undefined;
321
- message.forceRender = object.forceRender?.map((e) => e) || [];
322
315
  return message;
323
316
  }
324
317
  }
@@ -25,12 +25,10 @@ export interface PBCameraModeArea {
25
25
  | undefined;
26
26
  /** the camera mode to enforce */
27
27
  mode: CameraType;
28
- /** if true, the player will be considered inside the area when they are within 0.3m of the area. default true */
29
- useColliderRange?: boolean | undefined;
30
28
  }
31
29
 
32
30
  function createBasePBCameraModeArea(): PBCameraModeArea {
33
- return { area: undefined, mode: 0, useColliderRange: undefined };
31
+ return { area: undefined, mode: 0 };
34
32
  }
35
33
 
36
34
  export namespace PBCameraModeArea {
@@ -41,9 +39,6 @@ export namespace PBCameraModeArea {
41
39
  if (message.mode !== 0) {
42
40
  writer.uint32(16).int32(message.mode);
43
41
  }
44
- if (message.useColliderRange !== undefined) {
45
- writer.uint32(32).bool(message.useColliderRange);
46
- }
47
42
  return writer;
48
43
  }
49
44
 
@@ -68,13 +63,6 @@ export namespace PBCameraModeArea {
68
63
 
69
64
  message.mode = reader.int32() as any;
70
65
  continue;
71
- case 4:
72
- if (tag !== 32) {
73
- break;
74
- }
75
-
76
- message.useColliderRange = reader.bool();
77
- continue;
78
66
  }
79
67
  if ((tag & 7) === 4 || tag === 0) {
80
68
  break;
@@ -88,7 +76,6 @@ export namespace PBCameraModeArea {
88
76
  return {
89
77
  area: isSet(object.area) ? Vector3.fromJSON(object.area) : undefined,
90
78
  mode: isSet(object.mode) ? cameraTypeFromJSON(object.mode) : 0,
91
- useColliderRange: isSet(object.useColliderRange) ? Boolean(object.useColliderRange) : undefined,
92
79
  };
93
80
  }
94
81
 
@@ -96,7 +83,6 @@ export namespace PBCameraModeArea {
96
83
  const obj: any = {};
97
84
  message.area !== undefined && (obj.area = message.area ? Vector3.toJSON(message.area) : undefined);
98
85
  message.mode !== undefined && (obj.mode = cameraTypeToJSON(message.mode));
99
- message.useColliderRange !== undefined && (obj.useColliderRange = message.useColliderRange);
100
86
  return obj;
101
87
  }
102
88
 
@@ -108,7 +94,6 @@ export namespace PBCameraModeArea {
108
94
  const message = createBasePBCameraModeArea();
109
95
  message.area = (object.area !== undefined && object.area !== null) ? Vector3.fromPartial(object.area) : undefined;
110
96
  message.mode = object.mode ?? 0;
111
- message.useColliderRange = object.useColliderRange ?? undefined;
112
97
  return message;
113
98
  }
114
99
  }
@@ -122,9 +122,6 @@ export enum PointerEventType {
122
122
  PET_HOVER_LEAVE = 3,
123
123
  PET_PROXIMITY_ENTER = 4,
124
124
  PET_PROXIMITY_LEAVE = 5,
125
- PET_DRAG_LOCKED = 6,
126
- PET_DRAG = 7,
127
- PET_DRAG_END = 8,
128
125
  UNRECOGNIZED = -1,
129
126
  }
130
127
 
@@ -148,15 +145,6 @@ export function pointerEventTypeFromJSON(object: any): PointerEventType {
148
145
  case 5:
149
146
  case "PET_PROXIMITY_LEAVE":
150
147
  return PointerEventType.PET_PROXIMITY_LEAVE;
151
- case 6:
152
- case "PET_DRAG_LOCKED":
153
- return PointerEventType.PET_DRAG_LOCKED;
154
- case 7:
155
- case "PET_DRAG":
156
- return PointerEventType.PET_DRAG;
157
- case 8:
158
- case "PET_DRAG_END":
159
- return PointerEventType.PET_DRAG_END;
160
148
  case -1:
161
149
  case "UNRECOGNIZED":
162
150
  default:
@@ -178,12 +166,6 @@ export function pointerEventTypeToJSON(object: PointerEventType): string {
178
166
  return "PET_PROXIMITY_ENTER";
179
167
  case PointerEventType.PET_PROXIMITY_LEAVE:
180
168
  return "PET_PROXIMITY_LEAVE";
181
- case PointerEventType.PET_DRAG_LOCKED:
182
- return "PET_DRAG_LOCKED";
183
- case PointerEventType.PET_DRAG:
184
- return "PET_DRAG";
185
- case PointerEventType.PET_DRAG_END:
186
- return "PET_DRAG_END";
187
169
  case PointerEventType.UNRECOGNIZED:
188
170
  default:
189
171
  return "UNRECOGNIZED";
@@ -0,0 +1,113 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ import { ColorGradient } from "../../common/gradient.gen";
4
+
5
+ export const protobufPackage = "decentraland.sdk.components";
6
+
7
+ /**
8
+ * PBEnvironmentFog overrides the environment fog while the player is inside the scene.
9
+ * Valid only on the scene root entity (`engine.RootEntity`).
10
+ *
11
+ * An unset field keeps the time-of-day default.
12
+ * Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
13
+ * Gradients do not wrap around midnight.
14
+ * A scene cannot turn fog on or off. That is a user quality setting.
15
+ *
16
+ * While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
17
+ */
18
+ export interface PBEnvironmentFog {
19
+ color?:
20
+ | ColorGradient
21
+ | undefined;
22
+ /** default = 0.0005, per meter: fog = 1 - e^(-density * distance). Negative values clamp to 0 */
23
+ density?: number | undefined;
24
+ }
25
+
26
+ function createBasePBEnvironmentFog(): PBEnvironmentFog {
27
+ return { color: undefined, density: undefined };
28
+ }
29
+
30
+ export namespace PBEnvironmentFog {
31
+ export function encode(message: PBEnvironmentFog, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
32
+ if (message.color !== undefined) {
33
+ ColorGradient.encode(message.color, writer.uint32(10).fork()).ldelim();
34
+ }
35
+ if (message.density !== undefined) {
36
+ writer.uint32(21).float(message.density);
37
+ }
38
+ return writer;
39
+ }
40
+
41
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): PBEnvironmentFog {
42
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
43
+ let end = length === undefined ? reader.len : reader.pos + length;
44
+ const message = createBasePBEnvironmentFog();
45
+ while (reader.pos < end) {
46
+ const tag = reader.uint32();
47
+ switch (tag >>> 3) {
48
+ case 1:
49
+ if (tag !== 10) {
50
+ break;
51
+ }
52
+
53
+ message.color = ColorGradient.decode(reader, reader.uint32());
54
+ continue;
55
+ case 2:
56
+ if (tag !== 21) {
57
+ break;
58
+ }
59
+
60
+ message.density = reader.float();
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): PBEnvironmentFog {
72
+ return {
73
+ color: isSet(object.color) ? ColorGradient.fromJSON(object.color) : undefined,
74
+ density: isSet(object.density) ? Number(object.density) : undefined,
75
+ };
76
+ }
77
+
78
+ export function toJSON(message: PBEnvironmentFog): unknown {
79
+ const obj: any = {};
80
+ message.color !== undefined && (obj.color = message.color ? ColorGradient.toJSON(message.color) : undefined);
81
+ message.density !== undefined && (obj.density = message.density);
82
+ return obj;
83
+ }
84
+
85
+ export function create<I extends Exact<DeepPartial<PBEnvironmentFog>, I>>(base?: I): PBEnvironmentFog {
86
+ return PBEnvironmentFog.fromPartial(base ?? {});
87
+ }
88
+
89
+ export function fromPartial<I extends Exact<DeepPartial<PBEnvironmentFog>, I>>(object: I): PBEnvironmentFog {
90
+ const message = createBasePBEnvironmentFog();
91
+ message.color = (object.color !== undefined && object.color !== null)
92
+ ? ColorGradient.fromPartial(object.color)
93
+ : undefined;
94
+ message.density = object.density ?? undefined;
95
+ return message;
96
+ }
97
+ }
98
+
99
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
100
+
101
+ export type DeepPartial<T> = T extends Builtin ? T
102
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
103
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
104
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
105
+ : Partial<T>;
106
+
107
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
108
+ export type Exact<P, I extends P> = P extends Builtin ? P
109
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
110
+
111
+ function isSet(value: any): boolean {
112
+ return value !== null && value !== undefined;
113
+ }
@@ -10,29 +10,10 @@ export const protobufPackage = "decentraland.sdk.components";
10
10
  */
11
11
  export interface PBGltfContainerLoadingState {
12
12
  currentState: LoadingState;
13
- /** all node paths in the gltf, which can be used with a GltfNode to inspect and modify the gltf contents */
14
- nodePaths: string[];
15
- /** all meshes in the gltf. unnamed meshes will be auto-assigned a name of the form `MeshX` or `MeshX/PrimitiveY` */
16
- meshNames: string[];
17
- /**
18
- * where X is the mesh index and Y is the primitive index (and there is more than 1 primitive). note this may
19
- * conflict with manually named meshes - to avoid any issues make sure all your meshes are explicitly named.
20
- */
21
- materialNames: string[];
22
- /**
23
- * X is the material index. note this may conflict with manually named materials - to avoid any issues make
24
- * sure all your materials are explicitly named.
25
- */
26
- skinNames: string[];
27
- /**
28
- * X is the skin index. note this may conflict with manually named skins - to avoid any issues make sure all
29
- * your skins are explicitly named.
30
- */
31
- animationNames: string[];
32
13
  }
33
14
 
34
15
  function createBasePBGltfContainerLoadingState(): PBGltfContainerLoadingState {
35
- return { currentState: 0, nodePaths: [], meshNames: [], materialNames: [], skinNames: [], animationNames: [] };
16
+ return { currentState: 0 };
36
17
  }
37
18
 
38
19
  export namespace PBGltfContainerLoadingState {
@@ -40,21 +21,6 @@ export namespace PBGltfContainerLoadingState {
40
21
  if (message.currentState !== 0) {
41
22
  writer.uint32(8).int32(message.currentState);
42
23
  }
43
- for (const v of message.nodePaths) {
44
- writer.uint32(18).string(v!);
45
- }
46
- for (const v of message.meshNames) {
47
- writer.uint32(26).string(v!);
48
- }
49
- for (const v of message.materialNames) {
50
- writer.uint32(34).string(v!);
51
- }
52
- for (const v of message.skinNames) {
53
- writer.uint32(42).string(v!);
54
- }
55
- for (const v of message.animationNames) {
56
- writer.uint32(50).string(v!);
57
- }
58
24
  return writer;
59
25
  }
60
26
 
@@ -72,41 +38,6 @@ export namespace PBGltfContainerLoadingState {
72
38
 
73
39
  message.currentState = reader.int32() as any;
74
40
  continue;
75
- case 2:
76
- if (tag !== 18) {
77
- break;
78
- }
79
-
80
- message.nodePaths.push(reader.string());
81
- continue;
82
- case 3:
83
- if (tag !== 26) {
84
- break;
85
- }
86
-
87
- message.meshNames.push(reader.string());
88
- continue;
89
- case 4:
90
- if (tag !== 34) {
91
- break;
92
- }
93
-
94
- message.materialNames.push(reader.string());
95
- continue;
96
- case 5:
97
- if (tag !== 42) {
98
- break;
99
- }
100
-
101
- message.skinNames.push(reader.string());
102
- continue;
103
- case 6:
104
- if (tag !== 50) {
105
- break;
106
- }
107
-
108
- message.animationNames.push(reader.string());
109
- continue;
110
41
  }
111
42
  if ((tag & 7) === 4 || tag === 0) {
112
43
  break;
@@ -117,44 +48,12 @@ export namespace PBGltfContainerLoadingState {
117
48
  }
118
49
 
119
50
  export function fromJSON(object: any): PBGltfContainerLoadingState {
120
- return {
121
- currentState: isSet(object.currentState) ? loadingStateFromJSON(object.currentState) : 0,
122
- nodePaths: Array.isArray(object?.nodePaths) ? object.nodePaths.map((e: any) => String(e)) : [],
123
- meshNames: Array.isArray(object?.meshNames) ? object.meshNames.map((e: any) => String(e)) : [],
124
- materialNames: Array.isArray(object?.materialNames) ? object.materialNames.map((e: any) => String(e)) : [],
125
- skinNames: Array.isArray(object?.skinNames) ? object.skinNames.map((e: any) => String(e)) : [],
126
- animationNames: Array.isArray(object?.animationNames) ? object.animationNames.map((e: any) => String(e)) : [],
127
- };
51
+ return { currentState: isSet(object.currentState) ? loadingStateFromJSON(object.currentState) : 0 };
128
52
  }
129
53
 
130
54
  export function toJSON(message: PBGltfContainerLoadingState): unknown {
131
55
  const obj: any = {};
132
56
  message.currentState !== undefined && (obj.currentState = loadingStateToJSON(message.currentState));
133
- if (message.nodePaths) {
134
- obj.nodePaths = message.nodePaths.map((e) => e);
135
- } else {
136
- obj.nodePaths = [];
137
- }
138
- if (message.meshNames) {
139
- obj.meshNames = message.meshNames.map((e) => e);
140
- } else {
141
- obj.meshNames = [];
142
- }
143
- if (message.materialNames) {
144
- obj.materialNames = message.materialNames.map((e) => e);
145
- } else {
146
- obj.materialNames = [];
147
- }
148
- if (message.skinNames) {
149
- obj.skinNames = message.skinNames.map((e) => e);
150
- } else {
151
- obj.skinNames = [];
152
- }
153
- if (message.animationNames) {
154
- obj.animationNames = message.animationNames.map((e) => e);
155
- } else {
156
- obj.animationNames = [];
157
- }
158
57
  return obj;
159
58
  }
160
59
 
@@ -169,11 +68,6 @@ export namespace PBGltfContainerLoadingState {
169
68
  ): PBGltfContainerLoadingState {
170
69
  const message = createBasePBGltfContainerLoadingState();
171
70
  message.currentState = object.currentState ?? 0;
172
- message.nodePaths = object.nodePaths?.map((e) => e) || [];
173
- message.meshNames = object.meshNames?.map((e) => e) || [];
174
- message.materialNames = object.materialNames?.map((e) => e) || [];
175
- message.skinNames = object.skinNames?.map((e) => e) || [];
176
- message.animationNames = object.animationNames?.map((e) => e) || [];
177
71
  return message;
178
72
  }
179
73
  }
@@ -61,14 +61,6 @@ export interface PBMaterial {
61
61
  | { $case: "unlit"; unlit: PBMaterial_UnlitMaterial }
62
62
  | { $case: "pbr"; pbr: PBMaterial_PbrMaterial }
63
63
  | undefined;
64
- /**
65
- * A gltf material that may provide additional features not supported by the PbMaterial fields.
66
- * If both gltf and material fields are provided, the gltf will be used only for extended features not
67
- * supported by the PbMaterial.
68
- * If this is provided and the `material` field is not provided, the renderer will update the material
69
- * field with data that reflects the gltf material once it is loaded.
70
- */
71
- gltf?: PBMaterial_GltfMaterial | undefined;
72
64
  }
73
65
 
74
66
  export interface PBMaterial_UnlitMaterial {
@@ -153,13 +145,8 @@ export interface PBMaterial_PbrMaterial {
153
145
  directIntensity?: number | undefined;
154
146
  }
155
147
 
156
- export interface PBMaterial_GltfMaterial {
157
- gltfSrc: string;
158
- name: string;
159
- }
160
-
161
148
  function createBasePBMaterial(): PBMaterial {
162
- return { material: undefined, gltf: undefined };
149
+ return { material: undefined };
163
150
  }
164
151
 
165
152
  export namespace PBMaterial {
@@ -172,9 +159,6 @@ export namespace PBMaterial {
172
159
  PBMaterial_PbrMaterial.encode(message.material.pbr, writer.uint32(18).fork()).ldelim();
173
160
  break;
174
161
  }
175
- if (message.gltf !== undefined) {
176
- PBMaterial_GltfMaterial.encode(message.gltf, writer.uint32(26).fork()).ldelim();
177
- }
178
162
  return writer;
179
163
  }
180
164
 
@@ -199,13 +183,6 @@ export namespace PBMaterial {
199
183
 
200
184
  message.material = { $case: "pbr", pbr: PBMaterial_PbrMaterial.decode(reader, reader.uint32()) };
201
185
  continue;
202
- case 3:
203
- if (tag !== 26) {
204
- break;
205
- }
206
-
207
- message.gltf = PBMaterial_GltfMaterial.decode(reader, reader.uint32());
208
- continue;
209
186
  }
210
187
  if ((tag & 7) === 4 || tag === 0) {
211
188
  break;
@@ -222,7 +199,6 @@ export namespace PBMaterial {
222
199
  : isSet(object.pbr)
223
200
  ? { $case: "pbr", pbr: PBMaterial_PbrMaterial.fromJSON(object.pbr) }
224
201
  : undefined,
225
- gltf: isSet(object.gltf) ? PBMaterial_GltfMaterial.fromJSON(object.gltf) : undefined,
226
202
  };
227
203
  }
228
204
 
@@ -232,7 +208,6 @@ export namespace PBMaterial {
232
208
  (obj.unlit = message.material?.unlit ? PBMaterial_UnlitMaterial.toJSON(message.material?.unlit) : undefined);
233
209
  message.material?.$case === "pbr" &&
234
210
  (obj.pbr = message.material?.pbr ? PBMaterial_PbrMaterial.toJSON(message.material?.pbr) : undefined);
235
- message.gltf !== undefined && (obj.gltf = message.gltf ? PBMaterial_GltfMaterial.toJSON(message.gltf) : undefined);
236
211
  return obj;
237
212
  }
238
213
 
@@ -248,9 +223,6 @@ export namespace PBMaterial {
248
223
  if (object.material?.$case === "pbr" && object.material?.pbr !== undefined && object.material?.pbr !== null) {
249
224
  message.material = { $case: "pbr", pbr: PBMaterial_PbrMaterial.fromPartial(object.material.pbr) };
250
225
  }
251
- message.gltf = (object.gltf !== undefined && object.gltf !== null)
252
- ? PBMaterial_GltfMaterial.fromPartial(object.gltf)
253
- : undefined;
254
226
  return message;
255
227
  }
256
228
  }
@@ -666,79 +638,6 @@ export namespace PBMaterial_PbrMaterial {
666
638
  }
667
639
  }
668
640
 
669
- function createBasePBMaterial_GltfMaterial(): PBMaterial_GltfMaterial {
670
- return { gltfSrc: "", name: "" };
671
- }
672
-
673
- export namespace PBMaterial_GltfMaterial {
674
- export function encode(message: PBMaterial_GltfMaterial, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
675
- if (message.gltfSrc !== "") {
676
- writer.uint32(10).string(message.gltfSrc);
677
- }
678
- if (message.name !== "") {
679
- writer.uint32(18).string(message.name);
680
- }
681
- return writer;
682
- }
683
-
684
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBMaterial_GltfMaterial {
685
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
686
- let end = length === undefined ? reader.len : reader.pos + length;
687
- const message = createBasePBMaterial_GltfMaterial();
688
- while (reader.pos < end) {
689
- const tag = reader.uint32();
690
- switch (tag >>> 3) {
691
- case 1:
692
- if (tag !== 10) {
693
- break;
694
- }
695
-
696
- message.gltfSrc = reader.string();
697
- continue;
698
- case 2:
699
- if (tag !== 18) {
700
- break;
701
- }
702
-
703
- message.name = reader.string();
704
- continue;
705
- }
706
- if ((tag & 7) === 4 || tag === 0) {
707
- break;
708
- }
709
- reader.skipType(tag & 7);
710
- }
711
- return message;
712
- }
713
-
714
- export function fromJSON(object: any): PBMaterial_GltfMaterial {
715
- return {
716
- gltfSrc: isSet(object.gltfSrc) ? String(object.gltfSrc) : "",
717
- name: isSet(object.name) ? String(object.name) : "",
718
- };
719
- }
720
-
721
- export function toJSON(message: PBMaterial_GltfMaterial): unknown {
722
- const obj: any = {};
723
- message.gltfSrc !== undefined && (obj.gltfSrc = message.gltfSrc);
724
- message.name !== undefined && (obj.name = message.name);
725
- return obj;
726
- }
727
-
728
- export function create<I extends Exact<DeepPartial<PBMaterial_GltfMaterial>, I>>(base?: I): PBMaterial_GltfMaterial {
729
- return PBMaterial_GltfMaterial.fromPartial(base ?? {});
730
- }
731
-
732
- export function fromPartial<I extends Exact<DeepPartial<PBMaterial_GltfMaterial>, I>>(
733
- object: I,
734
- ): PBMaterial_GltfMaterial {
735
- const message = createBasePBMaterial_GltfMaterial();
736
- message.gltfSrc = object.gltfSrc ?? "";
737
- message.name = object.name ?? "";
738
- return message;
739
- }
740
- }
741
-
742
641
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
743
642
 
744
643
  export type DeepPartial<T> = T extends Builtin ? T