@dcl/protocol 1.0.0-4543854409.commit-89f5875 → 1.0.0-45443187908.commit-ad382e2

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 (586) hide show
  1. package/README.md +241 -12
  2. package/out-js/about.gen.d.ts +1 -0
  3. package/out-js/{bff-services.gen.js → about.gen.js} +2 -2
  4. package/out-js/about.gen.js.map +1 -0
  5. package/out-js/decentraland/common/border_rect.gen.d.ts +23 -28
  6. package/out-js/decentraland/common/border_rect.gen.js +122 -21
  7. package/out-js/decentraland/common/border_rect.gen.js.map +1 -1
  8. package/out-js/decentraland/common/colors.gen.d.ts +29 -52
  9. package/out-js/decentraland/common/colors.gen.js +125 -40
  10. package/out-js/decentraland/common/colors.gen.js.map +1 -1
  11. package/out-js/decentraland/common/content_mapping.gen.d.ts +8 -20
  12. package/out-js/decentraland/common/content_mapping.gen.js +25 -18
  13. package/out-js/decentraland/common/content_mapping.gen.js.map +1 -1
  14. package/out-js/decentraland/common/sdk/user_data.gen.d.ts +24 -176
  15. package/out-js/decentraland/common/sdk/user_data.gen.js +93 -72
  16. package/out-js/decentraland/common/sdk/user_data.gen.js.map +1 -1
  17. package/out-js/decentraland/common/texture.gen.d.ts +56 -252
  18. package/out-js/decentraland/common/texture.gen.js +259 -108
  19. package/out-js/decentraland/common/texture.gen.js.map +1 -1
  20. package/out-js/decentraland/common/vectors.gen.d.ts +38 -68
  21. package/out-js/decentraland/common/vectors.gen.js +172 -57
  22. package/out-js/decentraland/common/vectors.gen.js.map +1 -1
  23. package/out-js/decentraland/kernel/apis/comms_api.gen.d.ts +206 -0
  24. package/out-js/decentraland/kernel/apis/comms_api.gen.js +792 -0
  25. package/out-js/decentraland/kernel/apis/comms_api.gen.js.map +1 -0
  26. package/out-js/decentraland/kernel/apis/communications_controller.gen.d.ts +64 -48
  27. package/out-js/decentraland/kernel/apis/communications_controller.gen.js +319 -36
  28. package/out-js/decentraland/kernel/apis/communications_controller.gen.js.map +1 -1
  29. package/out-js/decentraland/kernel/apis/dev_tools.gen.d.ts +18 -56
  30. package/out-js/decentraland/kernel/apis/dev_tools.gen.js +50 -36
  31. package/out-js/decentraland/kernel/apis/dev_tools.gen.js.map +1 -1
  32. package/out-js/decentraland/kernel/apis/engine_api.gen.d.ts +186 -4088
  33. package/out-js/decentraland/kernel/apis/engine_api.gen.js +650 -1709
  34. package/out-js/decentraland/kernel/apis/engine_api.gen.js.map +1 -1
  35. package/out-js/decentraland/kernel/apis/environment_api.gen.d.ts +151 -691
  36. package/out-js/decentraland/kernel/apis/environment_api.gen.js +439 -320
  37. package/out-js/decentraland/kernel/apis/environment_api.gen.js.map +1 -1
  38. package/out-js/decentraland/kernel/apis/ethereum_controller.gen.d.ts +106 -440
  39. package/out-js/decentraland/kernel/apis/ethereum_controller.gen.js +309 -225
  40. package/out-js/decentraland/kernel/apis/ethereum_controller.gen.js.map +1 -1
  41. package/out-js/decentraland/kernel/apis/parcel_identity.gen.d.ts +70 -518
  42. package/out-js/decentraland/kernel/apis/parcel_identity.gen.js +212 -156
  43. package/out-js/decentraland/kernel/apis/parcel_identity.gen.js.map +1 -1
  44. package/out-js/decentraland/kernel/apis/permissions.gen.d.ts +37 -128
  45. package/out-js/decentraland/kernel/apis/permissions.gen.js +112 -78
  46. package/out-js/decentraland/kernel/apis/permissions.gen.js.map +1 -1
  47. package/out-js/decentraland/kernel/apis/players.gen.d.ts +54 -476
  48. package/out-js/decentraland/kernel/apis/players.gen.js +153 -111
  49. package/out-js/decentraland/kernel/apis/players.gen.js.map +1 -1
  50. package/out-js/decentraland/kernel/apis/portable_experiences.gen.d.ts +84 -309
  51. package/out-js/decentraland/kernel/apis/portable_experiences.gen.js +273 -172
  52. package/out-js/decentraland/kernel/apis/portable_experiences.gen.js.map +1 -1
  53. package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +391 -605
  54. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +1423 -391
  55. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
  56. package/out-js/decentraland/kernel/apis/runtime.gen.d.ts +165 -208
  57. package/out-js/decentraland/kernel/apis/runtime.gen.js +660 -172
  58. package/out-js/decentraland/kernel/apis/runtime.gen.js.map +1 -1
  59. package/out-js/decentraland/kernel/apis/scene.gen.d.ts +18 -132
  60. package/out-js/decentraland/kernel/apis/scene.gen.js +52 -38
  61. package/out-js/decentraland/kernel/apis/scene.gen.js.map +1 -1
  62. package/out-js/decentraland/kernel/apis/signed_fetch.gen.d.ts +75 -284
  63. package/out-js/decentraland/kernel/apis/signed_fetch.gen.js +292 -106
  64. package/out-js/decentraland/kernel/apis/signed_fetch.gen.js.map +1 -1
  65. package/out-js/decentraland/kernel/apis/social_controller.gen.d.ts +26 -128
  66. package/out-js/decentraland/kernel/apis/social_controller.gen.js +79 -58
  67. package/out-js/decentraland/kernel/apis/social_controller.gen.js.map +1 -1
  68. package/out-js/decentraland/kernel/apis/testing.gen.d.ts +249 -0
  69. package/out-js/decentraland/kernel/apis/testing.gen.js +1073 -0
  70. package/out-js/decentraland/kernel/apis/testing.gen.js.map +1 -0
  71. package/out-js/decentraland/kernel/apis/user_action_module.gen.d.ts +18 -48
  72. package/out-js/decentraland/kernel/apis/user_action_module.gen.js +49 -35
  73. package/out-js/decentraland/kernel/apis/user_action_module.gen.js.map +1 -1
  74. package/out-js/decentraland/kernel/apis/user_identity.gen.d.ts +36 -352
  75. package/out-js/decentraland/kernel/apis/user_identity.gen.js +98 -70
  76. package/out-js/decentraland/kernel/apis/user_identity.gen.js.map +1 -1
  77. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.d.ts +237 -551
  78. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +1478 -244
  79. package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
  80. package/out-js/decentraland/kernel/comms/rfc5/ws_comms.gen.d.ts +81 -561
  81. package/out-js/decentraland/kernel/comms/rfc5/ws_comms.gen.js +318 -242
  82. package/out-js/decentraland/kernel/comms/rfc5/ws_comms.gen.js.map +1 -1
  83. package/out-js/decentraland/kernel/comms/v3/archipelago.gen.d.ts +194 -748
  84. package/out-js/decentraland/kernel/comms/v3/archipelago.gen.js +884 -557
  85. package/out-js/decentraland/kernel/comms/v3/archipelago.gen.js.map +1 -1
  86. package/out-js/decentraland/pulse/pulse_clusters.gen.d.ts +105 -0
  87. package/out-js/decentraland/pulse/pulse_clusters.gen.js +336 -0
  88. package/out-js/decentraland/pulse/pulse_clusters.gen.js.map +1 -0
  89. package/out-js/decentraland/quests/definitions.gen.d.ts +541 -0
  90. package/out-js/decentraland/quests/definitions.gen.js +2728 -0
  91. package/out-js/decentraland/quests/definitions.gen.js.map +1 -0
  92. package/out-js/decentraland/realm/about.gen.d.ts +229 -0
  93. package/out-js/decentraland/realm/about.gen.js +1185 -0
  94. package/out-js/decentraland/realm/about.gen.js.map +1 -0
  95. package/out-js/decentraland/sdk/components/animator.gen.d.ts +19 -141
  96. package/out-js/decentraland/sdk/components/animator.gen.js +66 -72
  97. package/out-js/decentraland/sdk/components/animator.gen.js.map +1 -1
  98. package/out-js/decentraland/sdk/components/audio_source.gen.d.ts +19 -32
  99. package/out-js/decentraland/sdk/components/audio_source.gen.js +62 -23
  100. package/out-js/decentraland/sdk/components/audio_source.gen.js.map +1 -1
  101. package/out-js/decentraland/sdk/components/audio_stream.gen.d.ts +18 -24
  102. package/out-js/decentraland/sdk/components/audio_stream.gen.js +71 -21
  103. package/out-js/decentraland/sdk/components/audio_stream.gen.js.map +1 -1
  104. package/out-js/decentraland/sdk/components/avatar_attach.gen.d.ts +31 -20
  105. package/out-js/decentraland/sdk/components/avatar_attach.gen.js +162 -22
  106. package/out-js/decentraland/sdk/components/avatar_attach.gen.js.map +1 -1
  107. package/out-js/decentraland/sdk/components/avatar_base.gen.d.ts +38 -0
  108. package/out-js/decentraland/sdk/components/avatar_base.gen.js +148 -0
  109. package/out-js/decentraland/sdk/components/avatar_base.gen.js.map +1 -0
  110. package/out-js/decentraland/sdk/components/avatar_emote_command.gen.d.ts +64 -0
  111. package/out-js/decentraland/sdk/components/avatar_emote_command.gen.js +171 -0
  112. package/out-js/decentraland/sdk/components/avatar_emote_command.gen.js.map +1 -0
  113. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +57 -0
  114. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +199 -0
  115. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -0
  116. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +51 -0
  117. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +177 -0
  118. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +1 -0
  119. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +12 -48
  120. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +52 -26
  121. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
  122. package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +71 -0
  123. package/out-js/decentraland/sdk/components/avatar_movement.gen.js +303 -0
  124. package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +1 -0
  125. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +79 -0
  126. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +357 -0
  127. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +1 -0
  128. package/out-js/decentraland/sdk/components/avatar_nametag.gen.d.ts +58 -0
  129. package/out-js/decentraland/sdk/components/avatar_nametag.gen.js +117 -0
  130. package/out-js/decentraland/sdk/components/avatar_nametag.gen.js.map +1 -0
  131. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +12 -128
  132. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +67 -29
  133. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
  134. package/out-js/decentraland/sdk/components/billboard.gen.d.ts +21 -19
  135. package/out-js/decentraland/sdk/components/billboard.gen.js +49 -25
  136. package/out-js/decentraland/sdk/components/billboard.gen.js.map +1 -1
  137. package/out-js/decentraland/sdk/components/camera_layer.gen.d.ts +46 -0
  138. package/out-js/decentraland/sdk/components/camera_layer.gen.js +162 -0
  139. package/out-js/decentraland/sdk/components/camera_layer.gen.js.map +1 -0
  140. package/out-js/decentraland/sdk/components/camera_layers.gen.d.ts +30 -0
  141. package/out-js/decentraland/sdk/components/camera_layers.gen.js +80 -0
  142. package/out-js/decentraland/sdk/components/camera_layers.gen.js.map +1 -0
  143. package/out-js/decentraland/sdk/components/camera_mode.gen.d.ts +8 -16
  144. package/out-js/decentraland/sdk/components/camera_mode.gen.js +24 -17
  145. package/out-js/decentraland/sdk/components/camera_mode.gen.js.map +1 -1
  146. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +10 -44
  147. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +39 -20
  148. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
  149. package/out-js/decentraland/sdk/components/common/avatar_mask.gen.d.ts +8 -0
  150. package/out-js/decentraland/sdk/components/common/avatar_mask.gen.js +34 -0
  151. package/out-js/decentraland/sdk/components/common/avatar_mask.gen.js.map +1 -0
  152. package/out-js/decentraland/sdk/components/common/camera_type.gen.js +4 -4
  153. package/out-js/decentraland/sdk/components/common/camera_type.gen.js.map +1 -1
  154. package/out-js/decentraland/sdk/components/common/explorer_ui.gen.d.ts +19 -0
  155. package/out-js/decentraland/sdk/components/common/explorer_ui.gen.js +80 -0
  156. package/out-js/decentraland/sdk/components/common/explorer_ui.gen.js.map +1 -0
  157. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +14 -0
  158. package/out-js/decentraland/sdk/components/common/input_action.gen.js +77 -7
  159. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
  160. package/out-js/decentraland/sdk/components/common/loading_state.gen.d.ts +11 -0
  161. package/out-js/decentraland/sdk/components/common/loading_state.gen.js +57 -0
  162. package/out-js/decentraland/sdk/components/common/loading_state.gen.js.map +1 -0
  163. package/out-js/decentraland/sdk/components/common/raycast_hit.gen.d.ts +8 -136
  164. package/out-js/decentraland/sdk/components/common/raycast_hit.gen.js +30 -23
  165. package/out-js/decentraland/sdk/components/common/raycast_hit.gen.js.map +1 -1
  166. package/out-js/decentraland/sdk/components/common/texts.gen.js +7 -7
  167. package/out-js/decentraland/sdk/components/common/texts.gen.js.map +1 -1
  168. package/out-js/decentraland/sdk/components/engine_info.gen.d.ts +43 -0
  169. package/out-js/decentraland/sdk/components/engine_info.gen.js +107 -0
  170. package/out-js/decentraland/sdk/components/engine_info.gen.js.map +1 -0
  171. package/out-js/decentraland/sdk/components/explorer_item_purchase_result.gen.d.ts +78 -0
  172. package/out-js/decentraland/sdk/components/explorer_item_purchase_result.gen.js +308 -0
  173. package/out-js/decentraland/sdk/components/explorer_item_purchase_result.gen.js.map +1 -0
  174. package/out-js/decentraland/sdk/components/explorer_ui_events_result.gen.d.ts +73 -0
  175. package/out-js/decentraland/sdk/components/explorer_ui_events_result.gen.js +231 -0
  176. package/out-js/decentraland/sdk/components/explorer_ui_events_result.gen.js.map +1 -0
  177. package/out-js/decentraland/sdk/components/global_light.gen.d.ts +50 -0
  178. package/out-js/decentraland/sdk/components/global_light.gen.js +103 -0
  179. package/out-js/decentraland/sdk/components/global_light.gen.js.map +1 -0
  180. package/out-js/decentraland/sdk/components/gltf_container.gen.d.ts +12 -16
  181. package/out-js/decentraland/sdk/components/gltf_container.gen.js +59 -20
  182. package/out-js/decentraland/sdk/components/gltf_container.gen.js.map +1 -1
  183. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +54 -0
  184. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +157 -0
  185. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -0
  186. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +66 -0
  187. package/out-js/decentraland/sdk/components/gltf_node.gen.js +69 -0
  188. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +1 -0
  189. package/out-js/decentraland/sdk/components/gltf_node_modifiers.gen.d.ts +57 -0
  190. package/out-js/decentraland/sdk/components/gltf_node_modifiers.gen.js +164 -0
  191. package/out-js/decentraland/sdk/components/gltf_node_modifiers.gen.js.map +1 -0
  192. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +43 -0
  193. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +122 -0
  194. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +1 -0
  195. package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +52 -0
  196. package/out-js/decentraland/sdk/components/input_modifier.gen.js +233 -0
  197. package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +1 -0
  198. package/out-js/decentraland/sdk/components/material.gen.d.ts +50 -3374
  199. package/out-js/decentraland/sdk/components/material.gen.js +219 -105
  200. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
  201. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +65 -181
  202. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +249 -126
  203. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
  204. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +62 -226
  205. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +235 -114
  206. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
  207. package/out-js/decentraland/sdk/components/nft_shape.gen.d.ts +11 -51
  208. package/out-js/decentraland/sdk/components/nft_shape.gen.js +37 -30
  209. package/out-js/decentraland/sdk/components/nft_shape.gen.js.map +1 -1
  210. package/out-js/decentraland/sdk/components/player_identity_data.gen.d.ts +37 -0
  211. package/out-js/decentraland/sdk/components/player_identity_data.gen.js +83 -0
  212. package/out-js/decentraland/sdk/components/player_identity_data.gen.js.map +1 -0
  213. package/out-js/decentraland/sdk/components/pointer_events.gen.d.ts +63 -187
  214. package/out-js/decentraland/sdk/components/pointer_events.gen.js +162 -69
  215. package/out-js/decentraland/sdk/components/pointer_events.gen.js.map +1 -1
  216. package/out-js/decentraland/sdk/components/pointer_events_result.gen.d.ts +11 -209
  217. package/out-js/decentraland/sdk/components/pointer_events_result.gen.js +42 -23
  218. package/out-js/decentraland/sdk/components/pointer_events_result.gen.js.map +1 -1
  219. package/out-js/decentraland/sdk/components/pointer_lock.gen.d.ts +8 -16
  220. package/out-js/decentraland/sdk/components/pointer_lock.gen.js +24 -17
  221. package/out-js/decentraland/sdk/components/pointer_lock.gen.js.map +1 -1
  222. package/out-js/decentraland/sdk/components/raycast.gen.d.ts +23 -250
  223. package/out-js/decentraland/sdk/components/raycast.gen.js +108 -37
  224. package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
  225. package/out-js/decentraland/sdk/components/raycast_result.gen.d.ts +10 -348
  226. package/out-js/decentraland/sdk/components/raycast_result.gen.js +41 -22
  227. package/out-js/decentraland/sdk/components/raycast_result.gen.js.map +1 -1
  228. package/out-js/decentraland/sdk/components/realm_info.gen.d.ts +43 -0
  229. package/out-js/decentraland/sdk/components/realm_info.gen.js +151 -0
  230. package/out-js/decentraland/sdk/components/realm_info.gen.js.map +1 -0
  231. package/out-js/decentraland/sdk/components/text_shape.gen.d.ts +10 -174
  232. package/out-js/decentraland/sdk/components/text_shape.gen.js +58 -38
  233. package/out-js/decentraland/sdk/components/text_shape.gen.js.map +1 -1
  234. package/out-js/decentraland/sdk/components/texture_camera.gen.d.ts +86 -0
  235. package/out-js/decentraland/sdk/components/texture_camera.gen.js +296 -0
  236. package/out-js/decentraland/sdk/components/texture_camera.gen.js.map +1 -0
  237. package/out-js/decentraland/sdk/components/touch_screen_controls.gen.d.ts +77 -0
  238. package/out-js/decentraland/sdk/components/touch_screen_controls.gen.js +201 -0
  239. package/out-js/decentraland/sdk/components/touch_screen_controls.gen.js.map +1 -0
  240. package/out-js/decentraland/sdk/components/tween.gen.d.ts +220 -0
  241. package/out-js/decentraland/sdk/components/tween.gen.js +1213 -0
  242. package/out-js/decentraland/sdk/components/tween.gen.js.map +1 -0
  243. package/out-js/decentraland/sdk/components/tween_sequence.gen.d.ts +39 -0
  244. package/out-js/decentraland/sdk/components/tween_sequence.gen.js +122 -0
  245. package/out-js/decentraland/sdk/components/tween_sequence.gen.js.map +1 -0
  246. package/out-js/decentraland/sdk/components/tween_state.gen.d.ts +40 -0
  247. package/out-js/decentraland/sdk/components/tween_state.gen.js +122 -0
  248. package/out-js/decentraland/sdk/components/tween_state.gen.js.map +1 -0
  249. package/out-js/decentraland/sdk/components/ui_background.gen.d.ts +8 -314
  250. package/out-js/decentraland/sdk/components/ui_background.gen.js +33 -26
  251. package/out-js/decentraland/sdk/components/ui_background.gen.js.map +1 -1
  252. package/out-js/decentraland/sdk/components/ui_canvas.gen.d.ts +35 -0
  253. package/out-js/decentraland/sdk/components/ui_canvas.gen.js +98 -0
  254. package/out-js/decentraland/sdk/components/ui_canvas.gen.js.map +1 -0
  255. package/out-js/decentraland/sdk/components/ui_dropdown.gen.d.ts +10 -78
  256. package/out-js/decentraland/sdk/components/ui_dropdown.gen.js +46 -26
  257. package/out-js/decentraland/sdk/components/ui_dropdown.gen.js.map +1 -1
  258. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.d.ts +8 -16
  259. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.js +24 -17
  260. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.js.map +1 -1
  261. package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +14 -104
  262. package/out-js/decentraland/sdk/components/ui_input.gen.js +71 -25
  263. package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -1
  264. package/out-js/decentraland/sdk/components/ui_input_binding.gen.d.ts +52 -0
  265. package/out-js/decentraland/sdk/components/ui_input_binding.gen.js +81 -0
  266. package/out-js/decentraland/sdk/components/ui_input_binding.gen.js.map +1 -0
  267. package/out-js/decentraland/sdk/components/ui_input_result.gen.d.ts +10 -16
  268. package/out-js/decentraland/sdk/components/ui_input_result.gen.js +41 -20
  269. package/out-js/decentraland/sdk/components/ui_input_result.gen.js.map +1 -1
  270. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.d.ts +31 -0
  271. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js +71 -0
  272. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js.map +1 -0
  273. package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +20 -63
  274. package/out-js/decentraland/sdk/components/ui_text.gen.js +97 -24
  275. package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
  276. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +84 -216
  277. package/out-js/decentraland/sdk/components/ui_transform.gen.js +662 -96
  278. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
  279. package/out-js/decentraland/sdk/components/video_player.gen.d.ts +18 -36
  280. package/out-js/decentraland/sdk/components/video_player.gen.js +69 -23
  281. package/out-js/decentraland/sdk/components/video_player.gen.js.map +1 -1
  282. package/out-js/decentraland/sdk/components/visibility_component.gen.d.ts +16 -16
  283. package/out-js/decentraland/sdk/components/visibility_component.gen.js +41 -20
  284. package/out-js/decentraland/sdk/components/visibility_component.gen.js.map +1 -1
  285. package/out-js/decentraland/sdk/development/local_development.gen.d.ts +70 -0
  286. package/out-js/decentraland/sdk/development/local_development.gen.js +283 -0
  287. package/out-js/decentraland/sdk/development/local_development.gen.js.map +1 -0
  288. package/out-js/decentraland/sdk/ecs6/components_ecs6.gen.d.ts +1005 -0
  289. package/out-js/decentraland/sdk/ecs6/components_ecs6.gen.js +7842 -0
  290. package/out-js/decentraland/sdk/ecs6/components_ecs6.gen.js.map +1 -0
  291. package/out-js/decentraland/sdk/ecs6/engine_interface_ecs6.gen.d.ts +398 -0
  292. package/out-js/decentraland/sdk/ecs6/engine_interface_ecs6.gen.js +2512 -0
  293. package/out-js/decentraland/sdk/ecs6/engine_interface_ecs6.gen.js.map +1 -0
  294. package/out-js/decentraland/social_service/errors.gen.d.ts +96 -0
  295. package/out-js/decentraland/social_service/errors.gen.js +405 -0
  296. package/out-js/decentraland/social_service/errors.gen.js.map +1 -0
  297. package/out-js/decentraland/social_service/v1/social_service_v1.gen.d.ts +501 -0
  298. package/out-js/decentraland/social_service/v1/social_service_v1.gen.js +2517 -0
  299. package/out-js/decentraland/social_service/v1/social_service_v1.gen.js.map +1 -0
  300. package/out-js/decentraland/social_service/v2/social_service_v2.gen.d.ts +1827 -0
  301. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js +9308 -0
  302. package/out-js/decentraland/social_service/v2/social_service_v2.gen.js.map +1 -0
  303. package/out-js/google/protobuf/descriptor.gen.d.ts +200 -87148
  304. package/out-js/google/protobuf/descriptor.gen.js +882 -707
  305. package/out-js/google/protobuf/descriptor.gen.js.map +1 -1
  306. package/out-js/google/protobuf/empty.gen.d.ts +8 -8
  307. package/out-js/google/protobuf/empty.gen.js +23 -16
  308. package/out-js/google/protobuf/empty.gen.js.map +1 -1
  309. package/out-js/quests.gen.d.ts +1 -0
  310. package/out-js/quests.gen.js +6 -0
  311. package/out-js/quests.gen.js.map +1 -0
  312. package/out-js/sdk-development.gen.d.ts +1 -0
  313. package/out-js/sdk-development.gen.js +6 -0
  314. package/out-js/sdk-development.gen.js.map +1 -0
  315. package/out-ts/about.gen.ts +3 -0
  316. package/out-ts/decentraland/common/border_rect.gen.ts +124 -19
  317. package/out-ts/decentraland/common/colors.gen.ts +116 -37
  318. package/out-ts/decentraland/common/content_mapping.gen.ts +17 -17
  319. package/out-ts/decentraland/common/sdk/user_data.gen.ts +59 -59
  320. package/out-ts/decentraland/common/texture.gen.ts +232 -84
  321. package/out-ts/decentraland/common/vectors.gen.ts +157 -53
  322. package/out-ts/decentraland/kernel/apis/comms_api.gen.ts +884 -0
  323. package/out-ts/decentraland/kernel/apis/communications_controller.gen.ts +318 -31
  324. package/out-ts/decentraland/kernel/apis/dev_tools.gen.ts +32 -32
  325. package/out-ts/decentraland/kernel/apis/engine_api.gen.ts +500 -1880
  326. package/out-ts/decentraland/kernel/apis/environment_api.gen.ts +310 -277
  327. package/out-ts/decentraland/kernel/apis/ethereum_controller.gen.ts +220 -199
  328. package/out-ts/decentraland/kernel/apis/parcel_identity.gen.ts +132 -132
  329. package/out-ts/decentraland/kernel/apis/permissions.gen.ts +82 -66
  330. package/out-ts/decentraland/kernel/apis/players.gen.ts +106 -94
  331. package/out-ts/decentraland/kernel/apis/portable_experiences.gen.ts +196 -149
  332. package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +1392 -347
  333. package/out-ts/decentraland/kernel/apis/runtime.gen.ts +705 -178
  334. package/out-ts/decentraland/kernel/apis/scene.gen.ts +34 -34
  335. package/out-ts/decentraland/kernel/apis/signed_fetch.gen.ts +266 -89
  336. package/out-ts/decentraland/kernel/apis/social_controller.gen.ts +50 -48
  337. package/out-ts/decentraland/kernel/apis/testing.gen.ts +1270 -0
  338. package/out-ts/decentraland/kernel/apis/user_action_module.gen.ts +33 -31
  339. package/out-ts/decentraland/kernel/apis/user_identity.gen.ts +66 -62
  340. package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +1576 -225
  341. package/out-ts/decentraland/kernel/comms/rfc5/ws_comms.gen.ts +209 -200
  342. package/out-ts/decentraland/kernel/comms/v3/archipelago.gen.ts +872 -596
  343. package/out-ts/decentraland/pulse/pulse_clusters.gen.ts +422 -0
  344. package/out-ts/decentraland/quests/definitions.gen.ts +3020 -0
  345. package/out-ts/decentraland/{bff/http_endpoints.gen.ts → realm/about.gen.ts} +582 -225
  346. package/out-ts/decentraland/sdk/components/animator.gen.ts +41 -64
  347. package/out-ts/decentraland/sdk/components/audio_source.gen.ts +68 -21
  348. package/out-ts/decentraland/sdk/components/audio_stream.gen.ts +79 -19
  349. package/out-ts/decentraland/sdk/components/avatar_attach.gen.ts +150 -17
  350. package/out-ts/decentraland/sdk/components/avatar_base.gen.ts +171 -0
  351. package/out-ts/decentraland/sdk/components/avatar_emote_command.gen.ts +202 -0
  352. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +237 -0
  353. package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +237 -0
  354. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +43 -20
  355. package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +372 -0
  356. package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +432 -0
  357. package/out-ts/decentraland/sdk/components/avatar_nametag.gen.ts +162 -0
  358. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +68 -30
  359. package/out-ts/decentraland/sdk/components/billboard.gen.ts +49 -22
  360. package/out-ts/decentraland/sdk/components/camera_layer.gen.ts +202 -0
  361. package/out-ts/decentraland/sdk/components/camera_layers.gen.ts +92 -0
  362. package/out-ts/decentraland/sdk/components/camera_mode.gen.ts +16 -16
  363. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +33 -18
  364. package/out-ts/decentraland/sdk/components/common/avatar_mask.gen.ts +31 -0
  365. package/out-ts/decentraland/sdk/components/common/explorer_ui.gen.ts +77 -0
  366. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +70 -0
  367. package/out-ts/decentraland/sdk/components/common/loading_state.gen.ts +54 -0
  368. package/out-ts/decentraland/sdk/components/common/raycast_hit.gen.ts +22 -22
  369. package/out-ts/decentraland/sdk/components/engine_info.gen.ts +134 -0
  370. package/out-ts/decentraland/sdk/components/explorer_item_purchase_result.gen.ts +370 -0
  371. package/out-ts/decentraland/sdk/components/explorer_ui_events_result.gen.ts +281 -0
  372. package/out-ts/decentraland/sdk/components/global_light.gen.ts +138 -0
  373. package/out-ts/decentraland/sdk/components/gltf_container.gen.ts +58 -18
  374. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +195 -0
  375. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +116 -0
  376. package/out-ts/decentraland/sdk/components/gltf_node_modifiers.gen.ts +204 -0
  377. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +139 -0
  378. package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +265 -0
  379. package/out-ts/decentraland/sdk/components/material.gen.ts +213 -94
  380. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +215 -100
  381. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +209 -94
  382. package/out-ts/decentraland/sdk/components/nft_shape.gen.ts +28 -28
  383. package/out-ts/decentraland/sdk/components/player_identity_data.gen.ts +102 -0
  384. package/out-ts/decentraland/sdk/components/pointer_events.gen.ts +186 -58
  385. package/out-ts/decentraland/sdk/components/pointer_events_result.gen.ts +42 -23
  386. package/out-ts/decentraland/sdk/components/pointer_lock.gen.ts +16 -16
  387. package/out-ts/decentraland/sdk/components/raycast.gen.ts +109 -34
  388. package/out-ts/decentraland/sdk/components/raycast_result.gen.ts +35 -20
  389. package/out-ts/decentraland/sdk/components/realm_info.gen.ts +183 -0
  390. package/out-ts/decentraland/sdk/components/text_shape.gen.ts +55 -37
  391. package/out-ts/decentraland/sdk/components/texture_camera.gen.ts +362 -0
  392. package/out-ts/decentraland/sdk/components/touch_screen_controls.gen.ts +265 -0
  393. package/out-ts/decentraland/sdk/components/tween.gen.ts +1336 -0
  394. package/out-ts/decentraland/sdk/components/tween_sequence.gen.ts +134 -0
  395. package/out-ts/decentraland/sdk/components/tween_state.gen.ts +136 -0
  396. package/out-ts/decentraland/sdk/components/ui_background.gen.ts +22 -21
  397. package/out-ts/decentraland/sdk/components/ui_canvas.gen.ts +115 -0
  398. package/out-ts/decentraland/sdk/components/ui_dropdown.gen.ts +43 -25
  399. package/out-ts/decentraland/sdk/components/ui_dropdown_result.gen.ts +16 -16
  400. package/out-ts/decentraland/sdk/components/ui_input.gen.ts +78 -24
  401. package/out-ts/decentraland/sdk/components/ui_input_binding.gen.ts +114 -0
  402. package/out-ts/decentraland/sdk/components/ui_input_result.gen.ts +35 -18
  403. package/out-ts/decentraland/sdk/components/ui_scroll_result.gen.ts +83 -0
  404. package/out-ts/decentraland/sdk/components/ui_text.gen.ts +99 -23
  405. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +725 -66
  406. package/out-ts/decentraland/sdk/components/video_player.gen.ts +80 -22
  407. package/out-ts/decentraland/sdk/components/visibility_component.gen.ts +46 -19
  408. package/out-ts/decentraland/sdk/development/local_development.gen.ts +316 -0
  409. package/out-ts/decentraland/sdk/ecs6/components_ecs6.gen.ts +8957 -0
  410. package/out-ts/decentraland/sdk/ecs6/engine_interface_ecs6.gen.ts +2886 -0
  411. package/out-ts/decentraland/social_service/errors.gen.ts +442 -0
  412. package/out-ts/decentraland/social_service/v1/social_service_v1.gen.ts +2799 -0
  413. package/out-ts/decentraland/social_service/v2/social_service_v2.gen.ts +10674 -0
  414. package/out-ts/google/protobuf/descriptor.gen.ts +529 -499
  415. package/out-ts/google/protobuf/empty.gen.ts +15 -15
  416. package/out-ts/quests.gen.ts +3 -0
  417. package/out-ts/sdk-development.gen.ts +3 -0
  418. package/package.json +20 -11
  419. package/proto/decentraland/common/border_rect.proto +9 -1
  420. package/proto/decentraland/common/colors.proto +6 -0
  421. package/proto/decentraland/common/floats.proto +8 -0
  422. package/proto/decentraland/common/options.proto +51 -0
  423. package/proto/decentraland/common/quantization_example.proto +164 -0
  424. package/proto/decentraland/common/texture.proto +21 -10
  425. package/proto/decentraland/common/vectors.proto +7 -0
  426. package/proto/decentraland/kernel/apis/comms_api.proto +61 -0
  427. package/proto/decentraland/kernel/apis/communications_controller.proto +19 -4
  428. package/proto/decentraland/kernel/apis/engine_api.proto +9 -110
  429. package/proto/decentraland/kernel/apis/environment_api.proto +1 -1
  430. package/proto/decentraland/kernel/apis/permissions.proto +1 -0
  431. package/proto/decentraland/kernel/apis/portable_experiences.proto +4 -1
  432. package/proto/decentraland/kernel/apis/restricted_actions.proto +122 -16
  433. package/proto/decentraland/kernel/apis/runtime.proto +47 -9
  434. package/proto/decentraland/kernel/apis/signed_fetch.proto +6 -0
  435. package/proto/decentraland/kernel/apis/testing.proto +100 -0
  436. package/proto/decentraland/kernel/comms/rfc4/comms.proto +101 -0
  437. package/proto/decentraland/kernel/comms/v3/archipelago.proto +58 -34
  438. package/proto/decentraland/pulse/pulse_client.proto +120 -0
  439. package/proto/decentraland/pulse/pulse_clusters.proto +61 -0
  440. package/proto/decentraland/pulse/pulse_server.proto +144 -0
  441. package/proto/decentraland/pulse/pulse_shared.proto +57 -0
  442. package/proto/decentraland/quests/definitions.proto +185 -0
  443. package/proto/decentraland/realm/about.proto +138 -0
  444. package/proto/decentraland/sdk/components/animator.proto +9 -4
  445. package/proto/decentraland/sdk/components/asset_load.proto +10 -0
  446. package/proto/decentraland/sdk/components/asset_load_loading_state.proto +16 -0
  447. package/proto/decentraland/sdk/components/audio_analysis.proto +44 -0
  448. package/proto/decentraland/sdk/components/audio_event.proto +12 -0
  449. package/proto/decentraland/sdk/components/audio_source.proto +10 -2
  450. package/proto/decentraland/sdk/components/audio_stream.proto +8 -0
  451. package/proto/decentraland/sdk/components/avatar_attach.proto +26 -3
  452. package/proto/decentraland/sdk/components/avatar_base.proto +16 -0
  453. package/proto/decentraland/sdk/components/avatar_emote_command.proto +32 -0
  454. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +23 -0
  455. package/proto/decentraland/sdk/components/avatar_locomotion_settings.proto +21 -0
  456. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +2 -0
  457. package/proto/decentraland/sdk/components/avatar_movement.proto +62 -0
  458. package/proto/decentraland/sdk/components/avatar_movement_info.proto +36 -0
  459. package/proto/decentraland/sdk/components/avatar_nametag.proto +33 -0
  460. package/proto/decentraland/sdk/components/avatar_shape.proto +3 -0
  461. package/proto/decentraland/sdk/components/billboard.proto +11 -3
  462. package/proto/decentraland/sdk/components/camera_layer.proto +30 -0
  463. package/proto/decentraland/sdk/components/camera_layers.proto +11 -0
  464. package/proto/decentraland/sdk/components/camera_mode_area.proto +1 -0
  465. package/proto/decentraland/sdk/components/common/avatar_mask.proto +7 -0
  466. package/proto/decentraland/sdk/components/common/camera_transition.proto +11 -0
  467. package/proto/decentraland/sdk/components/common/explorer_ui.proto +15 -0
  468. package/proto/decentraland/sdk/components/common/input_action.proto +12 -0
  469. package/proto/decentraland/sdk/components/common/loading_state.proto +10 -0
  470. package/proto/decentraland/sdk/components/common/media_state.proto +13 -0
  471. package/proto/decentraland/sdk/components/engine_info.proto +16 -0
  472. package/proto/decentraland/sdk/components/explorer_item_purchase_result.proto +24 -0
  473. package/proto/decentraland/sdk/components/explorer_ui_events_result.proto +33 -0
  474. package/proto/decentraland/sdk/components/global_light.proto +22 -0
  475. package/proto/decentraland/sdk/components/gltf_container.proto +6 -0
  476. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +26 -0
  477. package/proto/decentraland/sdk/components/gltf_node.proto +42 -0
  478. package/proto/decentraland/sdk/components/gltf_node_modifiers.proto +25 -0
  479. package/proto/decentraland/sdk/components/gltf_node_state.proto +20 -0
  480. package/proto/decentraland/sdk/components/input_modifier.proto +22 -0
  481. package/proto/decentraland/sdk/components/light_source.proto +28 -0
  482. package/proto/decentraland/sdk/components/main_camera.proto +11 -0
  483. package/proto/decentraland/sdk/components/map_pin.proto +16 -0
  484. package/proto/decentraland/sdk/components/material.proto +16 -4
  485. package/proto/decentraland/sdk/components/mesh_collider.proto +13 -6
  486. package/proto/decentraland/sdk/components/mesh_renderer.proto +10 -5
  487. package/proto/decentraland/sdk/components/nft_shape.proto +3 -3
  488. package/proto/decentraland/sdk/components/particle_system.proto +133 -0
  489. package/proto/decentraland/sdk/components/physics_combined_force.proto +21 -0
  490. package/proto/decentraland/sdk/components/physics_combined_impulse.proto +23 -0
  491. package/proto/decentraland/sdk/components/player_identity_data.proto +13 -0
  492. package/proto/decentraland/sdk/components/pointer_events.proto +33 -2
  493. package/proto/decentraland/sdk/components/pointer_events_result.proto +2 -1
  494. package/proto/decentraland/sdk/components/primary_pointer_info.proto +44 -0
  495. package/proto/decentraland/sdk/components/raycast.proto +14 -1
  496. package/proto/decentraland/sdk/components/raycast_result.proto +1 -0
  497. package/proto/decentraland/sdk/components/realm_info.proto +15 -0
  498. package/proto/decentraland/sdk/components/skybox_time.proto +20 -0
  499. package/proto/decentraland/sdk/components/text_shape.proto +1 -0
  500. package/proto/decentraland/sdk/components/texture_camera.proto +46 -0
  501. package/proto/decentraland/sdk/components/touch_screen_controls.proto +38 -0
  502. package/proto/decentraland/sdk/components/trigger_area.proto +23 -0
  503. package/proto/decentraland/sdk/components/trigger_area_result.proto +34 -0
  504. package/proto/decentraland/sdk/components/tween.proto +117 -0
  505. package/proto/decentraland/sdk/components/tween_sequence.proto +18 -0
  506. package/proto/decentraland/sdk/components/tween_state.proto +18 -0
  507. package/proto/decentraland/sdk/components/ui_background.proto +2 -2
  508. package/proto/decentraland/sdk/components/ui_canvas.proto +16 -0
  509. package/proto/decentraland/sdk/components/ui_canvas_information.proto +30 -0
  510. package/proto/decentraland/sdk/components/ui_dropdown.proto +1 -0
  511. package/proto/decentraland/sdk/components/ui_input.proto +3 -0
  512. package/proto/decentraland/sdk/components/ui_input_binding.proto +27 -0
  513. package/proto/decentraland/sdk/components/ui_input_result.proto +1 -0
  514. package/proto/decentraland/sdk/components/ui_scroll_result.proto +12 -0
  515. package/proto/decentraland/sdk/components/ui_text.proto +8 -1
  516. package/proto/decentraland/sdk/components/ui_transform.proto +57 -0
  517. package/proto/decentraland/sdk/components/video_event.proto +25 -0
  518. package/proto/decentraland/sdk/components/video_player.proto +8 -0
  519. package/proto/decentraland/sdk/components/virtual_camera.proto +18 -0
  520. package/proto/decentraland/sdk/components/visibility_component.proto +7 -0
  521. package/proto/decentraland/sdk/development/local_development.proto +29 -0
  522. package/proto/decentraland/sdk/ecs6/components_ecs6.proto +678 -0
  523. package/proto/decentraland/sdk/ecs6/engine_interface_ecs6.proto +151 -0
  524. package/proto/decentraland/social_service/errors.proto +30 -0
  525. package/proto/decentraland/social_service/v1/social_service_v1.proto +163 -0
  526. package/proto/decentraland/social_service/v2/social_service_v2.proto +721 -0
  527. package/protoc-gen-bitwise/generator_csharp.js +248 -0
  528. package/protoc-gen-bitwise/options.js +139 -0
  529. package/protoc-gen-bitwise/plugin.js +87 -0
  530. package/protoc-gen-bitwise/runtime/cs/Quantize.cs +70 -0
  531. package/protoc-gen-bitwise/wire.js +239 -0
  532. package/public/about.proto +5 -0
  533. package/public/comms.proto +2 -1
  534. package/public/quests.proto +5 -0
  535. package/public/sdk-apis.proto +2 -0
  536. package/public/sdk-components.proto +44 -19
  537. package/public/sdk-development.proto +5 -0
  538. package/public/social.proto +3 -1
  539. package/out-js/bff-services.gen.d.ts +0 -1
  540. package/out-js/bff-services.gen.js.map +0 -1
  541. package/out-js/decentraland/bff/authentication_service.gen.d.ts +0 -197
  542. package/out-js/decentraland/bff/authentication_service.gen.js +0 -266
  543. package/out-js/decentraland/bff/authentication_service.gen.js.map +0 -1
  544. package/out-js/decentraland/bff/comms_director_service.gen.d.ts +0 -289
  545. package/out-js/decentraland/bff/comms_director_service.gen.js +0 -228
  546. package/out-js/decentraland/bff/comms_director_service.gen.js.map +0 -1
  547. package/out-js/decentraland/bff/comms_service.gen.d.ts +0 -348
  548. package/out-js/decentraland/bff/comms_service.gen.js +0 -175
  549. package/out-js/decentraland/bff/comms_service.gen.js.map +0 -1
  550. package/out-js/decentraland/bff/http_endpoints.gen.d.ts +0 -929
  551. package/out-js/decentraland/bff/http_endpoints.gen.js +0 -873
  552. package/out-js/decentraland/bff/http_endpoints.gen.js.map +0 -1
  553. package/out-js/decentraland/bff/topics_service.gen.d.ts +0 -272
  554. package/out-js/decentraland/bff/topics_service.gen.js +0 -386
  555. package/out-js/decentraland/bff/topics_service.gen.js.map +0 -1
  556. package/out-js/decentraland/social/friendships/friendships.gen.d.ts +0 -4816
  557. package/out-js/decentraland/social/friendships/friendships.gen.js +0 -1334
  558. package/out-js/decentraland/social/friendships/friendships.gen.js.map +0 -1
  559. package/out-ts/bff-services.gen.ts +0 -3
  560. package/out-ts/decentraland/bff/authentication_service.gen.ts +0 -323
  561. package/out-ts/decentraland/bff/comms_director_service.gen.ts +0 -272
  562. package/out-ts/decentraland/bff/comms_service.gen.ts +0 -212
  563. package/out-ts/decentraland/bff/topics_service.gen.ts +0 -468
  564. package/out-ts/decentraland/social/friendships/friendships.gen.ts +0 -1598
  565. package/proto/buf.yaml +0 -47
  566. package/proto/decentraland/bff/authentication_service.proto +0 -27
  567. package/proto/decentraland/bff/comms_director_service.proto +0 -33
  568. package/proto/decentraland/bff/comms_service.proto +0 -25
  569. package/proto/decentraland/bff/http_endpoints.proto +0 -80
  570. package/proto/decentraland/bff/topics_service.proto +0 -34
  571. package/proto/decentraland/social/friendships/friendships.proto +0 -106
  572. package/proto/google/LICENSE +0 -27
  573. package/proto/google/README.md +0 -1
  574. package/proto/google/api/annotations.json +0 -83
  575. package/proto/google/api/annotations.proto +0 -11
  576. package/proto/google/api/http.json +0 -86
  577. package/proto/google/api/http.proto +0 -31
  578. package/proto/google/protobuf/api.json +0 -118
  579. package/proto/google/protobuf/api.proto +0 -34
  580. package/proto/google/protobuf/descriptor.json +0 -739
  581. package/proto/google/protobuf/descriptor.proto +0 -286
  582. package/proto/google/protobuf/source_context.json +0 -20
  583. package/proto/google/protobuf/source_context.proto +0 -7
  584. package/proto/google/protobuf/type.json +0 -202
  585. package/proto/google/protobuf/type.proto +0 -89
  586. package/public/bff-services.proto +0 -16
@@ -0,0 +1,248 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * C# code generator for the protoc-gen-bitwise plugin.
5
+ *
6
+ * For every proto message that contains at least one uint32 field annotated
7
+ * with [(quantized)], this module emits a C# partial class that adds a computed
8
+ * float property named {FieldName}Quantized. The getter decodes the stored
9
+ * uint32 to a float; the setter encodes a float back to a uint32. Standard
10
+ * protobuf handles serialization of the uint32 wire field; this class adds a
11
+ * typed float accessor on top.
12
+ *
13
+ * Only uint32 fields are supported. bit_packed and unannotated fields are
14
+ * passed through without generating any accessor.
15
+ *
16
+ * Port of the original generator_csharp.py — output is intended to be
17
+ * byte-for-byte identical.
18
+ */
19
+
20
+ const { getFieldOptions } = require('./options')
21
+
22
+ // FieldDescriptorProto type/label constants.
23
+ const TYPE_UINT32 = 13
24
+ const LABEL_REPEATED = 3
25
+
26
+ // ---------------------------------------------------------------------------
27
+ // Helpers
28
+ // ---------------------------------------------------------------------------
29
+
30
+ /** Mirrors Python str.capitalize(): upper-first, lowercase the rest. */
31
+ function capitalize(word) {
32
+ if (word.length === 0) return ''
33
+ return word[0].toUpperCase() + word.slice(1).toLowerCase()
34
+ }
35
+
36
+ /** position_x -> PositionX */
37
+ function snakeToPascal(name) {
38
+ return name.split('_').map(capitalize).join('')
39
+ }
40
+
41
+ /** decentraland.kernel.comms.v3 -> Decentraland.Kernel.Comms.V3 */
42
+ function packageToNamespace(pkg) {
43
+ if (!pkg) return 'Generated'
44
+ return pkg.split('.').map(capitalize).join('.')
45
+ }
46
+
47
+ /**
48
+ * Format a number with C printf %g semantics at `precision` significant digits:
49
+ * shortest of fixed/scientific, with trailing zeros and a trailing dot removed.
50
+ * Reproduces Python's `f'{value:.{precision}g}'`.
51
+ */
52
+ function formatG(value, precision) {
53
+ if (precision <= 0) precision = 1
54
+ if (value === 0) return '0'
55
+ if (!Number.isFinite(value)) return value > 0 ? 'inf' : 'nan'
56
+
57
+ const negative = value < 0
58
+ const v = Math.abs(value)
59
+
60
+ // Correctly-rounded scientific form yields the decimal exponent X (handling
61
+ // carry such as 9.999 -> 1.0e+1).
62
+ const sci = v.toExponential(precision - 1)
63
+ const eIdx = sci.indexOf('e')
64
+ const X = parseInt(sci.slice(eIdx + 1), 10)
65
+
66
+ let result
67
+ if (X >= -4 && X < precision) {
68
+ // Fixed notation with (precision - 1 - X) fraction digits.
69
+ const fractionDigits = precision - 1 - X
70
+ result = v.toFixed(fractionDigits >= 0 ? fractionDigits : 0)
71
+ if (result.indexOf('.') !== -1) {
72
+ result = result.replace(/0+$/, '').replace(/\.$/, '')
73
+ }
74
+ } else {
75
+ // Scientific notation; printf prints at least two exponent digits.
76
+ let mantissa = sci.slice(0, eIdx)
77
+ if (mantissa.indexOf('.') !== -1) {
78
+ mantissa = mantissa.replace(/0+$/, '').replace(/\.$/, '')
79
+ }
80
+ const expSign = X < 0 ? '-' : '+'
81
+ let expDigits = String(Math.abs(X))
82
+ if (expDigits.length < 2) expDigits = '0' + expDigits
83
+ result = mantissa + 'e' + expSign + expDigits
84
+ }
85
+
86
+ return (negative ? '-' : '') + result
87
+ }
88
+
89
+ /** Format a value as a C# float literal (e.g. -100.0f). */
90
+ function formatFloat(value) {
91
+ let text = formatG(value, 8)
92
+ if (text.indexOf('.') === -1 && text.indexOf('e') === -1 && text.indexOf('E') === -1) {
93
+ text += '.0'
94
+ }
95
+ return text + 'f'
96
+ }
97
+
98
+ /** Format a quantization step size for a doc comment (e.g. "≈ 0.003"). */
99
+ function formatStep(step) {
100
+ return '≈ ' + formatG(step, 6)
101
+ }
102
+
103
+ // ---------------------------------------------------------------------------
104
+ // Per-message code generation
105
+ // ---------------------------------------------------------------------------
106
+
107
+ /**
108
+ * Generate a C# partial class for a proto message, or null if it has no
109
+ * quantized uint32 fields. Returns an array of lines (no trailing newline).
110
+ */
111
+ function generateMessage(msgProto, indent) {
112
+ const i = indent || ' '
113
+ const props = []
114
+
115
+ for (const field of msgProto.field) {
116
+ // Repeated/map fields are not supported.
117
+ if (field.label === LABEL_REPEATED) continue
118
+ // Only uint32 fields are candidates for quantized accessors.
119
+ if (field.type !== TYPE_UINT32) continue
120
+
121
+ const { quantized, quantizedPower } = getFieldOptions(field.optionsRaw)
122
+ const propName = snakeToPascal(field.name)
123
+
124
+ let doc, getExpr, setExpr, step, bits
125
+ if (quantized !== null) {
126
+ const mn = formatFloat(quantized.min)
127
+ const mx = formatFloat(quantized.max)
128
+ bits = quantized.bits
129
+ // Uniform quantizer — the step is constant across the whole range.
130
+ step = (quantized.max - quantized.min) / ((1 << bits) - 1)
131
+ doc = `Range [${mn}, ${mx}], ${bits} bits, step ${formatStep(step)}.`
132
+ getExpr = `Quantize.Decode(${propName}, ${mn}, ${mx}, ${bits})`
133
+ setExpr = `Quantize.Encode(value, ${mn}, ${mx}, ${bits})`
134
+ } else if (quantizedPower !== null) {
135
+ const mx = formatFloat(quantizedPower.max)
136
+ const pw = formatFloat(quantizedPower.pow)
137
+ bits = quantizedPower.bits
138
+ // Power curve is non-uniform: the finest step sits next to zero (first magnitude code),
139
+ // the COARSEST at the top of the range. The coarsest step upper-bounds the error for any
140
+ // value, so that's what the exposed {Name}QuantizedStep const carries (safe as a tolerance).
141
+ const magSteps = (1 << (bits - 1)) - 1
142
+ const nearZeroStep = quantizedPower.max * Math.pow(1 / magSteps, quantizedPower.pow)
143
+ step = quantizedPower.max * (1 - Math.pow((magSteps - 1) / magSteps, quantizedPower.pow))
144
+ doc =
145
+ `Range [-${mx}, ${mx}], power ${pw}, ${bits} bits ` +
146
+ `(sign + ${bits - 1}-bit magnitude), near-zero step ${formatStep(nearZeroStep)}.`
147
+ getExpr = `Quantize.DecodePower(${propName}, ${mx}, ${pw}, ${bits})`
148
+ setExpr = `Quantize.EncodePower(value, ${mx}, ${pw}, ${bits})`
149
+ } else {
150
+ continue
151
+ }
152
+
153
+ // Highest code the encoder can emit for this field. Both the linear quantizer (top code
154
+ // `2^bits - 1`) and the power quantizer (`(magnitude << 1) | sign` with an `bits-1`-bit
155
+ // magnitude, so top code `((2^(bits-1)-1) << 1) | 1 == 2^bits - 1`) share this bound.
156
+ const maxCode = 2 ** bits - 1
157
+
158
+ props.push({ propName, doc, getExpr, setExpr, step, maxCode })
159
+ }
160
+
161
+ if (props.length === 0) return null
162
+
163
+ const lines = []
164
+ lines.push(`public partial class ${msgProto.name}`)
165
+ lines.push('{')
166
+
167
+ // Decode on every get, encode on every set — no backing cache. The raw uint32 property is the
168
+ // single source of truth, so the float accessor can never disagree with the code on the wire
169
+ // (get-after-set returns the on-grid value a receiver decodes) and there is no stale-cache
170
+ // hazard when the raw field is mutated directly. Decode is a multiply-add; only power fields
171
+ // pay a MathF.Pow.
172
+ for (const { propName, doc, getExpr, setExpr, step } of props) {
173
+ lines.push(`${i}/// <summary>Coarsest quantization step of <see cref="${propName}Quantized"/>. Safe as an equality tolerance.</summary>`)
174
+ lines.push(`${i}public const float ${propName}QuantizedStep = ${formatFloat(step)};`)
175
+ lines.push(`${i}/// <summary>Float accessor for <see cref="${propName}"/>. ${doc}</summary>`)
176
+ lines.push(`${i}public float ${propName}Quantized`)
177
+ lines.push(`${i}{`)
178
+ lines.push(`${i}${i}get => ${getExpr};`)
179
+ lines.push(`${i}${i}set => ${propName} = ${setExpr};`)
180
+ lines.push(`${i}}`)
181
+ lines.push('')
182
+ }
183
+
184
+ lines.push(`${i}/// <summary>`)
185
+ lines.push(`${i}/// True when every quantized field holds a wire code within its declared bit width`)
186
+ lines.push(`${i}/// (<c>0 .. 2^bits-1</c>). The encoder never emits a code above this bound, so a larger`)
187
+ lines.push(`${i}/// value is a malformed/hostile message: decoding it would land far outside the field's`)
188
+ lines.push(`${i}/// <c>[min, max]</c> and, since the server relays raw codes verbatim, poison every observer.`)
189
+ lines.push(`${i}/// Reject before storing or relaying. Pure integer comparison — no decode.`)
190
+ lines.push(`${i}/// </summary>`)
191
+ lines.push(`${i}public bool AreQuantizedFieldsInRange() =>`)
192
+ props.forEach(({ propName, maxCode }, idx) => {
193
+ const prefix = idx === 0 ? '' : '&& '
194
+ const suffix = idx === props.length - 1 ? ';' : ''
195
+ lines.push(`${i}${i}${prefix}${propName} <= ${maxCode}u${suffix}`)
196
+ })
197
+
198
+ lines.push('}')
199
+ return lines
200
+ }
201
+
202
+ // ---------------------------------------------------------------------------
203
+ // Per-file code generation (public entry point)
204
+ // ---------------------------------------------------------------------------
205
+
206
+ /**
207
+ * Generate a C# source file for a FileDescriptorProto, or null if the file
208
+ * contains no quantized uint32 fields.
209
+ * @returns {{name: string, content: string} | null}
210
+ */
211
+ function generateCsharp(fileProto) {
212
+ const namespace = packageToNamespace(fileProto.package)
213
+
214
+ const protoFile = fileProto.name.split('/').pop()
215
+ const stem = snakeToPascal(protoFile.replace('.proto', ''))
216
+ const outName = `${stem}.Bitwise.cs`
217
+
218
+ const header = [
219
+ '// <auto-generated>',
220
+ '// Generated by protoc-gen-bitwise. DO NOT EDIT.',
221
+ `// Source: ${fileProto.name}`,
222
+ '// </auto-generated>',
223
+ '',
224
+ 'using Decentraland.Networking.Bitwise;',
225
+ '',
226
+ `namespace ${namespace}`,
227
+ '{',
228
+ ]
229
+ const footer = ['', `} // namespace ${namespace}`]
230
+
231
+ const body = []
232
+ for (const msg of fileProto.messageType) {
233
+ const msgLines = generateMessage(msg)
234
+ if (msgLines === null) continue
235
+ // Indent each line by 4 spaces (inside the namespace block).
236
+ for (const line of msgLines) {
237
+ body.push(line ? ' ' + line : '')
238
+ }
239
+ body.push('')
240
+ }
241
+
242
+ if (body.length === 0) return null
243
+
244
+ const content = header.concat(body, footer).join('\n') + '\n'
245
+ return { name: outName, content }
246
+ }
247
+
248
+ module.exports = { generateCsharp }
@@ -0,0 +1,139 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * Parser for the custom bitwise field options defined in options.proto.
5
+ *
6
+ * The descriptor decoder hands us the raw serialized FieldOptions bytes (it
7
+ * declares `options` as opaque bytes). We walk those bytes looking for the
8
+ * custom extension field numbers — protobuf preserves unknown/unregistered
9
+ * extension bytes, so they are always present even though no runtime here knows
10
+ * the extension schema. This mirrors the original options_pb2.py.
11
+ *
12
+ * Wire format: tag = (field_number << 3) | wire_type
13
+ * wire_type 0 = varint, 1 = 64-bit, 2 = length-delimited, 5 = 32-bit
14
+ */
15
+
16
+ const { readVarint, skipField } = require('./wire')
17
+
18
+ // Extension field numbers as defined in options.proto.
19
+ const QUANTIZED_FIELD_NUMBER = 50001
20
+ const BIT_PACKED_FIELD_NUMBER = 50002
21
+ const QUANTIZED_POWER_FIELD_NUMBER = 50003
22
+
23
+ /** Parse a serialized QuantizedFloatOptions message: { min, max, bits }. */
24
+ function parseQuantized(data) {
25
+ const opts = { min: 0.0, max: 0.0, bits: 0 }
26
+ let pos = 0
27
+ while (pos < data.length) {
28
+ let tag
29
+ ;[tag, pos] = readVarint(data, pos)
30
+ const fieldNum = tag >>> 3
31
+ const wireType = tag & 0x7
32
+ if (fieldNum === 1 && wireType === 5) {
33
+ // min (float)
34
+ opts.min = data.readFloatLE(pos)
35
+ pos += 4
36
+ } else if (fieldNum === 2 && wireType === 5) {
37
+ // max (float)
38
+ opts.max = data.readFloatLE(pos)
39
+ pos += 4
40
+ } else if (fieldNum === 3 && wireType === 0) {
41
+ // bits (uint32)
42
+ ;[opts.bits, pos] = readVarint(data, pos)
43
+ } else {
44
+ pos = skipField(data, pos, wireType)
45
+ }
46
+ }
47
+ return opts
48
+ }
49
+
50
+ /** Parse a serialized QuantizedPowerFloatOptions message: { max, pow, bits }. */
51
+ function parseQuantizedPower(data) {
52
+ const opts = { max: 0.0, pow: 0.0, bits: 0 }
53
+ let pos = 0
54
+ while (pos < data.length) {
55
+ let tag
56
+ ;[tag, pos] = readVarint(data, pos)
57
+ const fieldNum = tag >>> 3
58
+ const wireType = tag & 0x7
59
+ if (fieldNum === 1 && wireType === 5) {
60
+ // max (float)
61
+ opts.max = data.readFloatLE(pos)
62
+ pos += 4
63
+ } else if (fieldNum === 2 && wireType === 5) {
64
+ // pow (float)
65
+ opts.pow = data.readFloatLE(pos)
66
+ pos += 4
67
+ } else if (fieldNum === 3 && wireType === 0) {
68
+ // bits (uint32)
69
+ ;[opts.bits, pos] = readVarint(data, pos)
70
+ } else {
71
+ pos = skipField(data, pos, wireType)
72
+ }
73
+ }
74
+ return opts
75
+ }
76
+
77
+ /** Parse a serialized BitPackedOptions message: { bits }. */
78
+ function parseBitPacked(data) {
79
+ const opts = { bits: 0 }
80
+ let pos = 0
81
+ while (pos < data.length) {
82
+ let tag
83
+ ;[tag, pos] = readVarint(data, pos)
84
+ const fieldNum = tag >>> 3
85
+ const wireType = tag & 0x7
86
+ if (fieldNum === 1 && wireType === 0) {
87
+ // bits (uint32)
88
+ ;[opts.bits, pos] = readVarint(data, pos)
89
+ } else {
90
+ pos = skipField(data, pos, wireType)
91
+ }
92
+ }
93
+ return opts
94
+ }
95
+
96
+ /**
97
+ * Extract custom bitwise options from raw FieldOptions bytes.
98
+ *
99
+ * @param {Buffer|null} optionsRaw serialized FieldOptions, or null when unset.
100
+ * @returns {{quantized: object|null, bitPacked: object|null, quantizedPower: object|null}}
101
+ */
102
+ function getFieldOptions(optionsRaw) {
103
+ if (!optionsRaw || optionsRaw.length === 0) {
104
+ return { quantized: null, bitPacked: null, quantizedPower: null }
105
+ }
106
+
107
+ let quantized = null
108
+ let bitPacked = null
109
+ let quantizedPower = null
110
+ let pos = 0
111
+
112
+ while (pos < optionsRaw.length) {
113
+ let tag
114
+ ;[tag, pos] = readVarint(optionsRaw, pos)
115
+ const fieldNum = tag >>> 3
116
+ const wireType = tag & 0x7
117
+
118
+ if (wireType === 2) {
119
+ let len
120
+ ;[len, pos] = readVarint(optionsRaw, pos)
121
+ const valueBytes = optionsRaw.subarray(pos, pos + len)
122
+ pos += len
123
+ if (fieldNum === QUANTIZED_FIELD_NUMBER) {
124
+ quantized = parseQuantized(valueBytes)
125
+ } else if (fieldNum === BIT_PACKED_FIELD_NUMBER) {
126
+ bitPacked = parseBitPacked(valueBytes)
127
+ } else if (fieldNum === QUANTIZED_POWER_FIELD_NUMBER) {
128
+ quantizedPower = parseQuantizedPower(valueBytes)
129
+ }
130
+ // else: unknown length-delimited field — already consumed.
131
+ } else {
132
+ pos = skipField(optionsRaw, pos, wireType)
133
+ }
134
+ }
135
+
136
+ return { quantized, bitPacked, quantizedPower }
137
+ }
138
+
139
+ module.exports = { getFieldOptions }
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env node
2
+ 'use strict'
3
+
4
+ /**
5
+ * protoc-gen-bitwise — protoc plugin that generates C# bitwise serialization code.
6
+ *
7
+ * Protocol:
8
+ * 1. protoc writes a serialised CodeGeneratorRequest to this process's stdin.
9
+ * 2. This plugin reads it, generates C# partial classes with float accessor
10
+ * properties for every message that carries [(quantized)] field annotations.
11
+ * 3. A serialised CodeGeneratorResponse is written to stdout.
12
+ *
13
+ * Implemented in plain Node with a self-contained protobuf wire codec (see
14
+ * wire.js) so it runs with only `node` on PATH — no npm install required, even
15
+ * when invoked directly from a sibling checkout.
16
+ *
17
+ * Usage (from project root):
18
+ * protoc \
19
+ * --proto_path=proto \
20
+ * --bitwise_out=generated/ \
21
+ * --plugin=protoc-gen-bitwise=protoc-gen-bitwise/plugin.js \
22
+ * proto/my_messages.proto
23
+ *
24
+ * On Windows, protoc needs an executable wrapper, e.g. a .cmd that runs:
25
+ * node "<path>\protoc-gen-bitwise\plugin.js" %*
26
+ */
27
+
28
+ const { decodeRequest, encodeResponse } = require('./wire')
29
+ const { generateCsharp } = require('./generator_csharp')
30
+
31
+ // CodeGeneratorResponse.Feature.FEATURE_PROTO3_OPTIONAL — advertised so protoc
32
+ // does not reject the plugin when the schema uses proto3 `optional` fields.
33
+ const FEATURE_PROTO3_OPTIONAL = 1
34
+
35
+ function readStdin() {
36
+ return new Promise((resolve, reject) => {
37
+ const chunks = []
38
+ process.stdin.on('data', (chunk) => chunks.push(chunk))
39
+ process.stdin.on('end', () => resolve(Buffer.concat(chunks)))
40
+ process.stdin.on('error', reject)
41
+ })
42
+ }
43
+
44
+ async function main() {
45
+ const requestBytes = await readStdin()
46
+ const request = decodeRequest(requestBytes)
47
+
48
+ // Lookup map for all file descriptors (parity with the Python plugin).
49
+ const fileByName = new Map()
50
+ for (const file of request.protoFile) fileByName.set(file.name, file)
51
+
52
+ const files = []
53
+ let error = null
54
+
55
+ for (const fileName of request.fileToGenerate) {
56
+ // Skip the options definition file itself — it has no messages to generate.
57
+ if (fileName === 'decentraland/common/options.proto') continue
58
+
59
+ const fileProto = fileByName.get(fileName)
60
+ if (!fileProto) continue
61
+
62
+ try {
63
+ const generated = generateCsharp(fileProto)
64
+ if (generated) files.push(generated)
65
+ } catch (exc) {
66
+ error = `protoc-gen-bitwise: error processing ${fileName}: ${exc && exc.message ? exc.message : exc}`
67
+ }
68
+ }
69
+
70
+ const response = encodeResponse({
71
+ error,
72
+ supportedFeatures: FEATURE_PROTO3_OPTIONAL,
73
+ files,
74
+ })
75
+
76
+ // Let the write flush before the process exits (do not call process.exit()).
77
+ process.stdout.write(response)
78
+ }
79
+
80
+ main().catch((exc) => {
81
+ const response = encodeResponse({
82
+ error: `protoc-gen-bitwise: ${exc && exc.stack ? exc.stack : exc}`,
83
+ supportedFeatures: FEATURE_PROTO3_OPTIONAL,
84
+ files: [],
85
+ })
86
+ process.stdout.write(response)
87
+ })
@@ -0,0 +1,70 @@
1
+ // Decentraland.Networking.Bitwise — Quantize
2
+ // Copy this file into your project alongside generated *.Bitwise.cs files.
3
+ // ReSharper disable once RedundantUsingDirective
4
+
5
+ using System;
6
+
7
+ namespace Decentraland.Networking.Bitwise
8
+ // ReSharper disable once ArrangeNamespaceBody
9
+ {
10
+ /// <summary>
11
+ /// Static helpers for quantizing float values to/from unsigned integers.
12
+ /// Intended for use with protobuf uint32 fields: the integer is transmitted
13
+ /// as a protobuf varint, while the float accessor lives in a generated partial class.
14
+ /// </summary>
15
+ public static class Quantize
16
+ {
17
+ /// <summary>
18
+ /// Encodes <paramref name="value" /> to a quantized <see cref="uint" />.
19
+ /// Values outside [<paramref name="min" />, <paramref name="max" />] are clamped.
20
+ /// </summary>
21
+ public static uint Encode(float value, float min, float max, int bits)
22
+ {
23
+ var steps = (1u << bits) - 1;
24
+ var t = Math.Clamp((value - min) / (max - min), 0f, 1f);
25
+ return (uint)MathF.Round(t * steps);
26
+ }
27
+
28
+ /// <summary>Decodes a quantized <see cref="uint" /> back to a float.</summary>
29
+ public static float Decode(uint encoded, float min, float max, int bits)
30
+ {
31
+ var steps = (1u << bits) - 1;
32
+ return (float)encoded / steps * (max - min) + min;
33
+ }
34
+
35
+ /// <summary>
36
+ /// Encodes <paramref name="value" /> with a power-law curve into an
37
+ /// (<paramref name="bits" /> - 1)-bit linear unorm magnitude plus a sign bit. The magnitude is
38
+ /// <c>(|value| / max)^(1/pow)</c>, so the inverse <see cref="DecodePower" /> reconstructs
39
+ /// <c>sign * max * u^pow</c>. Zero is representable exactly; <paramref name="pow" /> &gt; 1
40
+ /// concentrates resolution near zero. Magnitudes outside [0, <paramref name="max" />] are
41
+ /// clamped.
42
+ /// <para>
43
+ /// The encoded layout puts the magnitude in the high bits and the sign in the LSB
44
+ /// (<c>(magnitude &lt;&lt; 1) | sign</c>). This keeps the varint cost a function of
45
+ /// magnitude rather than direction — a small <c>|value|</c> of either sign stays in a
46
+ /// single varint byte. Zero canonicalizes to <c>0</c> (a zero magnitude never sets the
47
+ /// sign bit), so proto3 still omits a stopped field entirely.
48
+ /// </para>
49
+ /// </summary>
50
+ public static uint EncodePower(float value, float max, float pow, int bits)
51
+ {
52
+ var magnitudeSteps = (1u << (bits - 1)) - 1;
53
+ var t = Math.Clamp(MathF.Abs(value) / max, 0f, 1f);
54
+ var u = MathF.Pow(t, 1f / pow);
55
+ var magnitude = (uint)MathF.Round(u * magnitudeSteps);
56
+ var sign = value < 0f && magnitude != 0u ? 1u : 0u;
57
+ return (magnitude << 1) | sign;
58
+ }
59
+
60
+ /// <summary>Decodes a power-law quantized <see cref="uint" /> back to a float (inverse of
61
+ /// <see cref="EncodePower" />).</summary>
62
+ public static float DecodePower(uint encoded, float max, float pow, int bits)
63
+ {
64
+ var magnitudeSteps = (1u << (bits - 1)) - 1;
65
+ var u = (float)(encoded >> 1) / magnitudeSteps;
66
+ var magnitude = max * MathF.Pow(u, pow);
67
+ return (encoded & 1u) != 0 ? -magnitude : magnitude;
68
+ }
69
+ }
70
+ }