@dcl/protocol 1.0.0-4419899496.commit-11d63ec → 1.0.0-4440731539.commit-a2174f5

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 (173) hide show
  1. package/out-js/decentraland/common/border_rect.gen.d.ts +54 -0
  2. package/out-js/decentraland/common/border_rect.gen.js +87 -0
  3. package/out-js/decentraland/common/border_rect.gen.js.map +1 -0
  4. package/out-js/decentraland/common/colors.gen.d.ts +82 -0
  5. package/out-js/decentraland/common/colors.gen.js +152 -0
  6. package/out-js/decentraland/common/colors.gen.js.map +1 -0
  7. package/out-js/decentraland/common/texture.gen.d.ts +319 -0
  8. package/out-js/decentraland/common/texture.gen.js +384 -0
  9. package/out-js/decentraland/common/texture.gen.js.map +1 -0
  10. package/out-js/decentraland/sdk/components/animator.gen.d.ts +184 -0
  11. package/out-js/decentraland/sdk/components/animator.gen.js +172 -0
  12. package/out-js/decentraland/sdk/components/animator.gen.js.map +1 -0
  13. package/out-js/decentraland/sdk/components/audio_source.gen.d.ts +74 -0
  14. package/out-js/decentraland/sdk/components/audio_source.gen.js +96 -0
  15. package/out-js/decentraland/sdk/components/audio_source.gen.js.map +1 -0
  16. package/out-js/decentraland/sdk/components/audio_stream.gen.d.ts +56 -0
  17. package/out-js/decentraland/sdk/components/audio_stream.gen.js +78 -0
  18. package/out-js/decentraland/sdk/components/audio_stream.gen.js.map +1 -0
  19. package/out-js/decentraland/sdk/components/avatar_attach.gen.d.ts +65 -0
  20. package/out-js/decentraland/sdk/components/avatar_attach.gen.js +115 -0
  21. package/out-js/decentraland/sdk/components/avatar_attach.gen.js.map +1 -0
  22. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +100 -0
  23. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +137 -0
  24. package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -0
  25. package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +192 -0
  26. package/out-js/decentraland/sdk/components/avatar_shape.gen.js +210 -0
  27. package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -0
  28. package/out-js/decentraland/sdk/components/billboard.gen.d.ts +59 -0
  29. package/out-js/decentraland/sdk/components/billboard.gen.js +114 -0
  30. package/out-js/decentraland/sdk/components/billboard.gen.js.map +1 -0
  31. package/out-js/decentraland/sdk/components/camera_mode.gen.d.ts +44 -0
  32. package/out-js/decentraland/sdk/components/camera_mode.gen.js +59 -0
  33. package/out-js/decentraland/sdk/components/camera_mode.gen.js.map +1 -0
  34. package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +84 -0
  35. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +71 -0
  36. package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -0
  37. package/out-js/decentraland/sdk/components/common/camera_type.gen.d.ts +8 -0
  38. package/out-js/decentraland/sdk/components/common/camera_type.gen.js +39 -0
  39. package/out-js/decentraland/sdk/components/common/camera_type.gen.js.map +1 -0
  40. package/out-js/decentraland/sdk/components/common/id.gen.d.ts +1 -0
  41. package/out-js/decentraland/sdk/components/common/id.gen.js +6 -0
  42. package/out-js/decentraland/sdk/components/common/id.gen.js.map +1 -0
  43. package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +20 -0
  44. package/out-js/decentraland/sdk/components/common/input_action.gen.js +111 -0
  45. package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -0
  46. package/out-js/decentraland/sdk/components/common/texts.gen.d.ts +23 -0
  47. package/out-js/decentraland/sdk/components/common/texts.gen.js +120 -0
  48. package/out-js/decentraland/sdk/components/common/texts.gen.js.map +1 -0
  49. package/out-js/decentraland/sdk/components/gltf_container.gen.d.ts +45 -0
  50. package/out-js/decentraland/sdk/components/gltf_container.gen.js +58 -0
  51. package/out-js/decentraland/sdk/components/gltf_container.gen.js.map +1 -0
  52. package/out-js/decentraland/sdk/components/material.gen.d.ts +3452 -0
  53. package/out-js/decentraland/sdk/components/material.gen.js +437 -0
  54. package/out-js/decentraland/sdk/components/material.gen.js.map +1 -0
  55. package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +250 -0
  56. package/out-js/decentraland/sdk/components/mesh_collider.gen.js +324 -0
  57. package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -0
  58. package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +284 -0
  59. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +320 -0
  60. package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -0
  61. package/out-js/decentraland/sdk/components/nft_shape.gen.d.ts +114 -0
  62. package/out-js/decentraland/sdk/components/nft_shape.gen.js +242 -0
  63. package/out-js/decentraland/sdk/components/nft_shape.gen.js.map +1 -0
  64. package/out-js/decentraland/sdk/components/pointer_events.gen.d.ts +249 -0
  65. package/out-js/decentraland/sdk/components/pointer_events.gen.js +248 -0
  66. package/out-js/decentraland/sdk/components/pointer_events.gen.js.map +1 -0
  67. package/out-js/decentraland/sdk/components/pointer_events_result.gen.d.ts +241 -0
  68. package/out-js/decentraland/sdk/components/pointer_events_result.gen.js +99 -0
  69. package/out-js/decentraland/sdk/components/pointer_events_result.gen.js.map +1 -0
  70. package/out-js/decentraland/sdk/components/pointer_lock.gen.d.ts +43 -0
  71. package/out-js/decentraland/sdk/components/pointer_lock.gen.js +58 -0
  72. package/out-js/decentraland/sdk/components/pointer_lock.gen.js.map +1 -0
  73. package/out-js/decentraland/sdk/components/raycast.gen.d.ts +118 -0
  74. package/out-js/decentraland/sdk/components/raycast.gen.js +127 -0
  75. package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -0
  76. package/out-js/decentraland/sdk/components/raycast_result.gen.d.ts +536 -0
  77. package/out-js/decentraland/sdk/components/raycast_result.gen.js +243 -0
  78. package/out-js/decentraland/sdk/components/raycast_result.gen.js.map +1 -0
  79. package/out-js/decentraland/sdk/components/text_shape.gen.d.ts +247 -0
  80. package/out-js/decentraland/sdk/components/text_shape.gen.js +274 -0
  81. package/out-js/decentraland/sdk/components/text_shape.gen.js.map +1 -0
  82. package/out-js/decentraland/sdk/components/ui_background.gen.d.ts +369 -0
  83. package/out-js/decentraland/sdk/components/ui_background.gen.js +175 -0
  84. package/out-js/decentraland/sdk/components/ui_background.gen.js.map +1 -0
  85. package/out-js/decentraland/sdk/components/ui_dropdown.gen.d.ts +115 -0
  86. package/out-js/decentraland/sdk/components/ui_dropdown.gen.js +152 -0
  87. package/out-js/decentraland/sdk/components/ui_dropdown.gen.js.map +1 -0
  88. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.d.ts +38 -0
  89. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.js +58 -0
  90. package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.js.map +1 -0
  91. package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +140 -0
  92. package/out-js/decentraland/sdk/components/ui_input.gen.js +140 -0
  93. package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -0
  94. package/out-js/decentraland/sdk/components/ui_input_result.gen.d.ts +38 -0
  95. package/out-js/decentraland/sdk/components/ui_input_result.gen.js +58 -0
  96. package/out-js/decentraland/sdk/components/ui_input_result.gen.js.map +1 -0
  97. package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +95 -0
  98. package/out-js/decentraland/sdk/components/ui_text.gen.js +101 -0
  99. package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -0
  100. package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +403 -0
  101. package/out-js/decentraland/sdk/components/ui_transform.gen.js +1000 -0
  102. package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -0
  103. package/out-js/decentraland/sdk/components/video_player.gen.d.ts +69 -0
  104. package/out-js/decentraland/sdk/components/video_player.gen.js +112 -0
  105. package/out-js/decentraland/sdk/components/video_player.gen.js.map +1 -0
  106. package/out-js/decentraland/sdk/components/visibility_component.gen.d.ts +39 -0
  107. package/out-js/decentraland/sdk/components/visibility_component.gen.js +58 -0
  108. package/out-js/decentraland/sdk/components/visibility_component.gen.js.map +1 -0
  109. package/out-js/google/protobuf/descriptor.gen.d.ts +87384 -0
  110. package/out-js/google/protobuf/descriptor.gen.js +2645 -0
  111. package/out-js/google/protobuf/descriptor.gen.js.map +1 -0
  112. package/out-js/sdk-components.gen.d.ts +1 -0
  113. package/out-js/sdk-components.gen.js +6 -0
  114. package/out-js/sdk-components.gen.js.map +1 -0
  115. package/out-ts/decentraland/common/border_rect.gen.ts +108 -0
  116. package/out-ts/decentraland/common/colors.gen.ts +184 -0
  117. package/out-ts/decentraland/common/texture.gen.ts +454 -0
  118. package/out-ts/decentraland/sdk/components/animator.gen.ts +229 -0
  119. package/out-ts/decentraland/sdk/components/audio_source.gen.ts +141 -0
  120. package/out-ts/decentraland/sdk/components/audio_stream.gen.ts +109 -0
  121. package/out-ts/decentraland/sdk/components/avatar_attach.gen.ts +147 -0
  122. package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +172 -0
  123. package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +288 -0
  124. package/out-ts/decentraland/sdk/components/billboard.gen.ts +140 -0
  125. package/out-ts/decentraland/sdk/components/camera_mode.gen.ts +81 -0
  126. package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +106 -0
  127. package/out-ts/decentraland/sdk/components/common/camera_type.gen.ts +36 -0
  128. package/out-ts/decentraland/sdk/components/common/id.gen.ts +3 -0
  129. package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +108 -0
  130. package/out-ts/decentraland/sdk/components/common/texts.gen.ts +117 -0
  131. package/out-ts/decentraland/sdk/components/gltf_container.gen.ts +82 -0
  132. package/out-ts/decentraland/sdk/components/material.gen.ts +546 -0
  133. package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +403 -0
  134. package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +395 -0
  135. package/out-ts/decentraland/sdk/components/nft_shape.gen.ts +275 -0
  136. package/out-ts/decentraland/sdk/components/pointer_events.gen.ts +316 -0
  137. package/out-ts/decentraland/sdk/components/pointer_events_result.gen.ts +124 -0
  138. package/out-ts/decentraland/sdk/components/pointer_lock.gen.ts +80 -0
  139. package/out-ts/decentraland/sdk/components/raycast.gen.ts +159 -0
  140. package/out-ts/decentraland/sdk/components/raycast_result.gen.ts +315 -0
  141. package/out-ts/decentraland/sdk/components/text_shape.gen.ts +385 -0
  142. package/out-ts/decentraland/sdk/components/ui_background.gen.ts +199 -0
  143. package/out-ts/decentraland/sdk/components/ui_dropdown.gen.ts +194 -0
  144. package/out-ts/decentraland/sdk/components/ui_dropdown_result.gen.ts +75 -0
  145. package/out-ts/decentraland/sdk/components/ui_input.gen.ts +182 -0
  146. package/out-ts/decentraland/sdk/components/ui_input_result.gen.ts +75 -0
  147. package/out-ts/decentraland/sdk/components/ui_text.gen.ts +140 -0
  148. package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +1104 -0
  149. package/out-ts/decentraland/sdk/components/video_player.gen.ts +148 -0
  150. package/out-ts/decentraland/sdk/components/visibility_component.gen.ts +76 -0
  151. package/out-ts/google/protobuf/descriptor.gen.ts +2961 -0
  152. package/out-ts/sdk-components.gen.ts +3 -0
  153. package/package.json +2 -2
  154. package/proto/decentraland/sdk/components/animator.proto +15 -8
  155. package/proto/decentraland/sdk/components/audio_source.proto +16 -6
  156. package/proto/decentraland/sdk/components/audio_stream.proto +6 -3
  157. package/proto/decentraland/sdk/components/avatar_attach.proto +14 -6
  158. package/proto/decentraland/sdk/components/avatar_modifier_area.proto +20 -7
  159. package/proto/decentraland/sdk/components/avatar_shape.proto +34 -24
  160. package/proto/decentraland/sdk/components/billboard.proto +12 -5
  161. package/proto/decentraland/sdk/components/camera_mode.proto +3 -1
  162. package/proto/decentraland/sdk/components/camera_mode_area.proto +13 -2
  163. package/proto/decentraland/sdk/components/gltf_container.proto +5 -5
  164. package/proto/decentraland/sdk/components/mesh_collider.proto +22 -9
  165. package/proto/decentraland/sdk/components/mesh_renderer.proto +17 -4
  166. package/proto/decentraland/sdk/components/nft_shape.proto +15 -7
  167. package/proto/decentraland/sdk/components/pointer_events.proto +28 -14
  168. package/proto/decentraland/sdk/components/pointer_lock.proto +3 -1
  169. package/proto/decentraland/sdk/components/raycast.proto +10 -7
  170. package/proto/decentraland/sdk/components/raycast_result.proto +17 -12
  171. package/proto/decentraland/sdk/components/text_shape.proto +33 -24
  172. package/proto/decentraland/sdk/components/ui_text.proto +8 -5
  173. package/public/sdk-components.proto +33 -0
@@ -0,0 +1,454 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+
4
+ export const protobufPackage = "decentraland.common";
5
+
6
+ export enum TextureWrapMode {
7
+ TWM_REPEAT = 0,
8
+ TWM_CLAMP = 1,
9
+ TWM_MIRROR = 2,
10
+ TWM_MIRROR_ONCE = 3,
11
+ UNRECOGNIZED = -1,
12
+ }
13
+
14
+ export function textureWrapModeFromJSON(object: any): TextureWrapMode {
15
+ switch (object) {
16
+ case 0:
17
+ case "TWM_REPEAT":
18
+ return TextureWrapMode.TWM_REPEAT;
19
+ case 1:
20
+ case "TWM_CLAMP":
21
+ return TextureWrapMode.TWM_CLAMP;
22
+ case 2:
23
+ case "TWM_MIRROR":
24
+ return TextureWrapMode.TWM_MIRROR;
25
+ case 3:
26
+ case "TWM_MIRROR_ONCE":
27
+ return TextureWrapMode.TWM_MIRROR_ONCE;
28
+ case -1:
29
+ case "UNRECOGNIZED":
30
+ default:
31
+ return TextureWrapMode.UNRECOGNIZED;
32
+ }
33
+ }
34
+
35
+ export function textureWrapModeToJSON(object: TextureWrapMode): string {
36
+ switch (object) {
37
+ case TextureWrapMode.TWM_REPEAT:
38
+ return "TWM_REPEAT";
39
+ case TextureWrapMode.TWM_CLAMP:
40
+ return "TWM_CLAMP";
41
+ case TextureWrapMode.TWM_MIRROR:
42
+ return "TWM_MIRROR";
43
+ case TextureWrapMode.TWM_MIRROR_ONCE:
44
+ return "TWM_MIRROR_ONCE";
45
+ case TextureWrapMode.UNRECOGNIZED:
46
+ default:
47
+ return "UNRECOGNIZED";
48
+ }
49
+ }
50
+
51
+ export enum TextureFilterMode {
52
+ TFM_POINT = 0,
53
+ TFM_BILINEAR = 1,
54
+ TFM_TRILINEAR = 2,
55
+ UNRECOGNIZED = -1,
56
+ }
57
+
58
+ export function textureFilterModeFromJSON(object: any): TextureFilterMode {
59
+ switch (object) {
60
+ case 0:
61
+ case "TFM_POINT":
62
+ return TextureFilterMode.TFM_POINT;
63
+ case 1:
64
+ case "TFM_BILINEAR":
65
+ return TextureFilterMode.TFM_BILINEAR;
66
+ case 2:
67
+ case "TFM_TRILINEAR":
68
+ return TextureFilterMode.TFM_TRILINEAR;
69
+ case -1:
70
+ case "UNRECOGNIZED":
71
+ default:
72
+ return TextureFilterMode.UNRECOGNIZED;
73
+ }
74
+ }
75
+
76
+ export function textureFilterModeToJSON(object: TextureFilterMode): string {
77
+ switch (object) {
78
+ case TextureFilterMode.TFM_POINT:
79
+ return "TFM_POINT";
80
+ case TextureFilterMode.TFM_BILINEAR:
81
+ return "TFM_BILINEAR";
82
+ case TextureFilterMode.TFM_TRILINEAR:
83
+ return "TFM_TRILINEAR";
84
+ case TextureFilterMode.UNRECOGNIZED:
85
+ default:
86
+ return "UNRECOGNIZED";
87
+ }
88
+ }
89
+
90
+ export interface Texture {
91
+ src: string;
92
+ /** default = TextureWrapMode.Clamp */
93
+ wrapMode?:
94
+ | TextureWrapMode
95
+ | undefined;
96
+ /** default = FilterMode.Bilinear */
97
+ filterMode?: TextureFilterMode | undefined;
98
+ }
99
+
100
+ export interface AvatarTexture {
101
+ userId: string;
102
+ /** default = TextureWrapMode.Clamp */
103
+ wrapMode?:
104
+ | TextureWrapMode
105
+ | undefined;
106
+ /** default = FilterMode.Bilinear */
107
+ filterMode?: TextureFilterMode | undefined;
108
+ }
109
+
110
+ export interface VideoTexture {
111
+ videoPlayerEntity: number;
112
+ /** default = TextureWrapMode.Clamp */
113
+ wrapMode?:
114
+ | TextureWrapMode
115
+ | undefined;
116
+ /** default = FilterMode.Bilinear */
117
+ filterMode?: TextureFilterMode | undefined;
118
+ }
119
+
120
+ export interface TextureUnion {
121
+ tex?: { $case: "texture"; texture: Texture } | { $case: "avatarTexture"; avatarTexture: AvatarTexture } | {
122
+ $case: "videoTexture";
123
+ videoTexture: VideoTexture;
124
+ };
125
+ }
126
+
127
+ function createBaseTexture(): Texture {
128
+ return { src: "", wrapMode: undefined, filterMode: undefined };
129
+ }
130
+
131
+ export const Texture = {
132
+ encode(message: Texture, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
133
+ if (message.src !== "") {
134
+ writer.uint32(10).string(message.src);
135
+ }
136
+ if (message.wrapMode !== undefined) {
137
+ writer.uint32(16).int32(message.wrapMode);
138
+ }
139
+ if (message.filterMode !== undefined) {
140
+ writer.uint32(24).int32(message.filterMode);
141
+ }
142
+ return writer;
143
+ },
144
+
145
+ decode(input: _m0.Reader | Uint8Array, length?: number): Texture {
146
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
147
+ let end = length === undefined ? reader.len : reader.pos + length;
148
+ const message = createBaseTexture();
149
+ while (reader.pos < end) {
150
+ const tag = reader.uint32();
151
+ switch (tag >>> 3) {
152
+ case 1:
153
+ message.src = reader.string();
154
+ break;
155
+ case 2:
156
+ message.wrapMode = reader.int32() as any;
157
+ break;
158
+ case 3:
159
+ message.filterMode = reader.int32() as any;
160
+ break;
161
+ default:
162
+ reader.skipType(tag & 7);
163
+ break;
164
+ }
165
+ }
166
+ return message;
167
+ },
168
+
169
+ fromJSON(object: any): Texture {
170
+ return {
171
+ src: isSet(object.src) ? String(object.src) : "",
172
+ wrapMode: isSet(object.wrapMode) ? textureWrapModeFromJSON(object.wrapMode) : undefined,
173
+ filterMode: isSet(object.filterMode) ? textureFilterModeFromJSON(object.filterMode) : undefined,
174
+ };
175
+ },
176
+
177
+ toJSON(message: Texture): unknown {
178
+ const obj: any = {};
179
+ message.src !== undefined && (obj.src = message.src);
180
+ message.wrapMode !== undefined &&
181
+ (obj.wrapMode = message.wrapMode !== undefined ? textureWrapModeToJSON(message.wrapMode) : undefined);
182
+ message.filterMode !== undefined &&
183
+ (obj.filterMode = message.filterMode !== undefined ? textureFilterModeToJSON(message.filterMode) : undefined);
184
+ return obj;
185
+ },
186
+
187
+ create<I extends Exact<DeepPartial<Texture>, I>>(base?: I): Texture {
188
+ return Texture.fromPartial(base ?? {});
189
+ },
190
+
191
+ fromPartial<I extends Exact<DeepPartial<Texture>, I>>(object: I): Texture {
192
+ const message = createBaseTexture();
193
+ message.src = object.src ?? "";
194
+ message.wrapMode = object.wrapMode ?? undefined;
195
+ message.filterMode = object.filterMode ?? undefined;
196
+ return message;
197
+ },
198
+ };
199
+
200
+ function createBaseAvatarTexture(): AvatarTexture {
201
+ return { userId: "", wrapMode: undefined, filterMode: undefined };
202
+ }
203
+
204
+ export const AvatarTexture = {
205
+ encode(message: AvatarTexture, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
206
+ if (message.userId !== "") {
207
+ writer.uint32(10).string(message.userId);
208
+ }
209
+ if (message.wrapMode !== undefined) {
210
+ writer.uint32(16).int32(message.wrapMode);
211
+ }
212
+ if (message.filterMode !== undefined) {
213
+ writer.uint32(24).int32(message.filterMode);
214
+ }
215
+ return writer;
216
+ },
217
+
218
+ decode(input: _m0.Reader | Uint8Array, length?: number): AvatarTexture {
219
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
220
+ let end = length === undefined ? reader.len : reader.pos + length;
221
+ const message = createBaseAvatarTexture();
222
+ while (reader.pos < end) {
223
+ const tag = reader.uint32();
224
+ switch (tag >>> 3) {
225
+ case 1:
226
+ message.userId = reader.string();
227
+ break;
228
+ case 2:
229
+ message.wrapMode = reader.int32() as any;
230
+ break;
231
+ case 3:
232
+ message.filterMode = reader.int32() as any;
233
+ break;
234
+ default:
235
+ reader.skipType(tag & 7);
236
+ break;
237
+ }
238
+ }
239
+ return message;
240
+ },
241
+
242
+ fromJSON(object: any): AvatarTexture {
243
+ return {
244
+ userId: isSet(object.userId) ? String(object.userId) : "",
245
+ wrapMode: isSet(object.wrapMode) ? textureWrapModeFromJSON(object.wrapMode) : undefined,
246
+ filterMode: isSet(object.filterMode) ? textureFilterModeFromJSON(object.filterMode) : undefined,
247
+ };
248
+ },
249
+
250
+ toJSON(message: AvatarTexture): unknown {
251
+ const obj: any = {};
252
+ message.userId !== undefined && (obj.userId = message.userId);
253
+ message.wrapMode !== undefined &&
254
+ (obj.wrapMode = message.wrapMode !== undefined ? textureWrapModeToJSON(message.wrapMode) : undefined);
255
+ message.filterMode !== undefined &&
256
+ (obj.filterMode = message.filterMode !== undefined ? textureFilterModeToJSON(message.filterMode) : undefined);
257
+ return obj;
258
+ },
259
+
260
+ create<I extends Exact<DeepPartial<AvatarTexture>, I>>(base?: I): AvatarTexture {
261
+ return AvatarTexture.fromPartial(base ?? {});
262
+ },
263
+
264
+ fromPartial<I extends Exact<DeepPartial<AvatarTexture>, I>>(object: I): AvatarTexture {
265
+ const message = createBaseAvatarTexture();
266
+ message.userId = object.userId ?? "";
267
+ message.wrapMode = object.wrapMode ?? undefined;
268
+ message.filterMode = object.filterMode ?? undefined;
269
+ return message;
270
+ },
271
+ };
272
+
273
+ function createBaseVideoTexture(): VideoTexture {
274
+ return { videoPlayerEntity: 0, wrapMode: undefined, filterMode: undefined };
275
+ }
276
+
277
+ export const VideoTexture = {
278
+ encode(message: VideoTexture, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
279
+ if (message.videoPlayerEntity !== 0) {
280
+ writer.uint32(8).uint32(message.videoPlayerEntity);
281
+ }
282
+ if (message.wrapMode !== undefined) {
283
+ writer.uint32(16).int32(message.wrapMode);
284
+ }
285
+ if (message.filterMode !== undefined) {
286
+ writer.uint32(24).int32(message.filterMode);
287
+ }
288
+ return writer;
289
+ },
290
+
291
+ decode(input: _m0.Reader | Uint8Array, length?: number): VideoTexture {
292
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
293
+ let end = length === undefined ? reader.len : reader.pos + length;
294
+ const message = createBaseVideoTexture();
295
+ while (reader.pos < end) {
296
+ const tag = reader.uint32();
297
+ switch (tag >>> 3) {
298
+ case 1:
299
+ message.videoPlayerEntity = reader.uint32();
300
+ break;
301
+ case 2:
302
+ message.wrapMode = reader.int32() as any;
303
+ break;
304
+ case 3:
305
+ message.filterMode = reader.int32() as any;
306
+ break;
307
+ default:
308
+ reader.skipType(tag & 7);
309
+ break;
310
+ }
311
+ }
312
+ return message;
313
+ },
314
+
315
+ fromJSON(object: any): VideoTexture {
316
+ return {
317
+ videoPlayerEntity: isSet(object.videoPlayerEntity) ? Number(object.videoPlayerEntity) : 0,
318
+ wrapMode: isSet(object.wrapMode) ? textureWrapModeFromJSON(object.wrapMode) : undefined,
319
+ filterMode: isSet(object.filterMode) ? textureFilterModeFromJSON(object.filterMode) : undefined,
320
+ };
321
+ },
322
+
323
+ toJSON(message: VideoTexture): unknown {
324
+ const obj: any = {};
325
+ message.videoPlayerEntity !== undefined && (obj.videoPlayerEntity = Math.round(message.videoPlayerEntity));
326
+ message.wrapMode !== undefined &&
327
+ (obj.wrapMode = message.wrapMode !== undefined ? textureWrapModeToJSON(message.wrapMode) : undefined);
328
+ message.filterMode !== undefined &&
329
+ (obj.filterMode = message.filterMode !== undefined ? textureFilterModeToJSON(message.filterMode) : undefined);
330
+ return obj;
331
+ },
332
+
333
+ create<I extends Exact<DeepPartial<VideoTexture>, I>>(base?: I): VideoTexture {
334
+ return VideoTexture.fromPartial(base ?? {});
335
+ },
336
+
337
+ fromPartial<I extends Exact<DeepPartial<VideoTexture>, I>>(object: I): VideoTexture {
338
+ const message = createBaseVideoTexture();
339
+ message.videoPlayerEntity = object.videoPlayerEntity ?? 0;
340
+ message.wrapMode = object.wrapMode ?? undefined;
341
+ message.filterMode = object.filterMode ?? undefined;
342
+ return message;
343
+ },
344
+ };
345
+
346
+ function createBaseTextureUnion(): TextureUnion {
347
+ return { tex: undefined };
348
+ }
349
+
350
+ export const TextureUnion = {
351
+ encode(message: TextureUnion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
352
+ switch (message.tex?.$case) {
353
+ case "texture":
354
+ Texture.encode(message.tex.texture, writer.uint32(10).fork()).ldelim();
355
+ break;
356
+ case "avatarTexture":
357
+ AvatarTexture.encode(message.tex.avatarTexture, writer.uint32(18).fork()).ldelim();
358
+ break;
359
+ case "videoTexture":
360
+ VideoTexture.encode(message.tex.videoTexture, writer.uint32(26).fork()).ldelim();
361
+ break;
362
+ }
363
+ return writer;
364
+ },
365
+
366
+ decode(input: _m0.Reader | Uint8Array, length?: number): TextureUnion {
367
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
368
+ let end = length === undefined ? reader.len : reader.pos + length;
369
+ const message = createBaseTextureUnion();
370
+ while (reader.pos < end) {
371
+ const tag = reader.uint32();
372
+ switch (tag >>> 3) {
373
+ case 1:
374
+ message.tex = { $case: "texture", texture: Texture.decode(reader, reader.uint32()) };
375
+ break;
376
+ case 2:
377
+ message.tex = { $case: "avatarTexture", avatarTexture: AvatarTexture.decode(reader, reader.uint32()) };
378
+ break;
379
+ case 3:
380
+ message.tex = { $case: "videoTexture", videoTexture: VideoTexture.decode(reader, reader.uint32()) };
381
+ break;
382
+ default:
383
+ reader.skipType(tag & 7);
384
+ break;
385
+ }
386
+ }
387
+ return message;
388
+ },
389
+
390
+ fromJSON(object: any): TextureUnion {
391
+ return {
392
+ tex: isSet(object.texture)
393
+ ? { $case: "texture", texture: Texture.fromJSON(object.texture) }
394
+ : isSet(object.avatarTexture)
395
+ ? { $case: "avatarTexture", avatarTexture: AvatarTexture.fromJSON(object.avatarTexture) }
396
+ : isSet(object.videoTexture)
397
+ ? { $case: "videoTexture", videoTexture: VideoTexture.fromJSON(object.videoTexture) }
398
+ : undefined,
399
+ };
400
+ },
401
+
402
+ toJSON(message: TextureUnion): unknown {
403
+ const obj: any = {};
404
+ message.tex?.$case === "texture" &&
405
+ (obj.texture = message.tex?.texture ? Texture.toJSON(message.tex?.texture) : undefined);
406
+ message.tex?.$case === "avatarTexture" &&
407
+ (obj.avatarTexture = message.tex?.avatarTexture ? AvatarTexture.toJSON(message.tex?.avatarTexture) : undefined);
408
+ message.tex?.$case === "videoTexture" &&
409
+ (obj.videoTexture = message.tex?.videoTexture ? VideoTexture.toJSON(message.tex?.videoTexture) : undefined);
410
+ return obj;
411
+ },
412
+
413
+ create<I extends Exact<DeepPartial<TextureUnion>, I>>(base?: I): TextureUnion {
414
+ return TextureUnion.fromPartial(base ?? {});
415
+ },
416
+
417
+ fromPartial<I extends Exact<DeepPartial<TextureUnion>, I>>(object: I): TextureUnion {
418
+ const message = createBaseTextureUnion();
419
+ if (object.tex?.$case === "texture" && object.tex?.texture !== undefined && object.tex?.texture !== null) {
420
+ message.tex = { $case: "texture", texture: Texture.fromPartial(object.tex.texture) };
421
+ }
422
+ if (
423
+ object.tex?.$case === "avatarTexture" &&
424
+ object.tex?.avatarTexture !== undefined &&
425
+ object.tex?.avatarTexture !== null
426
+ ) {
427
+ message.tex = { $case: "avatarTexture", avatarTexture: AvatarTexture.fromPartial(object.tex.avatarTexture) };
428
+ }
429
+ if (
430
+ object.tex?.$case === "videoTexture" &&
431
+ object.tex?.videoTexture !== undefined &&
432
+ object.tex?.videoTexture !== null
433
+ ) {
434
+ message.tex = { $case: "videoTexture", videoTexture: VideoTexture.fromPartial(object.tex.videoTexture) };
435
+ }
436
+ return message;
437
+ },
438
+ };
439
+
440
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
441
+
442
+ export type DeepPartial<T> = T extends Builtin ? T
443
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
444
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
445
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
446
+ : Partial<T>;
447
+
448
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
449
+ export type Exact<P, I extends P> = P extends Builtin ? P
450
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
451
+
452
+ function isSet(value: any): boolean {
453
+ return value !== null && value !== undefined;
454
+ }
@@ -0,0 +1,229 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+
4
+ export const protobufPackage = "decentraland.sdk.components";
5
+
6
+ /**
7
+ * The Animator component is a container for multiple potential animations an Entity can display,
8
+ * separately or at the same time. It can be used to start, stop or blend animations; as well as
9
+ * to inspect their playback state.
10
+ *
11
+ * Animations have a `weight` property, which determines how pronounced the animation will be. This
12
+ * can be adjusted to blend animations together, or gracefully transition from one to the next.
13
+ */
14
+ export interface PBAnimator {
15
+ /** a collection of animations and their current state */
16
+ states: PBAnimationState[];
17
+ }
18
+
19
+ /** AnimationState indicates the status and configuration of one available animation. */
20
+ export interface PBAnimationState {
21
+ /** the identifier for this animation, to use in scene code */
22
+ name: string;
23
+ /** the animation path in the `files` array of the scene manifest */
24
+ clip: string;
25
+ /** whether this animation is currently playing */
26
+ playing?:
27
+ | boolean
28
+ | undefined;
29
+ /** the "weight" of this animation (see below, default: 1.0) */
30
+ weight?:
31
+ | number
32
+ | undefined;
33
+ /** the playback speed (default: 1.0) */
34
+ speed?:
35
+ | number
36
+ | undefined;
37
+ /** whether the animation repeats until stopped (default: true) */
38
+ loop?:
39
+ | boolean
40
+ | undefined;
41
+ /** whether the Entity is restored to its prior state when done */
42
+ shouldReset?: boolean | undefined;
43
+ }
44
+
45
+ function createBasePBAnimator(): PBAnimator {
46
+ return { states: [] };
47
+ }
48
+
49
+ export const PBAnimator = {
50
+ encode(message: PBAnimator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
51
+ for (const v of message.states) {
52
+ PBAnimationState.encode(v!, writer.uint32(10).fork()).ldelim();
53
+ }
54
+ return writer;
55
+ },
56
+
57
+ decode(input: _m0.Reader | Uint8Array, length?: number): PBAnimator {
58
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
59
+ let end = length === undefined ? reader.len : reader.pos + length;
60
+ const message = createBasePBAnimator();
61
+ while (reader.pos < end) {
62
+ const tag = reader.uint32();
63
+ switch (tag >>> 3) {
64
+ case 1:
65
+ message.states.push(PBAnimationState.decode(reader, reader.uint32()));
66
+ break;
67
+ default:
68
+ reader.skipType(tag & 7);
69
+ break;
70
+ }
71
+ }
72
+ return message;
73
+ },
74
+
75
+ fromJSON(object: any): PBAnimator {
76
+ return { states: Array.isArray(object?.states) ? object.states.map((e: any) => PBAnimationState.fromJSON(e)) : [] };
77
+ },
78
+
79
+ toJSON(message: PBAnimator): unknown {
80
+ const obj: any = {};
81
+ if (message.states) {
82
+ obj.states = message.states.map((e) => e ? PBAnimationState.toJSON(e) : undefined);
83
+ } else {
84
+ obj.states = [];
85
+ }
86
+ return obj;
87
+ },
88
+
89
+ create<I extends Exact<DeepPartial<PBAnimator>, I>>(base?: I): PBAnimator {
90
+ return PBAnimator.fromPartial(base ?? {});
91
+ },
92
+
93
+ fromPartial<I extends Exact<DeepPartial<PBAnimator>, I>>(object: I): PBAnimator {
94
+ const message = createBasePBAnimator();
95
+ message.states = object.states?.map((e) => PBAnimationState.fromPartial(e)) || [];
96
+ return message;
97
+ },
98
+ };
99
+
100
+ function createBasePBAnimationState(): PBAnimationState {
101
+ return {
102
+ name: "",
103
+ clip: "",
104
+ playing: undefined,
105
+ weight: undefined,
106
+ speed: undefined,
107
+ loop: undefined,
108
+ shouldReset: undefined,
109
+ };
110
+ }
111
+
112
+ export const PBAnimationState = {
113
+ encode(message: PBAnimationState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
114
+ if (message.name !== "") {
115
+ writer.uint32(10).string(message.name);
116
+ }
117
+ if (message.clip !== "") {
118
+ writer.uint32(18).string(message.clip);
119
+ }
120
+ if (message.playing !== undefined) {
121
+ writer.uint32(24).bool(message.playing);
122
+ }
123
+ if (message.weight !== undefined) {
124
+ writer.uint32(37).float(message.weight);
125
+ }
126
+ if (message.speed !== undefined) {
127
+ writer.uint32(45).float(message.speed);
128
+ }
129
+ if (message.loop !== undefined) {
130
+ writer.uint32(48).bool(message.loop);
131
+ }
132
+ if (message.shouldReset !== undefined) {
133
+ writer.uint32(56).bool(message.shouldReset);
134
+ }
135
+ return writer;
136
+ },
137
+
138
+ decode(input: _m0.Reader | Uint8Array, length?: number): PBAnimationState {
139
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
140
+ let end = length === undefined ? reader.len : reader.pos + length;
141
+ const message = createBasePBAnimationState();
142
+ while (reader.pos < end) {
143
+ const tag = reader.uint32();
144
+ switch (tag >>> 3) {
145
+ case 1:
146
+ message.name = reader.string();
147
+ break;
148
+ case 2:
149
+ message.clip = reader.string();
150
+ break;
151
+ case 3:
152
+ message.playing = reader.bool();
153
+ break;
154
+ case 4:
155
+ message.weight = reader.float();
156
+ break;
157
+ case 5:
158
+ message.speed = reader.float();
159
+ break;
160
+ case 6:
161
+ message.loop = reader.bool();
162
+ break;
163
+ case 7:
164
+ message.shouldReset = reader.bool();
165
+ break;
166
+ default:
167
+ reader.skipType(tag & 7);
168
+ break;
169
+ }
170
+ }
171
+ return message;
172
+ },
173
+
174
+ fromJSON(object: any): PBAnimationState {
175
+ return {
176
+ name: isSet(object.name) ? String(object.name) : "",
177
+ clip: isSet(object.clip) ? String(object.clip) : "",
178
+ playing: isSet(object.playing) ? Boolean(object.playing) : undefined,
179
+ weight: isSet(object.weight) ? Number(object.weight) : undefined,
180
+ speed: isSet(object.speed) ? Number(object.speed) : undefined,
181
+ loop: isSet(object.loop) ? Boolean(object.loop) : undefined,
182
+ shouldReset: isSet(object.shouldReset) ? Boolean(object.shouldReset) : undefined,
183
+ };
184
+ },
185
+
186
+ toJSON(message: PBAnimationState): unknown {
187
+ const obj: any = {};
188
+ message.name !== undefined && (obj.name = message.name);
189
+ message.clip !== undefined && (obj.clip = message.clip);
190
+ message.playing !== undefined && (obj.playing = message.playing);
191
+ message.weight !== undefined && (obj.weight = message.weight);
192
+ message.speed !== undefined && (obj.speed = message.speed);
193
+ message.loop !== undefined && (obj.loop = message.loop);
194
+ message.shouldReset !== undefined && (obj.shouldReset = message.shouldReset);
195
+ return obj;
196
+ },
197
+
198
+ create<I extends Exact<DeepPartial<PBAnimationState>, I>>(base?: I): PBAnimationState {
199
+ return PBAnimationState.fromPartial(base ?? {});
200
+ },
201
+
202
+ fromPartial<I extends Exact<DeepPartial<PBAnimationState>, I>>(object: I): PBAnimationState {
203
+ const message = createBasePBAnimationState();
204
+ message.name = object.name ?? "";
205
+ message.clip = object.clip ?? "";
206
+ message.playing = object.playing ?? undefined;
207
+ message.weight = object.weight ?? undefined;
208
+ message.speed = object.speed ?? undefined;
209
+ message.loop = object.loop ?? undefined;
210
+ message.shouldReset = object.shouldReset ?? undefined;
211
+ return message;
212
+ },
213
+ };
214
+
215
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
216
+
217
+ export type DeepPartial<T> = T extends Builtin ? T
218
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
219
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
220
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
221
+ : Partial<T>;
222
+
223
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
224
+ export type Exact<P, I extends P> = P extends Builtin ? P
225
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
226
+
227
+ function isSet(value: any): boolean {
228
+ return value !== null && value !== undefined;
229
+ }