@dcl/protocol 1.0.0-4427886959.commit-6b9dcb5 → 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 (154) 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/public/sdk-components.proto +33 -0
@@ -0,0 +1,141 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+
4
+ export const protobufPackage = "decentraland.sdk.components";
5
+
6
+ /**
7
+ * The AudioSource component can play an audio clips bundled with the scene, controlling some
8
+ * of the behavior.
9
+ *
10
+ * In each AudioSource instance, the sound is spatially located at the associated entity’s position,
11
+ * given by its Transform.
12
+ *
13
+ * Note that the `audio_clip_url` is not actually a URL, but rather the path of a file bundled with
14
+ * the scene and declared in its manifest. The name was chosen because the URL use-case will
15
+ * eventually be supported.
16
+ */
17
+ export interface PBAudioSource {
18
+ /** whether the clip is currently playing. */
19
+ playing?:
20
+ | boolean
21
+ | undefined;
22
+ /** the audio volume (default: 1.0). */
23
+ volume?:
24
+ | number
25
+ | undefined;
26
+ /** whether the clip should restart when finished. */
27
+ loop?:
28
+ | boolean
29
+ | undefined;
30
+ /** the audio pitch (default: 1.0). */
31
+ pitch?:
32
+ | number
33
+ | undefined;
34
+ /** the clip path as given in the `files` array of the scene's manifest. */
35
+ audioClipUrl: string;
36
+ }
37
+
38
+ function createBasePBAudioSource(): PBAudioSource {
39
+ return { playing: undefined, volume: undefined, loop: undefined, pitch: undefined, audioClipUrl: "" };
40
+ }
41
+
42
+ export const PBAudioSource = {
43
+ encode(message: PBAudioSource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
44
+ if (message.playing !== undefined) {
45
+ writer.uint32(8).bool(message.playing);
46
+ }
47
+ if (message.volume !== undefined) {
48
+ writer.uint32(21).float(message.volume);
49
+ }
50
+ if (message.loop !== undefined) {
51
+ writer.uint32(24).bool(message.loop);
52
+ }
53
+ if (message.pitch !== undefined) {
54
+ writer.uint32(37).float(message.pitch);
55
+ }
56
+ if (message.audioClipUrl !== "") {
57
+ writer.uint32(42).string(message.audioClipUrl);
58
+ }
59
+ return writer;
60
+ },
61
+
62
+ decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioSource {
63
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
64
+ let end = length === undefined ? reader.len : reader.pos + length;
65
+ const message = createBasePBAudioSource();
66
+ while (reader.pos < end) {
67
+ const tag = reader.uint32();
68
+ switch (tag >>> 3) {
69
+ case 1:
70
+ message.playing = reader.bool();
71
+ break;
72
+ case 2:
73
+ message.volume = reader.float();
74
+ break;
75
+ case 3:
76
+ message.loop = reader.bool();
77
+ break;
78
+ case 4:
79
+ message.pitch = reader.float();
80
+ break;
81
+ case 5:
82
+ message.audioClipUrl = reader.string();
83
+ break;
84
+ default:
85
+ reader.skipType(tag & 7);
86
+ break;
87
+ }
88
+ }
89
+ return message;
90
+ },
91
+
92
+ fromJSON(object: any): PBAudioSource {
93
+ return {
94
+ playing: isSet(object.playing) ? Boolean(object.playing) : undefined,
95
+ volume: isSet(object.volume) ? Number(object.volume) : undefined,
96
+ loop: isSet(object.loop) ? Boolean(object.loop) : undefined,
97
+ pitch: isSet(object.pitch) ? Number(object.pitch) : undefined,
98
+ audioClipUrl: isSet(object.audioClipUrl) ? String(object.audioClipUrl) : "",
99
+ };
100
+ },
101
+
102
+ toJSON(message: PBAudioSource): unknown {
103
+ const obj: any = {};
104
+ message.playing !== undefined && (obj.playing = message.playing);
105
+ message.volume !== undefined && (obj.volume = message.volume);
106
+ message.loop !== undefined && (obj.loop = message.loop);
107
+ message.pitch !== undefined && (obj.pitch = message.pitch);
108
+ message.audioClipUrl !== undefined && (obj.audioClipUrl = message.audioClipUrl);
109
+ return obj;
110
+ },
111
+
112
+ create<I extends Exact<DeepPartial<PBAudioSource>, I>>(base?: I): PBAudioSource {
113
+ return PBAudioSource.fromPartial(base ?? {});
114
+ },
115
+
116
+ fromPartial<I extends Exact<DeepPartial<PBAudioSource>, I>>(object: I): PBAudioSource {
117
+ const message = createBasePBAudioSource();
118
+ message.playing = object.playing ?? undefined;
119
+ message.volume = object.volume ?? undefined;
120
+ message.loop = object.loop ?? undefined;
121
+ message.pitch = object.pitch ?? undefined;
122
+ message.audioClipUrl = object.audioClipUrl ?? "";
123
+ return message;
124
+ },
125
+ };
126
+
127
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
128
+
129
+ export type DeepPartial<T> = T extends Builtin ? T
130
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
131
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
132
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
133
+ : Partial<T>;
134
+
135
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
136
+ export type Exact<P, I extends P> = P extends Builtin ? P
137
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
138
+
139
+ function isSet(value: any): boolean {
140
+ return value !== null && value !== undefined;
141
+ }
@@ -0,0 +1,109 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+
4
+ export const protobufPackage = "decentraland.sdk.components";
5
+
6
+ /**
7
+ * The AudioStream component can play external audio clips given a URL, streaming it in real-time.
8
+ *
9
+ * Despite being attached to a particular entity, the sound is not affected by its position.
10
+ */
11
+ export interface PBAudioStream {
12
+ /** whether the clip is currently playing */
13
+ playing?:
14
+ | boolean
15
+ | undefined;
16
+ /** the audio volume (default: 1.0) */
17
+ volume?:
18
+ | number
19
+ | undefined;
20
+ /** the audio stream HTTP URL */
21
+ url: string;
22
+ }
23
+
24
+ function createBasePBAudioStream(): PBAudioStream {
25
+ return { playing: undefined, volume: undefined, url: "" };
26
+ }
27
+
28
+ export const PBAudioStream = {
29
+ encode(message: PBAudioStream, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
30
+ if (message.playing !== undefined) {
31
+ writer.uint32(8).bool(message.playing);
32
+ }
33
+ if (message.volume !== undefined) {
34
+ writer.uint32(21).float(message.volume);
35
+ }
36
+ if (message.url !== "") {
37
+ writer.uint32(26).string(message.url);
38
+ }
39
+ return writer;
40
+ },
41
+
42
+ decode(input: _m0.Reader | Uint8Array, length?: number): PBAudioStream {
43
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
44
+ let end = length === undefined ? reader.len : reader.pos + length;
45
+ const message = createBasePBAudioStream();
46
+ while (reader.pos < end) {
47
+ const tag = reader.uint32();
48
+ switch (tag >>> 3) {
49
+ case 1:
50
+ message.playing = reader.bool();
51
+ break;
52
+ case 2:
53
+ message.volume = reader.float();
54
+ break;
55
+ case 3:
56
+ message.url = reader.string();
57
+ break;
58
+ default:
59
+ reader.skipType(tag & 7);
60
+ break;
61
+ }
62
+ }
63
+ return message;
64
+ },
65
+
66
+ fromJSON(object: any): PBAudioStream {
67
+ return {
68
+ playing: isSet(object.playing) ? Boolean(object.playing) : undefined,
69
+ volume: isSet(object.volume) ? Number(object.volume) : undefined,
70
+ url: isSet(object.url) ? String(object.url) : "",
71
+ };
72
+ },
73
+
74
+ toJSON(message: PBAudioStream): unknown {
75
+ const obj: any = {};
76
+ message.playing !== undefined && (obj.playing = message.playing);
77
+ message.volume !== undefined && (obj.volume = message.volume);
78
+ message.url !== undefined && (obj.url = message.url);
79
+ return obj;
80
+ },
81
+
82
+ create<I extends Exact<DeepPartial<PBAudioStream>, I>>(base?: I): PBAudioStream {
83
+ return PBAudioStream.fromPartial(base ?? {});
84
+ },
85
+
86
+ fromPartial<I extends Exact<DeepPartial<PBAudioStream>, I>>(object: I): PBAudioStream {
87
+ const message = createBasePBAudioStream();
88
+ message.playing = object.playing ?? undefined;
89
+ message.volume = object.volume ?? undefined;
90
+ message.url = object.url ?? "";
91
+ return message;
92
+ },
93
+ };
94
+
95
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
96
+
97
+ export type DeepPartial<T> = T extends Builtin ? T
98
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
99
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
100
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
101
+ : Partial<T>;
102
+
103
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
104
+ export type Exact<P, I extends P> = P extends Builtin ? P
105
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
106
+
107
+ function isSet(value: any): boolean {
108
+ return value !== null && value !== undefined;
109
+ }
@@ -0,0 +1,147 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+
4
+ export const protobufPackage = "decentraland.sdk.components";
5
+
6
+ /** AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity. */
7
+ export enum AvatarAnchorPointType {
8
+ AAPT_POSITION = 0,
9
+ AAPT_NAME_TAG = 1,
10
+ AAPT_LEFT_HAND = 2,
11
+ AAPT_RIGHT_HAND = 3,
12
+ UNRECOGNIZED = -1,
13
+ }
14
+
15
+ export function avatarAnchorPointTypeFromJSON(object: any): AvatarAnchorPointType {
16
+ switch (object) {
17
+ case 0:
18
+ case "AAPT_POSITION":
19
+ return AvatarAnchorPointType.AAPT_POSITION;
20
+ case 1:
21
+ case "AAPT_NAME_TAG":
22
+ return AvatarAnchorPointType.AAPT_NAME_TAG;
23
+ case 2:
24
+ case "AAPT_LEFT_HAND":
25
+ return AvatarAnchorPointType.AAPT_LEFT_HAND;
26
+ case 3:
27
+ case "AAPT_RIGHT_HAND":
28
+ return AvatarAnchorPointType.AAPT_RIGHT_HAND;
29
+ case -1:
30
+ case "UNRECOGNIZED":
31
+ default:
32
+ return AvatarAnchorPointType.UNRECOGNIZED;
33
+ }
34
+ }
35
+
36
+ export function avatarAnchorPointTypeToJSON(object: AvatarAnchorPointType): string {
37
+ switch (object) {
38
+ case AvatarAnchorPointType.AAPT_POSITION:
39
+ return "AAPT_POSITION";
40
+ case AvatarAnchorPointType.AAPT_NAME_TAG:
41
+ return "AAPT_NAME_TAG";
42
+ case AvatarAnchorPointType.AAPT_LEFT_HAND:
43
+ return "AAPT_LEFT_HAND";
44
+ case AvatarAnchorPointType.AAPT_RIGHT_HAND:
45
+ return "AAPT_RIGHT_HAND";
46
+ case AvatarAnchorPointType.UNRECOGNIZED:
47
+ default:
48
+ return "UNRECOGNIZED";
49
+ }
50
+ }
51
+
52
+ /**
53
+ * The AvatarAttach component automatically repositions an Entity to maintain the same position and
54
+ * rotation relative to some part of an avatar, called the "anchor point". The Entity
55
+ * will follow this anchor as it moves.
56
+ *
57
+ * The Entity's own Transform is overridden by this component. To offset position and adjust scale,
58
+ * add a child to the anchored Entity and set a Transform on it instead.
59
+ *
60
+ * AvatarAnchorPointType indicates which part of the avatar the Entity must follow.
61
+ */
62
+ export interface PBAvatarAttach {
63
+ /** the user ID of the avatar (default: local user) */
64
+ avatarId?:
65
+ | string
66
+ | undefined;
67
+ /** the anchor point. */
68
+ anchorPointId: AvatarAnchorPointType;
69
+ }
70
+
71
+ function createBasePBAvatarAttach(): PBAvatarAttach {
72
+ return { avatarId: undefined, anchorPointId: 0 };
73
+ }
74
+
75
+ export const PBAvatarAttach = {
76
+ encode(message: PBAvatarAttach, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
77
+ if (message.avatarId !== undefined) {
78
+ writer.uint32(10).string(message.avatarId);
79
+ }
80
+ if (message.anchorPointId !== 0) {
81
+ writer.uint32(16).int32(message.anchorPointId);
82
+ }
83
+ return writer;
84
+ },
85
+
86
+ decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarAttach {
87
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
88
+ let end = length === undefined ? reader.len : reader.pos + length;
89
+ const message = createBasePBAvatarAttach();
90
+ while (reader.pos < end) {
91
+ const tag = reader.uint32();
92
+ switch (tag >>> 3) {
93
+ case 1:
94
+ message.avatarId = reader.string();
95
+ break;
96
+ case 2:
97
+ message.anchorPointId = reader.int32() as any;
98
+ break;
99
+ default:
100
+ reader.skipType(tag & 7);
101
+ break;
102
+ }
103
+ }
104
+ return message;
105
+ },
106
+
107
+ fromJSON(object: any): PBAvatarAttach {
108
+ return {
109
+ avatarId: isSet(object.avatarId) ? String(object.avatarId) : undefined,
110
+ anchorPointId: isSet(object.anchorPointId) ? avatarAnchorPointTypeFromJSON(object.anchorPointId) : 0,
111
+ };
112
+ },
113
+
114
+ toJSON(message: PBAvatarAttach): unknown {
115
+ const obj: any = {};
116
+ message.avatarId !== undefined && (obj.avatarId = message.avatarId);
117
+ message.anchorPointId !== undefined && (obj.anchorPointId = avatarAnchorPointTypeToJSON(message.anchorPointId));
118
+ return obj;
119
+ },
120
+
121
+ create<I extends Exact<DeepPartial<PBAvatarAttach>, I>>(base?: I): PBAvatarAttach {
122
+ return PBAvatarAttach.fromPartial(base ?? {});
123
+ },
124
+
125
+ fromPartial<I extends Exact<DeepPartial<PBAvatarAttach>, I>>(object: I): PBAvatarAttach {
126
+ const message = createBasePBAvatarAttach();
127
+ message.avatarId = object.avatarId ?? undefined;
128
+ message.anchorPointId = object.anchorPointId ?? 0;
129
+ return message;
130
+ },
131
+ };
132
+
133
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
134
+
135
+ export type DeepPartial<T> = T extends Builtin ? T
136
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
137
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
138
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
139
+ : Partial<T>;
140
+
141
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
142
+ export type Exact<P, I extends P> = P extends Builtin ? P
143
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
144
+
145
+ function isSet(value: any): boolean {
146
+ return value !== null && value !== undefined;
147
+ }
@@ -0,0 +1,172 @@
1
+ /* eslint-disable */
2
+ import _m0 from "protobufjs/minimal";
3
+ import { Vector3 } from "../../common/vectors.gen";
4
+
5
+ export const protobufPackage = "decentraland.sdk.components";
6
+
7
+ /** AvatarModifierType is an effect that should be applied to avatars inside the region. */
8
+ export enum AvatarModifierType {
9
+ /** AMT_HIDE_AVATARS - avatars are invisible */
10
+ AMT_HIDE_AVATARS = 0,
11
+ /** AMT_DISABLE_PASSPORTS - selecting (e.g. clicking) an avatar will not bring up their profile. */
12
+ AMT_DISABLE_PASSPORTS = 1,
13
+ UNRECOGNIZED = -1,
14
+ }
15
+
16
+ export function avatarModifierTypeFromJSON(object: any): AvatarModifierType {
17
+ switch (object) {
18
+ case 0:
19
+ case "AMT_HIDE_AVATARS":
20
+ return AvatarModifierType.AMT_HIDE_AVATARS;
21
+ case 1:
22
+ case "AMT_DISABLE_PASSPORTS":
23
+ return AvatarModifierType.AMT_DISABLE_PASSPORTS;
24
+ case -1:
25
+ case "UNRECOGNIZED":
26
+ default:
27
+ return AvatarModifierType.UNRECOGNIZED;
28
+ }
29
+ }
30
+
31
+ export function avatarModifierTypeToJSON(object: AvatarModifierType): string {
32
+ switch (object) {
33
+ case AvatarModifierType.AMT_HIDE_AVATARS:
34
+ return "AMT_HIDE_AVATARS";
35
+ case AvatarModifierType.AMT_DISABLE_PASSPORTS:
36
+ return "AMT_DISABLE_PASSPORTS";
37
+ case AvatarModifierType.UNRECOGNIZED:
38
+ default:
39
+ return "UNRECOGNIZED";
40
+ }
41
+ }
42
+
43
+ /**
44
+ * The AvatarModifierArea component can be attached to an Entity to define a region of space where
45
+ * avatar behavior changes.
46
+ *
47
+ * The Entity's Transform position determines the center-point of the region, while its size is
48
+ * given as a vector in the `area` property below. The Transform rotation is applied, but the scale
49
+ * is ignored.
50
+ *
51
+ * The modifier effect is only applied to avatars inside the region. It does not affect how players
52
+ * standing inside it see avatars on the other side of the boundary.
53
+ *
54
+ * Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
55
+ * is actually a 3D volume.
56
+ */
57
+ export interface PBAvatarModifierArea {
58
+ /** the 3D size of the region */
59
+ area:
60
+ | Vector3
61
+ | undefined;
62
+ /** user IDs that can enter and remain unaffected */
63
+ excludeIds: string[];
64
+ /** list of modifiers to apply */
65
+ modifiers: AvatarModifierType[];
66
+ }
67
+
68
+ function createBasePBAvatarModifierArea(): PBAvatarModifierArea {
69
+ return { area: undefined, excludeIds: [], modifiers: [] };
70
+ }
71
+
72
+ export const PBAvatarModifierArea = {
73
+ encode(message: PBAvatarModifierArea, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
74
+ if (message.area !== undefined) {
75
+ Vector3.encode(message.area, writer.uint32(10).fork()).ldelim();
76
+ }
77
+ for (const v of message.excludeIds) {
78
+ writer.uint32(18).string(v!);
79
+ }
80
+ writer.uint32(26).fork();
81
+ for (const v of message.modifiers) {
82
+ writer.int32(v);
83
+ }
84
+ writer.ldelim();
85
+ return writer;
86
+ },
87
+
88
+ decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarModifierArea {
89
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
90
+ let end = length === undefined ? reader.len : reader.pos + length;
91
+ const message = createBasePBAvatarModifierArea();
92
+ while (reader.pos < end) {
93
+ const tag = reader.uint32();
94
+ switch (tag >>> 3) {
95
+ case 1:
96
+ message.area = Vector3.decode(reader, reader.uint32());
97
+ break;
98
+ case 2:
99
+ message.excludeIds.push(reader.string());
100
+ break;
101
+ case 3:
102
+ if ((tag & 7) === 2) {
103
+ const end2 = reader.uint32() + reader.pos;
104
+ while (reader.pos < end2) {
105
+ message.modifiers.push(reader.int32() as any);
106
+ }
107
+ } else {
108
+ message.modifiers.push(reader.int32() as any);
109
+ }
110
+ break;
111
+ default:
112
+ reader.skipType(tag & 7);
113
+ break;
114
+ }
115
+ }
116
+ return message;
117
+ },
118
+
119
+ fromJSON(object: any): PBAvatarModifierArea {
120
+ return {
121
+ area: isSet(object.area) ? Vector3.fromJSON(object.area) : undefined,
122
+ excludeIds: Array.isArray(object?.excludeIds) ? object.excludeIds.map((e: any) => String(e)) : [],
123
+ modifiers: Array.isArray(object?.modifiers)
124
+ ? object.modifiers.map((e: any) => avatarModifierTypeFromJSON(e))
125
+ : [],
126
+ };
127
+ },
128
+
129
+ toJSON(message: PBAvatarModifierArea): unknown {
130
+ const obj: any = {};
131
+ message.area !== undefined && (obj.area = message.area ? Vector3.toJSON(message.area) : undefined);
132
+ if (message.excludeIds) {
133
+ obj.excludeIds = message.excludeIds.map((e) => e);
134
+ } else {
135
+ obj.excludeIds = [];
136
+ }
137
+ if (message.modifiers) {
138
+ obj.modifiers = message.modifiers.map((e) => avatarModifierTypeToJSON(e));
139
+ } else {
140
+ obj.modifiers = [];
141
+ }
142
+ return obj;
143
+ },
144
+
145
+ create<I extends Exact<DeepPartial<PBAvatarModifierArea>, I>>(base?: I): PBAvatarModifierArea {
146
+ return PBAvatarModifierArea.fromPartial(base ?? {});
147
+ },
148
+
149
+ fromPartial<I extends Exact<DeepPartial<PBAvatarModifierArea>, I>>(object: I): PBAvatarModifierArea {
150
+ const message = createBasePBAvatarModifierArea();
151
+ message.area = (object.area !== undefined && object.area !== null) ? Vector3.fromPartial(object.area) : undefined;
152
+ message.excludeIds = object.excludeIds?.map((e) => e) || [];
153
+ message.modifiers = object.modifiers?.map((e) => e) || [];
154
+ return message;
155
+ },
156
+ };
157
+
158
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
159
+
160
+ export type DeepPartial<T> = T extends Builtin ? T
161
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
162
+ : T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
163
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
164
+ : Partial<T>;
165
+
166
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
167
+ export type Exact<P, I extends P> = P extends Builtin ? P
168
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
169
+
170
+ function isSet(value: any): boolean {
171
+ return value !== null && value !== undefined;
172
+ }