@dcl/protocol 1.0.0-32905037810.commit-4ed8d74 → 1.0.0-33247403125.commit-6e4ee4a
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.
- package/out-js/decentraland/common/texture.gen.d.ts +18 -0
- package/out-js/decentraland/common/texture.gen.js +104 -4
- package/out-js/decentraland/common/texture.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +113 -2
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +387 -3
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.d.ts +0 -21
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js +4 -124
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +2 -0
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +19 -2
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.d.ts +51 -0
- package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js +177 -0
- package/out-js/decentraland/sdk/components/avatar_locomotion_settings.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.d.ts +2 -0
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +14 -2
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_movement.gen.d.ts +71 -0
- package/out-js/decentraland/sdk/components/avatar_movement.gen.js +303 -0
- package/out-js/decentraland/sdk/components/avatar_movement.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/avatar_movement_info.gen.d.ts +79 -0
- package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +357 -0
- package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/avatar_shape.gen.d.ts +2 -8
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js +20 -36
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/camera_layer.gen.d.ts +46 -0
- package/out-js/decentraland/sdk/components/camera_layer.gen.js +162 -0
- package/out-js/decentraland/sdk/components/camera_layer.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/camera_layers.gen.d.ts +30 -0
- package/out-js/decentraland/sdk/components/camera_layers.gen.js +80 -0
- package/out-js/decentraland/sdk/components/camera_layers.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +2 -0
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +14 -2
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.d.ts +3 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +18 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/global_light.gen.d.ts +50 -0
- package/out-js/decentraland/sdk/components/global_light.gen.js +103 -0
- package/out-js/decentraland/sdk/components/global_light.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.d.ts +19 -0
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js +90 -3
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/gltf_node.gen.d.ts +66 -0
- package/out-js/decentraland/sdk/components/gltf_node.gen.js +69 -0
- package/out-js/decentraland/sdk/components/gltf_node.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.d.ts +43 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js +122 -0
- package/out-js/decentraland/sdk/components/gltf_node_state.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/input_modifier.gen.d.ts +52 -0
- package/out-js/decentraland/sdk/components/input_modifier.gen.js +233 -0
- package/out-js/decentraland/sdk/components/input_modifier.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/material.gen.d.ts +20 -0
- package/out-js/decentraland/sdk/components/material.gen.js +86 -2
- package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_collider.gen.d.ts +18 -0
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js +90 -4
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.d.ts +19 -3
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js +90 -4
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/raycast.gen.d.ts +13 -0
- package/out-js/decentraland/sdk/components/raycast.gen.js +64 -2
- package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/texture_camera.gen.d.ts +86 -0
- package/out-js/decentraland/sdk/components/texture_camera.gen.js +296 -0
- package/out-js/decentraland/sdk/components/texture_camera.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/ui_canvas.gen.d.ts +35 -0
- package/out-js/decentraland/sdk/components/ui_canvas.gen.js +98 -0
- package/out-js/decentraland/sdk/components/ui_canvas.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/ui_input.gen.d.ts +4 -0
- package/out-js/decentraland/sdk/components/ui_input.gen.js +27 -1
- package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_scroll_result.gen.d.ts +31 -0
- package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js +71 -0
- package/out-js/decentraland/sdk/components/ui_scroll_result.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +33 -0
- package/out-js/decentraland/sdk/components/ui_transform.gen.js +176 -3
- package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
- package/out-ts/decentraland/common/texture.gen.ts +119 -4
- package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +414 -2
- package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +2 -166
- package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +20 -1
- package/out-ts/decentraland/sdk/components/avatar_locomotion_settings.gen.ts +237 -0
- package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +16 -1
- package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +372 -0
- package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +432 -0
- package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +23 -35
- package/out-ts/decentraland/sdk/components/camera_layer.gen.ts +202 -0
- package/out-ts/decentraland/sdk/components/camera_layers.gen.ts +92 -0
- package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +16 -1
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +18 -0
- package/out-ts/decentraland/sdk/components/global_light.gen.ts +138 -0
- package/out-ts/decentraland/sdk/components/gltf_container_loading_state.gen.ts +108 -2
- package/out-ts/decentraland/sdk/components/gltf_node.gen.ts +116 -0
- package/out-ts/decentraland/sdk/components/gltf_node_state.gen.ts +139 -0
- package/out-ts/decentraland/sdk/components/input_modifier.gen.ts +265 -0
- package/out-ts/decentraland/sdk/components/material.gen.ts +102 -1
- package/out-ts/decentraland/sdk/components/mesh_collider.gen.ts +99 -0
- package/out-ts/decentraland/sdk/components/mesh_renderer.gen.ts +100 -3
- package/out-ts/decentraland/sdk/components/raycast.gen.ts +73 -1
- package/out-ts/decentraland/sdk/components/texture_camera.gen.ts +362 -0
- package/out-ts/decentraland/sdk/components/ui_canvas.gen.ts +115 -0
- package/out-ts/decentraland/sdk/components/ui_input.gen.ts +37 -1
- package/out-ts/decentraland/sdk/components/ui_scroll_result.gen.ts +83 -0
- package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +193 -0
- package/package.json +3 -3
- package/proto/decentraland/common/texture.proto +8 -1
- package/proto/decentraland/kernel/apis/restricted_actions.proto +38 -0
- package/proto/decentraland/kernel/comms/rfc4/comms.proto +0 -11
- package/proto/decentraland/sdk/components/avatar_equipped_data.proto +2 -1
- package/proto/decentraland/sdk/components/avatar_modifier_area.proto +1 -0
- package/proto/decentraland/sdk/components/avatar_movement.proto +62 -0
- package/proto/decentraland/sdk/components/avatar_movement_info.proto +36 -0
- package/proto/decentraland/sdk/components/avatar_shape.proto +1 -5
- package/proto/decentraland/sdk/components/camera_layer.proto +30 -0
- package/proto/decentraland/sdk/components/camera_layers.proto +11 -0
- package/proto/decentraland/sdk/components/camera_mode_area.proto +1 -0
- package/proto/decentraland/sdk/components/common/input_action.proto +3 -0
- package/proto/decentraland/sdk/components/global_light.proto +22 -0
- package/proto/decentraland/sdk/components/gltf_container_loading_state.proto +13 -0
- package/proto/decentraland/sdk/components/gltf_node.proto +42 -0
- package/proto/decentraland/sdk/components/gltf_node_state.proto +20 -0
- package/proto/decentraland/sdk/components/light_source.proto +1 -1
- package/proto/decentraland/sdk/components/material.proto +13 -1
- package/proto/decentraland/sdk/components/mesh_collider.proto +7 -0
- package/proto/decentraland/sdk/components/mesh_renderer.proto +8 -3
- package/proto/decentraland/sdk/components/primary_pointer_info.proto +5 -0
- package/proto/decentraland/sdk/components/raycast.proto +13 -0
- package/proto/decentraland/sdk/components/texture_camera.proto +46 -0
- package/proto/decentraland/sdk/components/ui_canvas.proto +16 -0
- package/proto/decentraland/sdk/components/ui_input.proto +2 -0
- package/proto/decentraland/sdk/components/ui_scroll_result.proto +12 -0
- package/proto/decentraland/sdk/components/ui_transform.proto +20 -0
- package/public/sdk-components.proto +10 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Vector3 } from "../../common/vectors.gen";
|
|
4
|
+
import { PBAvatarLocomotionSettings } from "./avatar_locomotion_settings.gen";
|
|
5
|
+
import { PBInputModifier } from "./input_modifier.gen";
|
|
6
|
+
|
|
7
|
+
export const protobufPackage = "decentraland.sdk.components";
|
|
8
|
+
|
|
9
|
+
export interface PBAvatarMovementInfo {
|
|
10
|
+
/** the length of time the current step velocity will apply for */
|
|
11
|
+
stepTime: number;
|
|
12
|
+
/** the length of time the previous step velocity applied for */
|
|
13
|
+
previousStepTime: number;
|
|
14
|
+
/** the velocity requested for the previous frame */
|
|
15
|
+
requestedVelocity:
|
|
16
|
+
| Vector3
|
|
17
|
+
| undefined;
|
|
18
|
+
/** the resulting velocity taking collisions into account */
|
|
19
|
+
actualVelocity:
|
|
20
|
+
| Vector3
|
|
21
|
+
| undefined;
|
|
22
|
+
/** the velocity imparted by movement of the "ground" platform or pushing from other moving colliders */
|
|
23
|
+
externalVelocity: Vector3 | undefined;
|
|
24
|
+
activeAvatarLocomotionSettings: PBAvatarLocomotionSettings | undefined;
|
|
25
|
+
activeInputModifier:
|
|
26
|
+
| PBInputModifier
|
|
27
|
+
| undefined;
|
|
28
|
+
/** if set, the movement scene should walk the player to this scene-relative position */
|
|
29
|
+
walkTarget?:
|
|
30
|
+
| Vector3
|
|
31
|
+
| undefined;
|
|
32
|
+
/** stop distance for walk_target; considered reached when within this distance */
|
|
33
|
+
walkThreshold?:
|
|
34
|
+
| number
|
|
35
|
+
| undefined;
|
|
36
|
+
/** current state of a scene-driven movement animation. Absent when the engine is using its velocity-based fallback. `playback_time` freezes while a triggerSceneEmote is overriding the animation. */
|
|
37
|
+
activeAnimationState?: AvatarAnimationState | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Mirror of the scene-driven movement animation currently playing, reported by the engine.
|
|
42
|
+
* Readable by any scene (not just the controller) so niche effects (e.g. dust cloud on landing) can react.
|
|
43
|
+
* Active emotes are not represented here — scenes already have their own way to read them.
|
|
44
|
+
*/
|
|
45
|
+
export interface AvatarAnimationState {
|
|
46
|
+
/** same scene-relative path the controlling scene supplied */
|
|
47
|
+
src: string;
|
|
48
|
+
/** mirrors the request */
|
|
49
|
+
loop: boolean;
|
|
50
|
+
/** mirrors the request */
|
|
51
|
+
speed: number;
|
|
52
|
+
/** mirrors the request */
|
|
53
|
+
idle: boolean;
|
|
54
|
+
/** seconds into the clip; wraps on loop; frozen while an emote override is playing */
|
|
55
|
+
playbackTime: number;
|
|
56
|
+
/** total clip length in seconds */
|
|
57
|
+
duration: number;
|
|
58
|
+
/** how many times the clip has completed since it started */
|
|
59
|
+
loopCount: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function createBasePBAvatarMovementInfo(): PBAvatarMovementInfo {
|
|
63
|
+
return {
|
|
64
|
+
stepTime: 0,
|
|
65
|
+
previousStepTime: 0,
|
|
66
|
+
requestedVelocity: undefined,
|
|
67
|
+
actualVelocity: undefined,
|
|
68
|
+
externalVelocity: undefined,
|
|
69
|
+
activeAvatarLocomotionSettings: undefined,
|
|
70
|
+
activeInputModifier: undefined,
|
|
71
|
+
walkTarget: undefined,
|
|
72
|
+
walkThreshold: undefined,
|
|
73
|
+
activeAnimationState: undefined,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export namespace PBAvatarMovementInfo {
|
|
78
|
+
export function encode(message: PBAvatarMovementInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
79
|
+
if (message.stepTime !== 0) {
|
|
80
|
+
writer.uint32(13).float(message.stepTime);
|
|
81
|
+
}
|
|
82
|
+
if (message.previousStepTime !== 0) {
|
|
83
|
+
writer.uint32(21).float(message.previousStepTime);
|
|
84
|
+
}
|
|
85
|
+
if (message.requestedVelocity !== undefined) {
|
|
86
|
+
Vector3.encode(message.requestedVelocity, writer.uint32(26).fork()).ldelim();
|
|
87
|
+
}
|
|
88
|
+
if (message.actualVelocity !== undefined) {
|
|
89
|
+
Vector3.encode(message.actualVelocity, writer.uint32(34).fork()).ldelim();
|
|
90
|
+
}
|
|
91
|
+
if (message.externalVelocity !== undefined) {
|
|
92
|
+
Vector3.encode(message.externalVelocity, writer.uint32(42).fork()).ldelim();
|
|
93
|
+
}
|
|
94
|
+
if (message.activeAvatarLocomotionSettings !== undefined) {
|
|
95
|
+
PBAvatarLocomotionSettings.encode(message.activeAvatarLocomotionSettings, writer.uint32(50).fork()).ldelim();
|
|
96
|
+
}
|
|
97
|
+
if (message.activeInputModifier !== undefined) {
|
|
98
|
+
PBInputModifier.encode(message.activeInputModifier, writer.uint32(58).fork()).ldelim();
|
|
99
|
+
}
|
|
100
|
+
if (message.walkTarget !== undefined) {
|
|
101
|
+
Vector3.encode(message.walkTarget, writer.uint32(66).fork()).ldelim();
|
|
102
|
+
}
|
|
103
|
+
if (message.walkThreshold !== undefined) {
|
|
104
|
+
writer.uint32(77).float(message.walkThreshold);
|
|
105
|
+
}
|
|
106
|
+
if (message.activeAnimationState !== undefined) {
|
|
107
|
+
AvatarAnimationState.encode(message.activeAnimationState, writer.uint32(82).fork()).ldelim();
|
|
108
|
+
}
|
|
109
|
+
return writer;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarMovementInfo {
|
|
113
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
114
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
115
|
+
const message = createBasePBAvatarMovementInfo();
|
|
116
|
+
while (reader.pos < end) {
|
|
117
|
+
const tag = reader.uint32();
|
|
118
|
+
switch (tag >>> 3) {
|
|
119
|
+
case 1:
|
|
120
|
+
if (tag !== 13) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
message.stepTime = reader.float();
|
|
125
|
+
continue;
|
|
126
|
+
case 2:
|
|
127
|
+
if (tag !== 21) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
message.previousStepTime = reader.float();
|
|
132
|
+
continue;
|
|
133
|
+
case 3:
|
|
134
|
+
if (tag !== 26) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message.requestedVelocity = Vector3.decode(reader, reader.uint32());
|
|
139
|
+
continue;
|
|
140
|
+
case 4:
|
|
141
|
+
if (tag !== 34) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message.actualVelocity = Vector3.decode(reader, reader.uint32());
|
|
146
|
+
continue;
|
|
147
|
+
case 5:
|
|
148
|
+
if (tag !== 42) {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
message.externalVelocity = Vector3.decode(reader, reader.uint32());
|
|
153
|
+
continue;
|
|
154
|
+
case 6:
|
|
155
|
+
if (tag !== 50) {
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
message.activeAvatarLocomotionSettings = PBAvatarLocomotionSettings.decode(reader, reader.uint32());
|
|
160
|
+
continue;
|
|
161
|
+
case 7:
|
|
162
|
+
if (tag !== 58) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
message.activeInputModifier = PBInputModifier.decode(reader, reader.uint32());
|
|
167
|
+
continue;
|
|
168
|
+
case 8:
|
|
169
|
+
if (tag !== 66) {
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
message.walkTarget = Vector3.decode(reader, reader.uint32());
|
|
174
|
+
continue;
|
|
175
|
+
case 9:
|
|
176
|
+
if (tag !== 77) {
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
message.walkThreshold = reader.float();
|
|
181
|
+
continue;
|
|
182
|
+
case 10:
|
|
183
|
+
if (tag !== 82) {
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
message.activeAnimationState = AvatarAnimationState.decode(reader, reader.uint32());
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
reader.skipType(tag & 7);
|
|
194
|
+
}
|
|
195
|
+
return message;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export function fromJSON(object: any): PBAvatarMovementInfo {
|
|
199
|
+
return {
|
|
200
|
+
stepTime: isSet(object.stepTime) ? Number(object.stepTime) : 0,
|
|
201
|
+
previousStepTime: isSet(object.previousStepTime) ? Number(object.previousStepTime) : 0,
|
|
202
|
+
requestedVelocity: isSet(object.requestedVelocity) ? Vector3.fromJSON(object.requestedVelocity) : undefined,
|
|
203
|
+
actualVelocity: isSet(object.actualVelocity) ? Vector3.fromJSON(object.actualVelocity) : undefined,
|
|
204
|
+
externalVelocity: isSet(object.externalVelocity) ? Vector3.fromJSON(object.externalVelocity) : undefined,
|
|
205
|
+
activeAvatarLocomotionSettings: isSet(object.activeAvatarLocomotionSettings)
|
|
206
|
+
? PBAvatarLocomotionSettings.fromJSON(object.activeAvatarLocomotionSettings)
|
|
207
|
+
: undefined,
|
|
208
|
+
activeInputModifier: isSet(object.activeInputModifier)
|
|
209
|
+
? PBInputModifier.fromJSON(object.activeInputModifier)
|
|
210
|
+
: undefined,
|
|
211
|
+
walkTarget: isSet(object.walkTarget) ? Vector3.fromJSON(object.walkTarget) : undefined,
|
|
212
|
+
walkThreshold: isSet(object.walkThreshold) ? Number(object.walkThreshold) : undefined,
|
|
213
|
+
activeAnimationState: isSet(object.activeAnimationState)
|
|
214
|
+
? AvatarAnimationState.fromJSON(object.activeAnimationState)
|
|
215
|
+
: undefined,
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function toJSON(message: PBAvatarMovementInfo): unknown {
|
|
220
|
+
const obj: any = {};
|
|
221
|
+
message.stepTime !== undefined && (obj.stepTime = message.stepTime);
|
|
222
|
+
message.previousStepTime !== undefined && (obj.previousStepTime = message.previousStepTime);
|
|
223
|
+
message.requestedVelocity !== undefined &&
|
|
224
|
+
(obj.requestedVelocity = message.requestedVelocity ? Vector3.toJSON(message.requestedVelocity) : undefined);
|
|
225
|
+
message.actualVelocity !== undefined &&
|
|
226
|
+
(obj.actualVelocity = message.actualVelocity ? Vector3.toJSON(message.actualVelocity) : undefined);
|
|
227
|
+
message.externalVelocity !== undefined &&
|
|
228
|
+
(obj.externalVelocity = message.externalVelocity ? Vector3.toJSON(message.externalVelocity) : undefined);
|
|
229
|
+
message.activeAvatarLocomotionSettings !== undefined &&
|
|
230
|
+
(obj.activeAvatarLocomotionSettings = message.activeAvatarLocomotionSettings
|
|
231
|
+
? PBAvatarLocomotionSettings.toJSON(message.activeAvatarLocomotionSettings)
|
|
232
|
+
: undefined);
|
|
233
|
+
message.activeInputModifier !== undefined &&
|
|
234
|
+
(obj.activeInputModifier = message.activeInputModifier
|
|
235
|
+
? PBInputModifier.toJSON(message.activeInputModifier)
|
|
236
|
+
: undefined);
|
|
237
|
+
message.walkTarget !== undefined &&
|
|
238
|
+
(obj.walkTarget = message.walkTarget ? Vector3.toJSON(message.walkTarget) : undefined);
|
|
239
|
+
message.walkThreshold !== undefined && (obj.walkThreshold = message.walkThreshold);
|
|
240
|
+
message.activeAnimationState !== undefined &&
|
|
241
|
+
(obj.activeAnimationState = message.activeAnimationState
|
|
242
|
+
? AvatarAnimationState.toJSON(message.activeAnimationState)
|
|
243
|
+
: undefined);
|
|
244
|
+
return obj;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export function create<I extends Exact<DeepPartial<PBAvatarMovementInfo>, I>>(base?: I): PBAvatarMovementInfo {
|
|
248
|
+
return PBAvatarMovementInfo.fromPartial(base ?? {});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export function fromPartial<I extends Exact<DeepPartial<PBAvatarMovementInfo>, I>>(object: I): PBAvatarMovementInfo {
|
|
252
|
+
const message = createBasePBAvatarMovementInfo();
|
|
253
|
+
message.stepTime = object.stepTime ?? 0;
|
|
254
|
+
message.previousStepTime = object.previousStepTime ?? 0;
|
|
255
|
+
message.requestedVelocity = (object.requestedVelocity !== undefined && object.requestedVelocity !== null)
|
|
256
|
+
? Vector3.fromPartial(object.requestedVelocity)
|
|
257
|
+
: undefined;
|
|
258
|
+
message.actualVelocity = (object.actualVelocity !== undefined && object.actualVelocity !== null)
|
|
259
|
+
? Vector3.fromPartial(object.actualVelocity)
|
|
260
|
+
: undefined;
|
|
261
|
+
message.externalVelocity = (object.externalVelocity !== undefined && object.externalVelocity !== null)
|
|
262
|
+
? Vector3.fromPartial(object.externalVelocity)
|
|
263
|
+
: undefined;
|
|
264
|
+
message.activeAvatarLocomotionSettings =
|
|
265
|
+
(object.activeAvatarLocomotionSettings !== undefined && object.activeAvatarLocomotionSettings !== null)
|
|
266
|
+
? PBAvatarLocomotionSettings.fromPartial(object.activeAvatarLocomotionSettings)
|
|
267
|
+
: undefined;
|
|
268
|
+
message.activeInputModifier = (object.activeInputModifier !== undefined && object.activeInputModifier !== null)
|
|
269
|
+
? PBInputModifier.fromPartial(object.activeInputModifier)
|
|
270
|
+
: undefined;
|
|
271
|
+
message.walkTarget = (object.walkTarget !== undefined && object.walkTarget !== null)
|
|
272
|
+
? Vector3.fromPartial(object.walkTarget)
|
|
273
|
+
: undefined;
|
|
274
|
+
message.walkThreshold = object.walkThreshold ?? undefined;
|
|
275
|
+
message.activeAnimationState = (object.activeAnimationState !== undefined && object.activeAnimationState !== null)
|
|
276
|
+
? AvatarAnimationState.fromPartial(object.activeAnimationState)
|
|
277
|
+
: undefined;
|
|
278
|
+
return message;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function createBaseAvatarAnimationState(): AvatarAnimationState {
|
|
283
|
+
return { src: "", loop: false, speed: 0, idle: false, playbackTime: 0, duration: 0, loopCount: 0 };
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export namespace AvatarAnimationState {
|
|
287
|
+
export function encode(message: AvatarAnimationState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
288
|
+
if (message.src !== "") {
|
|
289
|
+
writer.uint32(10).string(message.src);
|
|
290
|
+
}
|
|
291
|
+
if (message.loop === true) {
|
|
292
|
+
writer.uint32(16).bool(message.loop);
|
|
293
|
+
}
|
|
294
|
+
if (message.speed !== 0) {
|
|
295
|
+
writer.uint32(29).float(message.speed);
|
|
296
|
+
}
|
|
297
|
+
if (message.idle === true) {
|
|
298
|
+
writer.uint32(32).bool(message.idle);
|
|
299
|
+
}
|
|
300
|
+
if (message.playbackTime !== 0) {
|
|
301
|
+
writer.uint32(45).float(message.playbackTime);
|
|
302
|
+
}
|
|
303
|
+
if (message.duration !== 0) {
|
|
304
|
+
writer.uint32(53).float(message.duration);
|
|
305
|
+
}
|
|
306
|
+
if (message.loopCount !== 0) {
|
|
307
|
+
writer.uint32(56).uint32(message.loopCount);
|
|
308
|
+
}
|
|
309
|
+
return writer;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): AvatarAnimationState {
|
|
313
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
314
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
315
|
+
const message = createBaseAvatarAnimationState();
|
|
316
|
+
while (reader.pos < end) {
|
|
317
|
+
const tag = reader.uint32();
|
|
318
|
+
switch (tag >>> 3) {
|
|
319
|
+
case 1:
|
|
320
|
+
if (tag !== 10) {
|
|
321
|
+
break;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
message.src = reader.string();
|
|
325
|
+
continue;
|
|
326
|
+
case 2:
|
|
327
|
+
if (tag !== 16) {
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
message.loop = reader.bool();
|
|
332
|
+
continue;
|
|
333
|
+
case 3:
|
|
334
|
+
if (tag !== 29) {
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
message.speed = reader.float();
|
|
339
|
+
continue;
|
|
340
|
+
case 4:
|
|
341
|
+
if (tag !== 32) {
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
message.idle = reader.bool();
|
|
346
|
+
continue;
|
|
347
|
+
case 5:
|
|
348
|
+
if (tag !== 45) {
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
message.playbackTime = reader.float();
|
|
353
|
+
continue;
|
|
354
|
+
case 6:
|
|
355
|
+
if (tag !== 53) {
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
message.duration = reader.float();
|
|
360
|
+
continue;
|
|
361
|
+
case 7:
|
|
362
|
+
if (tag !== 56) {
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
message.loopCount = reader.uint32();
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
reader.skipType(tag & 7);
|
|
373
|
+
}
|
|
374
|
+
return message;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export function fromJSON(object: any): AvatarAnimationState {
|
|
378
|
+
return {
|
|
379
|
+
src: isSet(object.src) ? String(object.src) : "",
|
|
380
|
+
loop: isSet(object.loop) ? Boolean(object.loop) : false,
|
|
381
|
+
speed: isSet(object.speed) ? Number(object.speed) : 0,
|
|
382
|
+
idle: isSet(object.idle) ? Boolean(object.idle) : false,
|
|
383
|
+
playbackTime: isSet(object.playbackTime) ? Number(object.playbackTime) : 0,
|
|
384
|
+
duration: isSet(object.duration) ? Number(object.duration) : 0,
|
|
385
|
+
loopCount: isSet(object.loopCount) ? Number(object.loopCount) : 0,
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export function toJSON(message: AvatarAnimationState): unknown {
|
|
390
|
+
const obj: any = {};
|
|
391
|
+
message.src !== undefined && (obj.src = message.src);
|
|
392
|
+
message.loop !== undefined && (obj.loop = message.loop);
|
|
393
|
+
message.speed !== undefined && (obj.speed = message.speed);
|
|
394
|
+
message.idle !== undefined && (obj.idle = message.idle);
|
|
395
|
+
message.playbackTime !== undefined && (obj.playbackTime = message.playbackTime);
|
|
396
|
+
message.duration !== undefined && (obj.duration = message.duration);
|
|
397
|
+
message.loopCount !== undefined && (obj.loopCount = Math.round(message.loopCount));
|
|
398
|
+
return obj;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export function create<I extends Exact<DeepPartial<AvatarAnimationState>, I>>(base?: I): AvatarAnimationState {
|
|
402
|
+
return AvatarAnimationState.fromPartial(base ?? {});
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export function fromPartial<I extends Exact<DeepPartial<AvatarAnimationState>, I>>(object: I): AvatarAnimationState {
|
|
406
|
+
const message = createBaseAvatarAnimationState();
|
|
407
|
+
message.src = object.src ?? "";
|
|
408
|
+
message.loop = object.loop ?? false;
|
|
409
|
+
message.speed = object.speed ?? 0;
|
|
410
|
+
message.idle = object.idle ?? false;
|
|
411
|
+
message.playbackTime = object.playbackTime ?? 0;
|
|
412
|
+
message.duration = object.duration ?? 0;
|
|
413
|
+
message.loopCount = object.loopCount ?? 0;
|
|
414
|
+
return message;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
419
|
+
|
|
420
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
421
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
422
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
423
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
424
|
+
: Partial<T>;
|
|
425
|
+
|
|
426
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
427
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
428
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
429
|
+
|
|
430
|
+
function isSet(value: any): boolean {
|
|
431
|
+
return value !== null && value !== undefined;
|
|
432
|
+
}
|
|
@@ -5,40 +5,6 @@ import { Color3 } from "../../common/colors.gen";
|
|
|
5
5
|
|
|
6
6
|
export const protobufPackage = "decentraland.sdk.components";
|
|
7
7
|
|
|
8
|
-
/** Mask for which bones an animation applies to. */
|
|
9
|
-
export enum AvatarEmoteMask {
|
|
10
|
-
AEM_FULL_BODY = 0,
|
|
11
|
-
AEM_UPPER_BODY = 1,
|
|
12
|
-
UNRECOGNIZED = -1,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function avatarEmoteMaskFromJSON(object: any): AvatarEmoteMask {
|
|
16
|
-
switch (object) {
|
|
17
|
-
case 0:
|
|
18
|
-
case "AEM_FULL_BODY":
|
|
19
|
-
return AvatarEmoteMask.AEM_FULL_BODY;
|
|
20
|
-
case 1:
|
|
21
|
-
case "AEM_UPPER_BODY":
|
|
22
|
-
return AvatarEmoteMask.AEM_UPPER_BODY;
|
|
23
|
-
case -1:
|
|
24
|
-
case "UNRECOGNIZED":
|
|
25
|
-
default:
|
|
26
|
-
return AvatarEmoteMask.UNRECOGNIZED;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function avatarEmoteMaskToJSON(object: AvatarEmoteMask): string {
|
|
31
|
-
switch (object) {
|
|
32
|
-
case AvatarEmoteMask.AEM_FULL_BODY:
|
|
33
|
-
return "AEM_FULL_BODY";
|
|
34
|
-
case AvatarEmoteMask.AEM_UPPER_BODY:
|
|
35
|
-
return "AEM_UPPER_BODY";
|
|
36
|
-
case AvatarEmoteMask.UNRECOGNIZED:
|
|
37
|
-
default:
|
|
38
|
-
return "UNRECOGNIZED";
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
8
|
/**
|
|
43
9
|
* The AvatarShape component contains the information required to draw and animate avatar, acting as
|
|
44
10
|
* a simplified GLTF container for this specific case.
|
|
@@ -99,7 +65,11 @@ export interface PBAvatarShape {
|
|
|
99
65
|
/** available emotes (default empty) */
|
|
100
66
|
emotes: string[];
|
|
101
67
|
/** hides the skin + hair + facial features (default: false) */
|
|
102
|
-
showOnlyWearables?:
|
|
68
|
+
showOnlyWearables?:
|
|
69
|
+
| boolean
|
|
70
|
+
| undefined;
|
|
71
|
+
/** slots that will render even if hidden */
|
|
72
|
+
forceRender: string[];
|
|
103
73
|
}
|
|
104
74
|
|
|
105
75
|
function createBasePBAvatarShape(): PBAvatarShape {
|
|
@@ -116,6 +86,7 @@ function createBasePBAvatarShape(): PBAvatarShape {
|
|
|
116
86
|
wearables: [],
|
|
117
87
|
emotes: [],
|
|
118
88
|
showOnlyWearables: undefined,
|
|
89
|
+
forceRender: [],
|
|
119
90
|
};
|
|
120
91
|
}
|
|
121
92
|
|
|
@@ -157,6 +128,9 @@ export namespace PBAvatarShape {
|
|
|
157
128
|
if (message.showOnlyWearables !== undefined) {
|
|
158
129
|
writer.uint32(96).bool(message.showOnlyWearables);
|
|
159
130
|
}
|
|
131
|
+
for (const v of message.forceRender) {
|
|
132
|
+
writer.uint32(106).string(v!);
|
|
133
|
+
}
|
|
160
134
|
return writer;
|
|
161
135
|
}
|
|
162
136
|
|
|
@@ -251,6 +225,13 @@ export namespace PBAvatarShape {
|
|
|
251
225
|
|
|
252
226
|
message.showOnlyWearables = reader.bool();
|
|
253
227
|
continue;
|
|
228
|
+
case 13:
|
|
229
|
+
if (tag !== 106) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
message.forceRender.push(reader.string());
|
|
234
|
+
continue;
|
|
254
235
|
}
|
|
255
236
|
if ((tag & 7) === 4 || tag === 0) {
|
|
256
237
|
break;
|
|
@@ -276,6 +257,7 @@ export namespace PBAvatarShape {
|
|
|
276
257
|
wearables: Array.isArray(object?.wearables) ? object.wearables.map((e: any) => String(e)) : [],
|
|
277
258
|
emotes: Array.isArray(object?.emotes) ? object.emotes.map((e: any) => String(e)) : [],
|
|
278
259
|
showOnlyWearables: isSet(object.showOnlyWearables) ? Boolean(object.showOnlyWearables) : undefined,
|
|
260
|
+
forceRender: Array.isArray(object?.forceRender) ? object.forceRender.map((e: any) => String(e)) : [],
|
|
279
261
|
};
|
|
280
262
|
}
|
|
281
263
|
|
|
@@ -304,6 +286,11 @@ export namespace PBAvatarShape {
|
|
|
304
286
|
obj.emotes = [];
|
|
305
287
|
}
|
|
306
288
|
message.showOnlyWearables !== undefined && (obj.showOnlyWearables = message.showOnlyWearables);
|
|
289
|
+
if (message.forceRender) {
|
|
290
|
+
obj.forceRender = message.forceRender.map((e) => e);
|
|
291
|
+
} else {
|
|
292
|
+
obj.forceRender = [];
|
|
293
|
+
}
|
|
307
294
|
return obj;
|
|
308
295
|
}
|
|
309
296
|
|
|
@@ -331,6 +318,7 @@ export namespace PBAvatarShape {
|
|
|
331
318
|
message.wearables = object.wearables?.map((e) => e) || [];
|
|
332
319
|
message.emotes = object.emotes?.map((e) => e) || [];
|
|
333
320
|
message.showOnlyWearables = object.showOnlyWearables ?? undefined;
|
|
321
|
+
message.forceRender = object.forceRender?.map((e) => e) || [];
|
|
334
322
|
return message;
|
|
335
323
|
}
|
|
336
324
|
}
|