@dcl/protocol 1.0.0-40563911091.commit-694568d → 1.0.0-40603192045.commit-e7bab56

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 (150) hide show
  1. package/out-js/decentraland/common/texture.gen.d.ts +18 -0
  2. package/out-js/decentraland/common/texture.gen.js +104 -4
  3. package/out-js/decentraland/common/texture.gen.js.map +1 -1
  4. package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +113 -2
  5. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +387 -3
  6. package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
  7. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +2 -0
  8. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +19 -2
  9. package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
  10. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +51 -0
  11. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +177 -0
  12. package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +1 -0
  13. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +2 -0
  14. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +14 -2
  15. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
  16. package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +71 -0
  17. package/out-js/decentraland/sdk/components/avatar_movement.gen.js +303 -0
  18. package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +1 -0
  19. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +79 -0
  20. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +357 -0
  21. package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +1 -0
  22. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +2 -0
  23. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +19 -1
  24. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
  25. package/out-js/decentraland/sdk/components/camera_layer.gen.d.ts +46 -0
  26. package/out-js/decentraland/sdk/components/camera_layer.gen.js +162 -0
  27. package/out-js/decentraland/sdk/components/camera_layer.gen.js.map +1 -0
  28. package/out-js/decentraland/sdk/components/camera_layers.gen.d.ts +30 -0
  29. package/out-js/decentraland/sdk/components/camera_layers.gen.js +80 -0
  30. package/out-js/decentraland/sdk/components/camera_layers.gen.js.map +1 -0
  31. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +2 -0
  32. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +14 -2
  33. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
  34. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +3 -0
  35. package/out-js/decentraland/sdk/components/common/input_action.gen.js +18 -0
  36. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
  37. package/out-js/decentraland/sdk/components/global_light.gen.d.ts +50 -0
  38. package/out-js/decentraland/sdk/components/{sun.gen.js → global_light.gen.js} +37 -48
  39. package/out-js/decentraland/sdk/components/global_light.gen.js.map +1 -0
  40. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +19 -0
  41. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +90 -3
  42. package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
  43. package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +66 -0
  44. package/out-js/decentraland/sdk/components/gltf_node.gen.js +69 -0
  45. package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +1 -0
  46. package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +43 -0
  47. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +122 -0
  48. package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +1 -0
  49. package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +52 -0
  50. package/out-js/decentraland/sdk/components/input_modifier.gen.js +233 -0
  51. package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +1 -0
  52. package/out-js/decentraland/sdk/components/material.gen.d.ts +20 -0
  53. package/out-js/decentraland/sdk/components/material.gen.js +86 -2
  54. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
  55. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +18 -0
  56. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +90 -4
  57. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
  58. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +19 -3
  59. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +90 -4
  60. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
  61. package/out-js/decentraland/sdk/components/raycast.gen.d.ts +13 -0
  62. package/out-js/decentraland/sdk/components/raycast.gen.js +64 -2
  63. package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
  64. package/out-js/decentraland/sdk/components/texture_camera.gen.d.ts +86 -0
  65. package/out-js/decentraland/sdk/components/texture_camera.gen.js +296 -0
  66. package/out-js/decentraland/sdk/components/texture_camera.gen.js.map +1 -0
  67. package/out-js/decentraland/sdk/components/ui_canvas.gen.d.ts +35 -0
  68. package/out-js/decentraland/sdk/components/ui_canvas.gen.js +98 -0
  69. package/out-js/decentraland/sdk/components/ui_canvas.gen.js.map +1 -0
  70. package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +4 -0
  71. package/out-js/decentraland/sdk/components/ui_input.gen.js +28 -2
  72. package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -1
  73. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.d.ts +31 -0
  74. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js +71 -0
  75. package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js.map +1 -0
  76. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +33 -0
  77. package/out-js/decentraland/sdk/components/ui_transform.gen.js +176 -3
  78. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
  79. package/out-ts/decentraland/common/texture.gen.ts +119 -4
  80. package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +414 -2
  81. package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +20 -1
  82. package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +237 -0
  83. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +16 -1
  84. package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +372 -0
  85. package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +432 -0
  86. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +23 -1
  87. package/out-ts/decentraland/sdk/components/camera_layer.gen.ts +202 -0
  88. package/out-ts/decentraland/sdk/components/camera_layers.gen.ts +92 -0
  89. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +16 -1
  90. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +18 -0
  91. package/out-ts/decentraland/sdk/components/global_light.gen.ts +138 -0
  92. package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +108 -2
  93. package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +116 -0
  94. package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +139 -0
  95. package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +265 -0
  96. package/out-ts/decentraland/sdk/components/material.gen.ts +102 -1
  97. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +99 -0
  98. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +100 -3
  99. package/out-ts/decentraland/sdk/components/raycast.gen.ts +73 -1
  100. package/out-ts/decentraland/sdk/components/texture_camera.gen.ts +362 -0
  101. package/out-ts/decentraland/sdk/components/ui_canvas.gen.ts +115 -0
  102. package/out-ts/decentraland/sdk/components/ui_input.gen.ts +36 -0
  103. package/out-ts/decentraland/sdk/components/ui_scroll_result.gen.ts +83 -0
  104. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +193 -0
  105. package/package.json +2 -2
  106. package/proto/decentraland/common/texture.proto +8 -1
  107. package/proto/decentraland/kernel/apis/restricted_actions.proto +38 -0
  108. package/proto/decentraland/sdk/components/avatar_equipped_data.proto +2 -1
  109. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +1 -0
  110. package/proto/decentraland/sdk/components/avatar_movement.proto +62 -0
  111. package/proto/decentraland/sdk/components/avatar_movement_info.proto +36 -0
  112. package/proto/decentraland/sdk/components/avatar_shape.proto +1 -0
  113. package/proto/decentraland/sdk/components/camera_layer.proto +30 -0
  114. package/proto/decentraland/sdk/components/camera_layers.proto +11 -0
  115. package/proto/decentraland/sdk/components/camera_mode_area.proto +1 -0
  116. package/proto/decentraland/sdk/components/common/input_action.proto +3 -0
  117. package/proto/decentraland/sdk/components/global_light.proto +22 -0
  118. package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +13 -0
  119. package/proto/decentraland/sdk/components/gltf_node.proto +42 -0
  120. package/proto/decentraland/sdk/components/gltf_node_state.proto +20 -0
  121. package/proto/decentraland/sdk/components/material.proto +13 -1
  122. package/proto/decentraland/sdk/components/mesh_collider.proto +7 -0
  123. package/proto/decentraland/sdk/components/mesh_renderer.proto +8 -3
  124. package/proto/decentraland/sdk/components/primary_pointer_info.proto +5 -0
  125. package/proto/decentraland/sdk/components/raycast.proto +13 -0
  126. package/proto/decentraland/sdk/components/texture_camera.proto +46 -0
  127. package/proto/decentraland/sdk/components/ui_canvas.proto +16 -0
  128. package/proto/decentraland/sdk/components/ui_input.proto +2 -0
  129. package/proto/decentraland/sdk/components/ui_scroll_result.proto +12 -0
  130. package/proto/decentraland/sdk/components/ui_transform.proto +20 -0
  131. package/public/sdk-components.proto +10 -3
  132. package/out-js/decentraland/common/gradient.gen.d.ts +0 -50
  133. package/out-js/decentraland/common/gradient.gen.js +0 -147
  134. package/out-js/decentraland/common/gradient.gen.js.map +0 -1
  135. package/out-js/decentraland/sdk/components/environment_fog.gen.d.ts +0 -44
  136. package/out-js/decentraland/sdk/components/environment_fog.gen.js +0 -86
  137. package/out-js/decentraland/sdk/components/environment_fog.gen.js.map +0 -1
  138. package/out-js/decentraland/sdk/components/skybox.gen.d.ts +0 -103
  139. package/out-js/decentraland/sdk/components/skybox.gen.js +0 -355
  140. package/out-js/decentraland/sdk/components/skybox.gen.js.map +0 -1
  141. package/out-js/decentraland/sdk/components/sun.gen.d.ts +0 -53
  142. package/out-js/decentraland/sdk/components/sun.gen.js.map +0 -1
  143. package/out-ts/decentraland/common/gradient.gen.ts +0 -170
  144. package/out-ts/decentraland/sdk/components/environment_fog.gen.ts +0 -113
  145. package/out-ts/decentraland/sdk/components/skybox.gen.ts +0 -440
  146. package/out-ts/decentraland/sdk/components/sun.gen.ts +0 -155
  147. package/proto/decentraland/common/gradient.proto +0 -16
  148. package/proto/decentraland/sdk/components/environment_fog.proto +0 -21
  149. package/proto/decentraland/sdk/components/skybox.proto +0 -51
  150. package/proto/decentraland/sdk/components/sun.proto +0 -26
@@ -1,440 +0,0 @@
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
- * PBSkybox overrides the visible sky 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
- * The sun is controlled by `PBSun` and the fog by `PBEnvironmentFog`.
15
- *
16
- * While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
17
- */
18
- export interface PBSkybox {
19
- /**
20
- * Replaces the visible sky with an image, given as its source path with the same rules as `Texture.src`.
21
- * It must be an equirectangular (latitude-longitude) image with a 2:1 aspect ratio:
22
- * the image centre faces +Z, the top row is the zenith and the bottom row the nadir.
23
- * Cube cross, 3x2 and six-face layouts are not supported.
24
- * The sun, the fog and the ambient lighting do not change: the ambient still follows `sky_colors`.
25
- */
26
- skyboxTexture?:
27
- | string
28
- | undefined;
29
- /**
30
- * Procedural sky colors. They also drive the ambient lighting, also while `skybox_texture` is set.
31
- * While `skybox_texture` is set they no longer color the visible sky.
32
- */
33
- skyColors?:
34
- | PBSkybox_SkyColors
35
- | undefined;
36
- /** Ignored while `skybox_texture` is set. */
37
- clouds?:
38
- | PBSkybox_Clouds
39
- | undefined;
40
- /** Ignored while `skybox_texture` is set. */
41
- stars?: PBSkybox_Stars | undefined;
42
- }
43
-
44
- export interface PBSkybox_SkyColors {
45
- /** the sky straight up */
46
- zenith?:
47
- | ColorGradient
48
- | undefined;
49
- /** the broad band of sky around the horizon */
50
- horizon?:
51
- | ColorGradient
52
- | undefined;
53
- /** The sky below the horizon, visible wherever no terrain covers it (landscape disabled, high altitude). */
54
- nadir?:
55
- | ColorGradient
56
- | undefined;
57
- /** Narrow glow right on the horizon line, like a sunset glow. Unset = follows `horizon` when that is set. */
58
- rim?: ColorGradient | undefined;
59
- }
60
-
61
- export interface PBSkybox_Clouds {
62
- /** default = 1, from 0 to 1 */
63
- opacity?:
64
- | number
65
- | undefined;
66
- /** default = 0.01, in radians per second around the sky axis (0.01 is one turn every ~10 minutes). 0 = static, negative reverses the direction */
67
- speed?: number | undefined;
68
- color?: ColorGradient | undefined;
69
- }
70
-
71
- export interface PBSkybox_Stars {
72
- /** default = 4.62, multiplier on the star texture (1 = as authored, values above 1 are HDR). 0 hides the stars, negative values clamp to 0. Stars are visible only at night */
73
- brightness?: number | undefined;
74
- }
75
-
76
- function createBasePBSkybox(): PBSkybox {
77
- return { skyboxTexture: undefined, skyColors: undefined, clouds: undefined, stars: undefined };
78
- }
79
-
80
- export namespace PBSkybox {
81
- export function encode(message: PBSkybox, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
82
- if (message.skyboxTexture !== undefined) {
83
- writer.uint32(10).string(message.skyboxTexture);
84
- }
85
- if (message.skyColors !== undefined) {
86
- PBSkybox_SkyColors.encode(message.skyColors, writer.uint32(18).fork()).ldelim();
87
- }
88
- if (message.clouds !== undefined) {
89
- PBSkybox_Clouds.encode(message.clouds, writer.uint32(26).fork()).ldelim();
90
- }
91
- if (message.stars !== undefined) {
92
- PBSkybox_Stars.encode(message.stars, writer.uint32(34).fork()).ldelim();
93
- }
94
- return writer;
95
- }
96
-
97
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox {
98
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
99
- let end = length === undefined ? reader.len : reader.pos + length;
100
- const message = createBasePBSkybox();
101
- while (reader.pos < end) {
102
- const tag = reader.uint32();
103
- switch (tag >>> 3) {
104
- case 1:
105
- if (tag !== 10) {
106
- break;
107
- }
108
-
109
- message.skyboxTexture = reader.string();
110
- continue;
111
- case 2:
112
- if (tag !== 18) {
113
- break;
114
- }
115
-
116
- message.skyColors = PBSkybox_SkyColors.decode(reader, reader.uint32());
117
- continue;
118
- case 3:
119
- if (tag !== 26) {
120
- break;
121
- }
122
-
123
- message.clouds = PBSkybox_Clouds.decode(reader, reader.uint32());
124
- continue;
125
- case 4:
126
- if (tag !== 34) {
127
- break;
128
- }
129
-
130
- message.stars = PBSkybox_Stars.decode(reader, reader.uint32());
131
- continue;
132
- }
133
- if ((tag & 7) === 4 || tag === 0) {
134
- break;
135
- }
136
- reader.skipType(tag & 7);
137
- }
138
- return message;
139
- }
140
-
141
- export function fromJSON(object: any): PBSkybox {
142
- return {
143
- skyboxTexture: isSet(object.skyboxTexture) ? String(object.skyboxTexture) : undefined,
144
- skyColors: isSet(object.skyColors) ? PBSkybox_SkyColors.fromJSON(object.skyColors) : undefined,
145
- clouds: isSet(object.clouds) ? PBSkybox_Clouds.fromJSON(object.clouds) : undefined,
146
- stars: isSet(object.stars) ? PBSkybox_Stars.fromJSON(object.stars) : undefined,
147
- };
148
- }
149
-
150
- export function toJSON(message: PBSkybox): unknown {
151
- const obj: any = {};
152
- message.skyboxTexture !== undefined && (obj.skyboxTexture = message.skyboxTexture);
153
- message.skyColors !== undefined &&
154
- (obj.skyColors = message.skyColors ? PBSkybox_SkyColors.toJSON(message.skyColors) : undefined);
155
- message.clouds !== undefined && (obj.clouds = message.clouds ? PBSkybox_Clouds.toJSON(message.clouds) : undefined);
156
- message.stars !== undefined && (obj.stars = message.stars ? PBSkybox_Stars.toJSON(message.stars) : undefined);
157
- return obj;
158
- }
159
-
160
- export function create<I extends Exact<DeepPartial<PBSkybox>, I>>(base?: I): PBSkybox {
161
- return PBSkybox.fromPartial(base ?? {});
162
- }
163
-
164
- export function fromPartial<I extends Exact<DeepPartial<PBSkybox>, I>>(object: I): PBSkybox {
165
- const message = createBasePBSkybox();
166
- message.skyboxTexture = object.skyboxTexture ?? undefined;
167
- message.skyColors = (object.skyColors !== undefined && object.skyColors !== null)
168
- ? PBSkybox_SkyColors.fromPartial(object.skyColors)
169
- : undefined;
170
- message.clouds = (object.clouds !== undefined && object.clouds !== null)
171
- ? PBSkybox_Clouds.fromPartial(object.clouds)
172
- : undefined;
173
- message.stars = (object.stars !== undefined && object.stars !== null)
174
- ? PBSkybox_Stars.fromPartial(object.stars)
175
- : undefined;
176
- return message;
177
- }
178
- }
179
-
180
- function createBasePBSkybox_SkyColors(): PBSkybox_SkyColors {
181
- return { zenith: undefined, horizon: undefined, nadir: undefined, rim: undefined };
182
- }
183
-
184
- export namespace PBSkybox_SkyColors {
185
- export function encode(message: PBSkybox_SkyColors, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
186
- if (message.zenith !== undefined) {
187
- ColorGradient.encode(message.zenith, writer.uint32(10).fork()).ldelim();
188
- }
189
- if (message.horizon !== undefined) {
190
- ColorGradient.encode(message.horizon, writer.uint32(18).fork()).ldelim();
191
- }
192
- if (message.nadir !== undefined) {
193
- ColorGradient.encode(message.nadir, writer.uint32(26).fork()).ldelim();
194
- }
195
- if (message.rim !== undefined) {
196
- ColorGradient.encode(message.rim, writer.uint32(34).fork()).ldelim();
197
- }
198
- return writer;
199
- }
200
-
201
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_SkyColors {
202
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
203
- let end = length === undefined ? reader.len : reader.pos + length;
204
- const message = createBasePBSkybox_SkyColors();
205
- while (reader.pos < end) {
206
- const tag = reader.uint32();
207
- switch (tag >>> 3) {
208
- case 1:
209
- if (tag !== 10) {
210
- break;
211
- }
212
-
213
- message.zenith = ColorGradient.decode(reader, reader.uint32());
214
- continue;
215
- case 2:
216
- if (tag !== 18) {
217
- break;
218
- }
219
-
220
- message.horizon = ColorGradient.decode(reader, reader.uint32());
221
- continue;
222
- case 3:
223
- if (tag !== 26) {
224
- break;
225
- }
226
-
227
- message.nadir = ColorGradient.decode(reader, reader.uint32());
228
- continue;
229
- case 4:
230
- if (tag !== 34) {
231
- break;
232
- }
233
-
234
- message.rim = ColorGradient.decode(reader, reader.uint32());
235
- continue;
236
- }
237
- if ((tag & 7) === 4 || tag === 0) {
238
- break;
239
- }
240
- reader.skipType(tag & 7);
241
- }
242
- return message;
243
- }
244
-
245
- export function fromJSON(object: any): PBSkybox_SkyColors {
246
- return {
247
- zenith: isSet(object.zenith) ? ColorGradient.fromJSON(object.zenith) : undefined,
248
- horizon: isSet(object.horizon) ? ColorGradient.fromJSON(object.horizon) : undefined,
249
- nadir: isSet(object.nadir) ? ColorGradient.fromJSON(object.nadir) : undefined,
250
- rim: isSet(object.rim) ? ColorGradient.fromJSON(object.rim) : undefined,
251
- };
252
- }
253
-
254
- export function toJSON(message: PBSkybox_SkyColors): unknown {
255
- const obj: any = {};
256
- message.zenith !== undefined && (obj.zenith = message.zenith ? ColorGradient.toJSON(message.zenith) : undefined);
257
- message.horizon !== undefined &&
258
- (obj.horizon = message.horizon ? ColorGradient.toJSON(message.horizon) : undefined);
259
- message.nadir !== undefined && (obj.nadir = message.nadir ? ColorGradient.toJSON(message.nadir) : undefined);
260
- message.rim !== undefined && (obj.rim = message.rim ? ColorGradient.toJSON(message.rim) : undefined);
261
- return obj;
262
- }
263
-
264
- export function create<I extends Exact<DeepPartial<PBSkybox_SkyColors>, I>>(base?: I): PBSkybox_SkyColors {
265
- return PBSkybox_SkyColors.fromPartial(base ?? {});
266
- }
267
-
268
- export function fromPartial<I extends Exact<DeepPartial<PBSkybox_SkyColors>, I>>(object: I): PBSkybox_SkyColors {
269
- const message = createBasePBSkybox_SkyColors();
270
- message.zenith = (object.zenith !== undefined && object.zenith !== null)
271
- ? ColorGradient.fromPartial(object.zenith)
272
- : undefined;
273
- message.horizon = (object.horizon !== undefined && object.horizon !== null)
274
- ? ColorGradient.fromPartial(object.horizon)
275
- : undefined;
276
- message.nadir = (object.nadir !== undefined && object.nadir !== null)
277
- ? ColorGradient.fromPartial(object.nadir)
278
- : undefined;
279
- message.rim = (object.rim !== undefined && object.rim !== null) ? ColorGradient.fromPartial(object.rim) : undefined;
280
- return message;
281
- }
282
- }
283
-
284
- function createBasePBSkybox_Clouds(): PBSkybox_Clouds {
285
- return { opacity: undefined, speed: undefined, color: undefined };
286
- }
287
-
288
- export namespace PBSkybox_Clouds {
289
- export function encode(message: PBSkybox_Clouds, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
290
- if (message.opacity !== undefined) {
291
- writer.uint32(13).float(message.opacity);
292
- }
293
- if (message.speed !== undefined) {
294
- writer.uint32(21).float(message.speed);
295
- }
296
- if (message.color !== undefined) {
297
- ColorGradient.encode(message.color, writer.uint32(26).fork()).ldelim();
298
- }
299
- return writer;
300
- }
301
-
302
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Clouds {
303
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
304
- let end = length === undefined ? reader.len : reader.pos + length;
305
- const message = createBasePBSkybox_Clouds();
306
- while (reader.pos < end) {
307
- const tag = reader.uint32();
308
- switch (tag >>> 3) {
309
- case 1:
310
- if (tag !== 13) {
311
- break;
312
- }
313
-
314
- message.opacity = reader.float();
315
- continue;
316
- case 2:
317
- if (tag !== 21) {
318
- break;
319
- }
320
-
321
- message.speed = reader.float();
322
- continue;
323
- case 3:
324
- if (tag !== 26) {
325
- break;
326
- }
327
-
328
- message.color = ColorGradient.decode(reader, reader.uint32());
329
- continue;
330
- }
331
- if ((tag & 7) === 4 || tag === 0) {
332
- break;
333
- }
334
- reader.skipType(tag & 7);
335
- }
336
- return message;
337
- }
338
-
339
- export function fromJSON(object: any): PBSkybox_Clouds {
340
- return {
341
- opacity: isSet(object.opacity) ? Number(object.opacity) : undefined,
342
- speed: isSet(object.speed) ? Number(object.speed) : undefined,
343
- color: isSet(object.color) ? ColorGradient.fromJSON(object.color) : undefined,
344
- };
345
- }
346
-
347
- export function toJSON(message: PBSkybox_Clouds): unknown {
348
- const obj: any = {};
349
- message.opacity !== undefined && (obj.opacity = message.opacity);
350
- message.speed !== undefined && (obj.speed = message.speed);
351
- message.color !== undefined && (obj.color = message.color ? ColorGradient.toJSON(message.color) : undefined);
352
- return obj;
353
- }
354
-
355
- export function create<I extends Exact<DeepPartial<PBSkybox_Clouds>, I>>(base?: I): PBSkybox_Clouds {
356
- return PBSkybox_Clouds.fromPartial(base ?? {});
357
- }
358
-
359
- export function fromPartial<I extends Exact<DeepPartial<PBSkybox_Clouds>, I>>(object: I): PBSkybox_Clouds {
360
- const message = createBasePBSkybox_Clouds();
361
- message.opacity = object.opacity ?? undefined;
362
- message.speed = object.speed ?? undefined;
363
- message.color = (object.color !== undefined && object.color !== null)
364
- ? ColorGradient.fromPartial(object.color)
365
- : undefined;
366
- return message;
367
- }
368
- }
369
-
370
- function createBasePBSkybox_Stars(): PBSkybox_Stars {
371
- return { brightness: undefined };
372
- }
373
-
374
- export namespace PBSkybox_Stars {
375
- export function encode(message: PBSkybox_Stars, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
376
- if (message.brightness !== undefined) {
377
- writer.uint32(13).float(message.brightness);
378
- }
379
- return writer;
380
- }
381
-
382
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSkybox_Stars {
383
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
384
- let end = length === undefined ? reader.len : reader.pos + length;
385
- const message = createBasePBSkybox_Stars();
386
- while (reader.pos < end) {
387
- const tag = reader.uint32();
388
- switch (tag >>> 3) {
389
- case 1:
390
- if (tag !== 13) {
391
- break;
392
- }
393
-
394
- message.brightness = reader.float();
395
- continue;
396
- }
397
- if ((tag & 7) === 4 || tag === 0) {
398
- break;
399
- }
400
- reader.skipType(tag & 7);
401
- }
402
- return message;
403
- }
404
-
405
- export function fromJSON(object: any): PBSkybox_Stars {
406
- return { brightness: isSet(object.brightness) ? Number(object.brightness) : undefined };
407
- }
408
-
409
- export function toJSON(message: PBSkybox_Stars): unknown {
410
- const obj: any = {};
411
- message.brightness !== undefined && (obj.brightness = message.brightness);
412
- return obj;
413
- }
414
-
415
- export function create<I extends Exact<DeepPartial<PBSkybox_Stars>, I>>(base?: I): PBSkybox_Stars {
416
- return PBSkybox_Stars.fromPartial(base ?? {});
417
- }
418
-
419
- export function fromPartial<I extends Exact<DeepPartial<PBSkybox_Stars>, I>>(object: I): PBSkybox_Stars {
420
- const message = createBasePBSkybox_Stars();
421
- message.brightness = object.brightness ?? undefined;
422
- return message;
423
- }
424
- }
425
-
426
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
427
-
428
- export type DeepPartial<T> = T extends Builtin ? T
429
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
430
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
431
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
432
- : Partial<T>;
433
-
434
- type KeysOfUnion<T> = T extends T ? keyof T : never;
435
- export type Exact<P, I extends P> = P extends Builtin ? P
436
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
437
-
438
- function isSet(value: any): boolean {
439
- return value !== null && value !== undefined;
440
- }
@@ -1,155 +0,0 @@
1
- /* eslint-disable */
2
- import _m0 from "protobufjs/minimal";
3
- import { ColorGradient } from "../../common/gradient.gen";
4
- import { Vector3 } from "../../common/vectors.gen";
5
-
6
- export const protobufPackage = "decentraland.sdk.components";
7
-
8
- /**
9
- * PBSun overrides the directional light (sun and moon) while the player is inside the scene.
10
- * Valid only on the scene root entity (`engine.RootEntity`).
11
- *
12
- * An unset field keeps the time-of-day default.
13
- * Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
14
- * Gradients do not wrap around midnight.
15
- *
16
- * While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
17
- */
18
- export interface PBSun {
19
- /** tints the directional light and the sun disc */
20
- color?:
21
- | ColorGradient
22
- | undefined;
23
- /** default = true. false hides the sun and moon discs and the lens flare, but not their light */
24
- visible?:
25
- | boolean
26
- | undefined;
27
- /** default = 1, multiplier on the renderer's time-of-day light intensity. Negative values clamp to 0 */
28
- intensity?:
29
- | number
30
- | undefined;
31
- /**
32
- * Direction the sunlight travels, in scene space: (0,-1,0) = sun straight overhead. Normalized by the renderer.
33
- * Set = the sun stays fixed at every time of day; its color and intensity still follow the time of day.
34
- * Unset or zero = the time-of-day path.
35
- */
36
- direction?: Vector3 | undefined;
37
- }
38
-
39
- function createBasePBSun(): PBSun {
40
- return { color: undefined, visible: undefined, intensity: undefined, direction: undefined };
41
- }
42
-
43
- export namespace PBSun {
44
- export function encode(message: PBSun, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
45
- if (message.color !== undefined) {
46
- ColorGradient.encode(message.color, writer.uint32(10).fork()).ldelim();
47
- }
48
- if (message.visible !== undefined) {
49
- writer.uint32(16).bool(message.visible);
50
- }
51
- if (message.intensity !== undefined) {
52
- writer.uint32(29).float(message.intensity);
53
- }
54
- if (message.direction !== undefined) {
55
- Vector3.encode(message.direction, writer.uint32(34).fork()).ldelim();
56
- }
57
- return writer;
58
- }
59
-
60
- export function decode(input: _m0.Reader | Uint8Array, length?: number): PBSun {
61
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
62
- let end = length === undefined ? reader.len : reader.pos + length;
63
- const message = createBasePBSun();
64
- while (reader.pos < end) {
65
- const tag = reader.uint32();
66
- switch (tag >>> 3) {
67
- case 1:
68
- if (tag !== 10) {
69
- break;
70
- }
71
-
72
- message.color = ColorGradient.decode(reader, reader.uint32());
73
- continue;
74
- case 2:
75
- if (tag !== 16) {
76
- break;
77
- }
78
-
79
- message.visible = reader.bool();
80
- continue;
81
- case 3:
82
- if (tag !== 29) {
83
- break;
84
- }
85
-
86
- message.intensity = reader.float();
87
- continue;
88
- case 4:
89
- if (tag !== 34) {
90
- break;
91
- }
92
-
93
- message.direction = Vector3.decode(reader, reader.uint32());
94
- continue;
95
- }
96
- if ((tag & 7) === 4 || tag === 0) {
97
- break;
98
- }
99
- reader.skipType(tag & 7);
100
- }
101
- return message;
102
- }
103
-
104
- export function fromJSON(object: any): PBSun {
105
- return {
106
- color: isSet(object.color) ? ColorGradient.fromJSON(object.color) : undefined,
107
- visible: isSet(object.visible) ? Boolean(object.visible) : undefined,
108
- intensity: isSet(object.intensity) ? Number(object.intensity) : undefined,
109
- direction: isSet(object.direction) ? Vector3.fromJSON(object.direction) : undefined,
110
- };
111
- }
112
-
113
- export function toJSON(message: PBSun): unknown {
114
- const obj: any = {};
115
- message.color !== undefined && (obj.color = message.color ? ColorGradient.toJSON(message.color) : undefined);
116
- message.visible !== undefined && (obj.visible = message.visible);
117
- message.intensity !== undefined && (obj.intensity = message.intensity);
118
- message.direction !== undefined &&
119
- (obj.direction = message.direction ? Vector3.toJSON(message.direction) : undefined);
120
- return obj;
121
- }
122
-
123
- export function create<I extends Exact<DeepPartial<PBSun>, I>>(base?: I): PBSun {
124
- return PBSun.fromPartial(base ?? {});
125
- }
126
-
127
- export function fromPartial<I extends Exact<DeepPartial<PBSun>, I>>(object: I): PBSun {
128
- const message = createBasePBSun();
129
- message.color = (object.color !== undefined && object.color !== null)
130
- ? ColorGradient.fromPartial(object.color)
131
- : undefined;
132
- message.visible = object.visible ?? undefined;
133
- message.intensity = object.intensity ?? undefined;
134
- message.direction = (object.direction !== undefined && object.direction !== null)
135
- ? Vector3.fromPartial(object.direction)
136
- : undefined;
137
- return message;
138
- }
139
- }
140
-
141
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
142
-
143
- export type DeepPartial<T> = T extends Builtin ? T
144
- : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
145
- : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
146
- : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
147
- : Partial<T>;
148
-
149
- type KeysOfUnion<T> = T extends T ? keyof T : never;
150
- export type Exact<P, I extends P> = P extends Builtin ? P
151
- : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
152
-
153
- function isSet(value: any): boolean {
154
- return value !== null && value !== undefined;
155
- }
@@ -1,16 +0,0 @@
1
- syntax = "proto3";
2
- package decentraland.common;
3
-
4
- import "decentraland/common/colors.proto";
5
-
6
- message ColorKey {
7
- float time = 1; // position along the gradient, from 0 to 1. Values outside that range clamp to it
8
- Color4 color = 2; // linear color. Values above 1 are allowed (HDR)
9
- }
10
-
11
- // Piecewise-linear, with keys interpolated in ascending order of `time`. Positions before the first key
12
- // or after the last key take that key's color. No keys means the gradient is unset.
13
- // If two keys have the same `time`, then the gradient keeps the key that comes later in `keys`.
14
- message ColorGradient {
15
- repeated ColorKey keys = 1;
16
- }
@@ -1,21 +0,0 @@
1
- syntax = "proto3";
2
- package decentraland.sdk.components;
3
-
4
- import "decentraland/sdk/components/common/id.proto";
5
- import "decentraland/common/gradient.proto";
6
-
7
- option (common.ecs_component_id) = 1225;
8
-
9
- // PBEnvironmentFog overrides the environment fog while the player is inside the scene.
10
- // Valid only on the scene root entity (`engine.RootEntity`).
11
- //
12
- // An unset field keeps the time-of-day default.
13
- // Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
14
- // Gradients do not wrap around midnight.
15
- // A scene cannot turn fog on or off. That is a user quality setting.
16
- //
17
- // While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
18
- message PBEnvironmentFog {
19
- optional decentraland.common.ColorGradient color = 1;
20
- optional float density = 2; // default = 0.0005, per meter: fog = 1 - e^(-density * distance). Negative values clamp to 0
21
- }
@@ -1,51 +0,0 @@
1
- syntax = "proto3";
2
- package decentraland.sdk.components;
3
-
4
- import "decentraland/sdk/components/common/id.proto";
5
- import "decentraland/common/gradient.proto";
6
-
7
- option (common.ecs_component_id) = 1223;
8
-
9
- // PBSkybox overrides the visible sky while the player is inside the scene.
10
- // Valid only on the scene root entity (`engine.RootEntity`).
11
- //
12
- // An unset field keeps the time-of-day default.
13
- // Gradient `time` is the normalized time of day: 0 = 00:00, 0.5 = 12:00, 1 = 24:00.
14
- // Gradients do not wrap around midnight.
15
- // The sun is controlled by `PBSun` and the fog by `PBEnvironmentFog`.
16
- //
17
- // While active, the overrides are global: they also change how neighbouring parcels look from inside the scene.
18
- message PBSkybox {
19
- // Replaces the visible sky with an image, given as its source path with the same rules as `Texture.src`.
20
- // It must be an equirectangular (latitude-longitude) image with a 2:1 aspect ratio:
21
- // the image centre faces +Z, the top row is the zenith and the bottom row the nadir.
22
- // Cube cross, 3x2 and six-face layouts are not supported.
23
- // The sun, the fog and the ambient lighting do not change: the ambient still follows `sky_colors`.
24
- optional string skybox_texture = 1;
25
- // Procedural sky colors. They also drive the ambient lighting, also while `skybox_texture` is set.
26
- // While `skybox_texture` is set they no longer color the visible sky.
27
- optional SkyColors sky_colors = 2;
28
- // Ignored while `skybox_texture` is set.
29
- optional Clouds clouds = 3;
30
- // Ignored while `skybox_texture` is set.
31
- optional Stars stars = 4;
32
-
33
- message SkyColors {
34
- optional decentraland.common.ColorGradient zenith = 1; // the sky straight up
35
- optional decentraland.common.ColorGradient horizon = 2; // the broad band of sky around the horizon
36
- // The sky below the horizon, visible wherever no terrain covers it (landscape disabled, high altitude).
37
- optional decentraland.common.ColorGradient nadir = 3;
38
- // Narrow glow right on the horizon line, like a sunset glow. Unset = follows `horizon` when that is set.
39
- optional decentraland.common.ColorGradient rim = 4;
40
- }
41
-
42
- message Clouds {
43
- optional float opacity = 1; // default = 1, from 0 to 1
44
- optional float speed = 2; // default = 0.01, in radians per second around the sky axis (0.01 is one turn every ~10 minutes). 0 = static, negative reverses the direction
45
- optional decentraland.common.ColorGradient color = 3;
46
- }
47
-
48
- message Stars {
49
- optional float brightness = 1; // default = 4.62, multiplier on the star texture (1 = as authored, values above 1 are HDR). 0 hides the stars, negative values clamp to 0. Stars are visible only at night
50
- }
51
- }