@dcl/protocol 1.0.0-9115457439.commit-926ebd1 → 1.0.0-9127033568.commit-26c5ae7
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/sdk/components/avatar_modifier_area.gen.d.ts +41 -0
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js +241 -3
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.d.ts +35 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js +172 -3
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_text.gen.d.ts +4 -0
- package/out-js/decentraland/sdk/components/ui_text.gen.js +37 -2
- package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_transform.gen.d.ts +2 -0
- package/out-js/decentraland/sdk/components/ui_transform.gen.js +14 -1
- package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
- package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +292 -1
- package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +218 -2
- package/out-ts/decentraland/sdk/components/ui_text.gen.ts +47 -2
- package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +19 -1
- package/package.json +2 -2
- package/proto/decentraland/sdk/components/avatar_modifier_area.proto +21 -0
- package/proto/decentraland/sdk/components/camera_mode_area.proto +22 -3
- package/proto/decentraland/sdk/components/ui_text.proto +2 -0
- package/proto/decentraland/sdk/components/ui_transform.proto +1 -0
|
@@ -7,7 +7,7 @@ export const protobufPackage = "decentraland.sdk.components";
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The CameraModeArea component can be attached to an Entity to define a region of space where
|
|
10
|
-
* the player's camera mode (1st-person
|
|
10
|
+
* the player's camera mode (1st-person, 3rd-person or cinematic) is overridden.
|
|
11
11
|
*
|
|
12
12
|
* The Entity's Transform position determines the center-point of the region, while its size is
|
|
13
13
|
* given as a vector in the `area` property below. The Transform rotation is applied, but the scale
|
|
@@ -17,6 +17,8 @@ export const protobufPackage = "decentraland.sdk.components";
|
|
|
17
17
|
*
|
|
18
18
|
* Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
|
|
19
19
|
* is actually a 3D volume.
|
|
20
|
+
*
|
|
21
|
+
* When mode is set to CtCinematic, the cinematic_settings field must also be provided.
|
|
20
22
|
*/
|
|
21
23
|
export interface PBCameraModeArea {
|
|
22
24
|
/** the 3D size of the region */
|
|
@@ -25,10 +27,47 @@ export interface PBCameraModeArea {
|
|
|
25
27
|
| undefined;
|
|
26
28
|
/** the camera mode to enforce */
|
|
27
29
|
mode: CameraType;
|
|
30
|
+
cinematicSettings?:
|
|
31
|
+
| CinematicSettings
|
|
32
|
+
| undefined;
|
|
33
|
+
/** if true, the player will be considered inside the area when they are within 0.3m of the area. default true */
|
|
34
|
+
useColliderRange?: boolean | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface CinematicSettings {
|
|
38
|
+
/** Entity that defines the cinematic camera transform. */
|
|
39
|
+
cameraEntity: number;
|
|
40
|
+
/**
|
|
41
|
+
* Position -> camera's position
|
|
42
|
+
* Rotation -> camera's direction
|
|
43
|
+
* scale.z -> zoom level
|
|
44
|
+
* scale.x and scale.y -> unused
|
|
45
|
+
*/
|
|
46
|
+
allowManualRotation?:
|
|
47
|
+
| boolean
|
|
48
|
+
| undefined;
|
|
49
|
+
/** how far the camera can rotate around the y-axis / look left/right, in radians. default unrestricted */
|
|
50
|
+
yawRange?:
|
|
51
|
+
| number
|
|
52
|
+
| undefined;
|
|
53
|
+
/** how far the camera can rotate around the x-axis / look up-down, in radians. default unrestricted */
|
|
54
|
+
pitchRange?:
|
|
55
|
+
| number
|
|
56
|
+
| undefined;
|
|
57
|
+
/** note: cameras can never look up/down further than Vec3::Y */
|
|
58
|
+
rollRange?:
|
|
59
|
+
| number
|
|
60
|
+
| undefined;
|
|
61
|
+
/** minimum zoom level. must be greater than 0. defaults to the input zoom level */
|
|
62
|
+
zoomMin?:
|
|
63
|
+
| number
|
|
64
|
+
| undefined;
|
|
65
|
+
/** maximum zoom level. must be greater than 0. defaults to the input zoom level */
|
|
66
|
+
zoomMax?: number | undefined;
|
|
28
67
|
}
|
|
29
68
|
|
|
30
69
|
function createBasePBCameraModeArea(): PBCameraModeArea {
|
|
31
|
-
return { area: undefined, mode: 0 };
|
|
70
|
+
return { area: undefined, mode: 0, cinematicSettings: undefined, useColliderRange: undefined };
|
|
32
71
|
}
|
|
33
72
|
|
|
34
73
|
export namespace PBCameraModeArea {
|
|
@@ -39,6 +78,12 @@ export namespace PBCameraModeArea {
|
|
|
39
78
|
if (message.mode !== 0) {
|
|
40
79
|
writer.uint32(16).int32(message.mode);
|
|
41
80
|
}
|
|
81
|
+
if (message.cinematicSettings !== undefined) {
|
|
82
|
+
CinematicSettings.encode(message.cinematicSettings, writer.uint32(26).fork()).ldelim();
|
|
83
|
+
}
|
|
84
|
+
if (message.useColliderRange !== undefined) {
|
|
85
|
+
writer.uint32(32).bool(message.useColliderRange);
|
|
86
|
+
}
|
|
42
87
|
return writer;
|
|
43
88
|
}
|
|
44
89
|
|
|
@@ -63,6 +108,20 @@ export namespace PBCameraModeArea {
|
|
|
63
108
|
|
|
64
109
|
message.mode = reader.int32() as any;
|
|
65
110
|
continue;
|
|
111
|
+
case 3:
|
|
112
|
+
if (tag !== 26) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message.cinematicSettings = CinematicSettings.decode(reader, reader.uint32());
|
|
117
|
+
continue;
|
|
118
|
+
case 4:
|
|
119
|
+
if (tag !== 32) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message.useColliderRange = reader.bool();
|
|
124
|
+
continue;
|
|
66
125
|
}
|
|
67
126
|
if ((tag & 7) === 4 || tag === 0) {
|
|
68
127
|
break;
|
|
@@ -76,6 +135,10 @@ export namespace PBCameraModeArea {
|
|
|
76
135
|
return {
|
|
77
136
|
area: isSet(object.area) ? Vector3.fromJSON(object.area) : undefined,
|
|
78
137
|
mode: isSet(object.mode) ? cameraTypeFromJSON(object.mode) : 0,
|
|
138
|
+
cinematicSettings: isSet(object.cinematicSettings)
|
|
139
|
+
? CinematicSettings.fromJSON(object.cinematicSettings)
|
|
140
|
+
: undefined,
|
|
141
|
+
useColliderRange: isSet(object.useColliderRange) ? Boolean(object.useColliderRange) : undefined,
|
|
79
142
|
};
|
|
80
143
|
}
|
|
81
144
|
|
|
@@ -83,6 +146,11 @@ export namespace PBCameraModeArea {
|
|
|
83
146
|
const obj: any = {};
|
|
84
147
|
message.area !== undefined && (obj.area = message.area ? Vector3.toJSON(message.area) : undefined);
|
|
85
148
|
message.mode !== undefined && (obj.mode = cameraTypeToJSON(message.mode));
|
|
149
|
+
message.cinematicSettings !== undefined &&
|
|
150
|
+
(obj.cinematicSettings = message.cinematicSettings
|
|
151
|
+
? CinematicSettings.toJSON(message.cinematicSettings)
|
|
152
|
+
: undefined);
|
|
153
|
+
message.useColliderRange !== undefined && (obj.useColliderRange = message.useColliderRange);
|
|
86
154
|
return obj;
|
|
87
155
|
}
|
|
88
156
|
|
|
@@ -94,6 +162,154 @@ export namespace PBCameraModeArea {
|
|
|
94
162
|
const message = createBasePBCameraModeArea();
|
|
95
163
|
message.area = (object.area !== undefined && object.area !== null) ? Vector3.fromPartial(object.area) : undefined;
|
|
96
164
|
message.mode = object.mode ?? 0;
|
|
165
|
+
message.cinematicSettings = (object.cinematicSettings !== undefined && object.cinematicSettings !== null)
|
|
166
|
+
? CinematicSettings.fromPartial(object.cinematicSettings)
|
|
167
|
+
: undefined;
|
|
168
|
+
message.useColliderRange = object.useColliderRange ?? undefined;
|
|
169
|
+
return message;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function createBaseCinematicSettings(): CinematicSettings {
|
|
174
|
+
return {
|
|
175
|
+
cameraEntity: 0,
|
|
176
|
+
allowManualRotation: undefined,
|
|
177
|
+
yawRange: undefined,
|
|
178
|
+
pitchRange: undefined,
|
|
179
|
+
rollRange: undefined,
|
|
180
|
+
zoomMin: undefined,
|
|
181
|
+
zoomMax: undefined,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export namespace CinematicSettings {
|
|
186
|
+
export function encode(message: CinematicSettings, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
187
|
+
if (message.cameraEntity !== 0) {
|
|
188
|
+
writer.uint32(8).uint32(message.cameraEntity);
|
|
189
|
+
}
|
|
190
|
+
if (message.allowManualRotation !== undefined) {
|
|
191
|
+
writer.uint32(16).bool(message.allowManualRotation);
|
|
192
|
+
}
|
|
193
|
+
if (message.yawRange !== undefined) {
|
|
194
|
+
writer.uint32(29).float(message.yawRange);
|
|
195
|
+
}
|
|
196
|
+
if (message.pitchRange !== undefined) {
|
|
197
|
+
writer.uint32(37).float(message.pitchRange);
|
|
198
|
+
}
|
|
199
|
+
if (message.rollRange !== undefined) {
|
|
200
|
+
writer.uint32(45).float(message.rollRange);
|
|
201
|
+
}
|
|
202
|
+
if (message.zoomMin !== undefined) {
|
|
203
|
+
writer.uint32(53).float(message.zoomMin);
|
|
204
|
+
}
|
|
205
|
+
if (message.zoomMax !== undefined) {
|
|
206
|
+
writer.uint32(61).float(message.zoomMax);
|
|
207
|
+
}
|
|
208
|
+
return writer;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): CinematicSettings {
|
|
212
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
213
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
214
|
+
const message = createBaseCinematicSettings();
|
|
215
|
+
while (reader.pos < end) {
|
|
216
|
+
const tag = reader.uint32();
|
|
217
|
+
switch (tag >>> 3) {
|
|
218
|
+
case 1:
|
|
219
|
+
if (tag !== 8) {
|
|
220
|
+
break;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
message.cameraEntity = reader.uint32();
|
|
224
|
+
continue;
|
|
225
|
+
case 2:
|
|
226
|
+
if (tag !== 16) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
message.allowManualRotation = reader.bool();
|
|
231
|
+
continue;
|
|
232
|
+
case 3:
|
|
233
|
+
if (tag !== 29) {
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
message.yawRange = reader.float();
|
|
238
|
+
continue;
|
|
239
|
+
case 4:
|
|
240
|
+
if (tag !== 37) {
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
message.pitchRange = reader.float();
|
|
245
|
+
continue;
|
|
246
|
+
case 5:
|
|
247
|
+
if (tag !== 45) {
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
message.rollRange = reader.float();
|
|
252
|
+
continue;
|
|
253
|
+
case 6:
|
|
254
|
+
if (tag !== 53) {
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
message.zoomMin = reader.float();
|
|
259
|
+
continue;
|
|
260
|
+
case 7:
|
|
261
|
+
if (tag !== 61) {
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
message.zoomMax = reader.float();
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
reader.skipType(tag & 7);
|
|
272
|
+
}
|
|
273
|
+
return message;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export function fromJSON(object: any): CinematicSettings {
|
|
277
|
+
return {
|
|
278
|
+
cameraEntity: isSet(object.cameraEntity) ? Number(object.cameraEntity) : 0,
|
|
279
|
+
allowManualRotation: isSet(object.allowManualRotation) ? Boolean(object.allowManualRotation) : undefined,
|
|
280
|
+
yawRange: isSet(object.yawRange) ? Number(object.yawRange) : undefined,
|
|
281
|
+
pitchRange: isSet(object.pitchRange) ? Number(object.pitchRange) : undefined,
|
|
282
|
+
rollRange: isSet(object.rollRange) ? Number(object.rollRange) : undefined,
|
|
283
|
+
zoomMin: isSet(object.zoomMin) ? Number(object.zoomMin) : undefined,
|
|
284
|
+
zoomMax: isSet(object.zoomMax) ? Number(object.zoomMax) : undefined,
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export function toJSON(message: CinematicSettings): unknown {
|
|
289
|
+
const obj: any = {};
|
|
290
|
+
message.cameraEntity !== undefined && (obj.cameraEntity = Math.round(message.cameraEntity));
|
|
291
|
+
message.allowManualRotation !== undefined && (obj.allowManualRotation = message.allowManualRotation);
|
|
292
|
+
message.yawRange !== undefined && (obj.yawRange = message.yawRange);
|
|
293
|
+
message.pitchRange !== undefined && (obj.pitchRange = message.pitchRange);
|
|
294
|
+
message.rollRange !== undefined && (obj.rollRange = message.rollRange);
|
|
295
|
+
message.zoomMin !== undefined && (obj.zoomMin = message.zoomMin);
|
|
296
|
+
message.zoomMax !== undefined && (obj.zoomMax = message.zoomMax);
|
|
297
|
+
return obj;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export function create<I extends Exact<DeepPartial<CinematicSettings>, I>>(base?: I): CinematicSettings {
|
|
301
|
+
return CinematicSettings.fromPartial(base ?? {});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export function fromPartial<I extends Exact<DeepPartial<CinematicSettings>, I>>(object: I): CinematicSettings {
|
|
305
|
+
const message = createBaseCinematicSettings();
|
|
306
|
+
message.cameraEntity = object.cameraEntity ?? 0;
|
|
307
|
+
message.allowManualRotation = object.allowManualRotation ?? undefined;
|
|
308
|
+
message.yawRange = object.yawRange ?? undefined;
|
|
309
|
+
message.pitchRange = object.pitchRange ?? undefined;
|
|
310
|
+
message.rollRange = object.rollRange ?? undefined;
|
|
311
|
+
message.zoomMin = object.zoomMin ?? undefined;
|
|
312
|
+
message.zoomMax = object.zoomMax ?? undefined;
|
|
97
313
|
return message;
|
|
98
314
|
}
|
|
99
315
|
}
|
|
@@ -28,11 +28,27 @@ export interface PBUiText {
|
|
|
28
28
|
| Font
|
|
29
29
|
| undefined;
|
|
30
30
|
/** size of the text (default: 10) */
|
|
31
|
-
fontSize?:
|
|
31
|
+
fontSize?:
|
|
32
|
+
| number
|
|
33
|
+
| undefined;
|
|
34
|
+
/** width of the outline (default: 0) */
|
|
35
|
+
outlineWidth?:
|
|
36
|
+
| number
|
|
37
|
+
| undefined;
|
|
38
|
+
/** RGBA color of the outline (default: opaque black) */
|
|
39
|
+
outlineColor?: Color4 | undefined;
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
function createBasePBUiText(): PBUiText {
|
|
35
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
value: "",
|
|
45
|
+
color: undefined,
|
|
46
|
+
textAlign: undefined,
|
|
47
|
+
font: undefined,
|
|
48
|
+
fontSize: undefined,
|
|
49
|
+
outlineWidth: undefined,
|
|
50
|
+
outlineColor: undefined,
|
|
51
|
+
};
|
|
36
52
|
}
|
|
37
53
|
|
|
38
54
|
export namespace PBUiText {
|
|
@@ -52,6 +68,12 @@ export namespace PBUiText {
|
|
|
52
68
|
if (message.fontSize !== undefined) {
|
|
53
69
|
writer.uint32(40).int32(message.fontSize);
|
|
54
70
|
}
|
|
71
|
+
if (message.outlineWidth !== undefined) {
|
|
72
|
+
writer.uint32(53).float(message.outlineWidth);
|
|
73
|
+
}
|
|
74
|
+
if (message.outlineColor !== undefined) {
|
|
75
|
+
Color4.encode(message.outlineColor, writer.uint32(58).fork()).ldelim();
|
|
76
|
+
}
|
|
55
77
|
return writer;
|
|
56
78
|
}
|
|
57
79
|
|
|
@@ -97,6 +119,20 @@ export namespace PBUiText {
|
|
|
97
119
|
|
|
98
120
|
message.fontSize = reader.int32();
|
|
99
121
|
continue;
|
|
122
|
+
case 6:
|
|
123
|
+
if (tag !== 53) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message.outlineWidth = reader.float();
|
|
128
|
+
continue;
|
|
129
|
+
case 7:
|
|
130
|
+
if (tag !== 58) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
message.outlineColor = Color4.decode(reader, reader.uint32());
|
|
135
|
+
continue;
|
|
100
136
|
}
|
|
101
137
|
if ((tag & 7) === 4 || tag === 0) {
|
|
102
138
|
break;
|
|
@@ -113,6 +149,8 @@ export namespace PBUiText {
|
|
|
113
149
|
textAlign: isSet(object.textAlign) ? textAlignModeFromJSON(object.textAlign) : undefined,
|
|
114
150
|
font: isSet(object.font) ? fontFromJSON(object.font) : undefined,
|
|
115
151
|
fontSize: isSet(object.fontSize) ? Number(object.fontSize) : undefined,
|
|
152
|
+
outlineWidth: isSet(object.outlineWidth) ? Number(object.outlineWidth) : undefined,
|
|
153
|
+
outlineColor: isSet(object.outlineColor) ? Color4.fromJSON(object.outlineColor) : undefined,
|
|
116
154
|
};
|
|
117
155
|
}
|
|
118
156
|
|
|
@@ -124,6 +162,9 @@ export namespace PBUiText {
|
|
|
124
162
|
(obj.textAlign = message.textAlign !== undefined ? textAlignModeToJSON(message.textAlign) : undefined);
|
|
125
163
|
message.font !== undefined && (obj.font = message.font !== undefined ? fontToJSON(message.font) : undefined);
|
|
126
164
|
message.fontSize !== undefined && (obj.fontSize = Math.round(message.fontSize));
|
|
165
|
+
message.outlineWidth !== undefined && (obj.outlineWidth = message.outlineWidth);
|
|
166
|
+
message.outlineColor !== undefined &&
|
|
167
|
+
(obj.outlineColor = message.outlineColor ? Color4.toJSON(message.outlineColor) : undefined);
|
|
127
168
|
return obj;
|
|
128
169
|
}
|
|
129
170
|
|
|
@@ -140,6 +181,10 @@ export namespace PBUiText {
|
|
|
140
181
|
message.textAlign = object.textAlign ?? undefined;
|
|
141
182
|
message.font = object.font ?? undefined;
|
|
142
183
|
message.fontSize = object.fontSize ?? undefined;
|
|
184
|
+
message.outlineWidth = object.outlineWidth ?? undefined;
|
|
185
|
+
message.outlineColor = (object.outlineColor !== undefined && object.outlineColor !== null)
|
|
186
|
+
? Color4.fromPartial(object.outlineColor)
|
|
187
|
+
: undefined;
|
|
143
188
|
return message;
|
|
144
189
|
}
|
|
145
190
|
}
|
|
@@ -561,7 +561,11 @@ export interface PBUiTransform {
|
|
|
561
561
|
paddingBottomUnit: YGUnit;
|
|
562
562
|
paddingBottom: number;
|
|
563
563
|
/** default: PointerFilterMode.PFM_NONE */
|
|
564
|
-
pointerFilter?:
|
|
564
|
+
pointerFilter?:
|
|
565
|
+
| PointerFilterMode
|
|
566
|
+
| undefined;
|
|
567
|
+
/** default: 1 */
|
|
568
|
+
opacity?: number | undefined;
|
|
565
569
|
}
|
|
566
570
|
|
|
567
571
|
function createBasePBUiTransform(): PBUiTransform {
|
|
@@ -618,6 +622,7 @@ function createBasePBUiTransform(): PBUiTransform {
|
|
|
618
622
|
paddingBottomUnit: 0,
|
|
619
623
|
paddingBottom: 0,
|
|
620
624
|
pointerFilter: undefined,
|
|
625
|
+
opacity: undefined,
|
|
621
626
|
};
|
|
622
627
|
}
|
|
623
628
|
|
|
@@ -779,6 +784,9 @@ export namespace PBUiTransform {
|
|
|
779
784
|
if (message.pointerFilter !== undefined) {
|
|
780
785
|
writer.uint32(416).int32(message.pointerFilter);
|
|
781
786
|
}
|
|
787
|
+
if (message.opacity !== undefined) {
|
|
788
|
+
writer.uint32(429).float(message.opacity);
|
|
789
|
+
}
|
|
782
790
|
return writer;
|
|
783
791
|
}
|
|
784
792
|
|
|
@@ -1153,6 +1161,13 @@ export namespace PBUiTransform {
|
|
|
1153
1161
|
|
|
1154
1162
|
message.pointerFilter = reader.int32() as any;
|
|
1155
1163
|
continue;
|
|
1164
|
+
case 53:
|
|
1165
|
+
if (tag !== 429) {
|
|
1166
|
+
break;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
message.opacity = reader.float();
|
|
1170
|
+
continue;
|
|
1156
1171
|
}
|
|
1157
1172
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1158
1173
|
break;
|
|
@@ -1216,6 +1231,7 @@ export namespace PBUiTransform {
|
|
|
1216
1231
|
paddingBottomUnit: isSet(object.paddingBottomUnit) ? yGUnitFromJSON(object.paddingBottomUnit) : 0,
|
|
1217
1232
|
paddingBottom: isSet(object.paddingBottom) ? Number(object.paddingBottom) : 0,
|
|
1218
1233
|
pointerFilter: isSet(object.pointerFilter) ? pointerFilterModeFromJSON(object.pointerFilter) : undefined,
|
|
1234
|
+
opacity: isSet(object.opacity) ? Number(object.opacity) : undefined,
|
|
1219
1235
|
};
|
|
1220
1236
|
}
|
|
1221
1237
|
|
|
@@ -1279,6 +1295,7 @@ export namespace PBUiTransform {
|
|
|
1279
1295
|
(obj.pointerFilter = message.pointerFilter !== undefined
|
|
1280
1296
|
? pointerFilterModeToJSON(message.pointerFilter)
|
|
1281
1297
|
: undefined);
|
|
1298
|
+
message.opacity !== undefined && (obj.opacity = message.opacity);
|
|
1282
1299
|
return obj;
|
|
1283
1300
|
}
|
|
1284
1301
|
|
|
@@ -1340,6 +1357,7 @@ export namespace PBUiTransform {
|
|
|
1340
1357
|
message.paddingBottomUnit = object.paddingBottomUnit ?? 0;
|
|
1341
1358
|
message.paddingBottom = object.paddingBottom ?? 0;
|
|
1342
1359
|
message.pointerFilter = object.pointerFilter ?? undefined;
|
|
1360
|
+
message.opacity = object.opacity ?? undefined;
|
|
1343
1361
|
return message;
|
|
1344
1362
|
}
|
|
1345
1363
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-9127033568.commit-26c5ae7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "decentraland/protocol.git",
|
|
6
6
|
"homepage": "https://github.com/decentraland/protocol#readme",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"out-js",
|
|
30
30
|
"public"
|
|
31
31
|
],
|
|
32
|
-
"commit": "
|
|
32
|
+
"commit": "26c5ae7313298e0623b2474d9625a359493728c1"
|
|
33
33
|
}
|
|
@@ -23,6 +23,8 @@ message PBAvatarModifierArea {
|
|
|
23
23
|
decentraland.common.Vector3 area = 1; // the 3D size of the region
|
|
24
24
|
repeated string exclude_ids = 2; // user IDs that can enter and remain unaffected
|
|
25
25
|
repeated AvatarModifierType modifiers = 3; // list of modifiers to apply
|
|
26
|
+
optional AvatarMovementSettings movement_settings = 4;
|
|
27
|
+
optional bool use_collider_range = 5; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
// AvatarModifierType is an effect that should be applied to avatars inside the region.
|
|
@@ -30,3 +32,22 @@ enum AvatarModifierType {
|
|
|
30
32
|
AMT_HIDE_AVATARS = 0; // avatars are invisible
|
|
31
33
|
AMT_DISABLE_PASSPORTS = 1; // selecting (e.g. clicking) an avatar will not bring up their profile.
|
|
32
34
|
}
|
|
35
|
+
|
|
36
|
+
message AvatarMovementSettings {
|
|
37
|
+
optional AvatarControlType control_mode = 1;
|
|
38
|
+
// if not explicitly set, the following properties default to user's preference settings
|
|
39
|
+
optional float run_speed = 2; // speed the player moves at, in m/s
|
|
40
|
+
optional float friction = 3; // how fast the player gets up to speed or comes to rest. higher = more responsive
|
|
41
|
+
optional float gravity = 4; // how fast the player accelerates vertically when not on a solid surface, in m/s. should normally be negative
|
|
42
|
+
optional float jump_height = 5; // how high the player can jump, in meters. should normally be positive. gravity must have the same sign for jumping to be possible
|
|
43
|
+
optional float max_fall_speed = 6; // max fall speed in m/s. should normally be negative
|
|
44
|
+
optional float turn_speed = 7; // speed the player turns in tank mode, in radians/s
|
|
45
|
+
optional float walk_speed = 8; // speed the player walks at, in m/s
|
|
46
|
+
optional bool allow_weighted_movement = 9; // whether to allow player to move at a slower speed (e.g. with a walk-key or when using a gamepad/joystick). defaults to true
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
enum AvatarControlType {
|
|
50
|
+
CCT_NONE = 0; // avatar cannot move
|
|
51
|
+
CCT_RELATIVE = 1; // avatar moves relative to the camera origin
|
|
52
|
+
CCT_TANK = 2; // avatar moves like a tank: left/right rotate the player, forward/backward advance/retreat the player
|
|
53
|
+
}
|
|
@@ -9,7 +9,7 @@ import "decentraland/sdk/components/common/id.proto";
|
|
|
9
9
|
option (common.ecs_component_id) = 1071;
|
|
10
10
|
|
|
11
11
|
// The CameraModeArea component can be attached to an Entity to define a region of space where
|
|
12
|
-
// the player's camera mode (1st-person
|
|
12
|
+
// the player's camera mode (1st-person, 3rd-person or cinematic) is overridden.
|
|
13
13
|
//
|
|
14
14
|
// The Entity's Transform position determines the center-point of the region, while its size is
|
|
15
15
|
// given as a vector in the `area` property below. The Transform rotation is applied, but the scale
|
|
@@ -19,7 +19,26 @@ option (common.ecs_component_id) = 1071;
|
|
|
19
19
|
//
|
|
20
20
|
// Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
|
|
21
21
|
// is actually a 3D volume.
|
|
22
|
+
//
|
|
23
|
+
// When mode is set to CtCinematic, the cinematic_settings field must also be provided.
|
|
22
24
|
message PBCameraModeArea {
|
|
23
|
-
decentraland.common.Vector3 area = 1;
|
|
24
|
-
common.CameraType mode = 2;
|
|
25
|
+
decentraland.common.Vector3 area = 1; // the 3D size of the region
|
|
26
|
+
common.CameraType mode = 2; // the camera mode to enforce
|
|
27
|
+
optional CinematicSettings cinematic_settings = 3;
|
|
28
|
+
optional bool use_collider_range = 4; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CinematicSettings {
|
|
32
|
+
uint32 camera_entity = 1; // Entity that defines the cinematic camera transform.
|
|
33
|
+
// Position -> camera's position
|
|
34
|
+
// Rotation -> camera's direction
|
|
35
|
+
// scale.z -> zoom level
|
|
36
|
+
// scale.x and scale.y -> unused
|
|
37
|
+
optional bool allow_manual_rotation = 2; // whether the user can move the camera's rotation. default false
|
|
38
|
+
optional float yaw_range = 3; // how far the camera can rotate around the y-axis / look left/right, in radians. default unrestricted
|
|
39
|
+
optional float pitch_range = 4; // how far the camera can rotate around the x-axis / look up-down, in radians. default unrestricted
|
|
40
|
+
// note: cameras can never look up/down further than Vec3::Y
|
|
41
|
+
optional float roll_range = 5; // how far the camera can rotate around the z-axis / tilt, in radians. default unrestricted
|
|
42
|
+
optional float zoom_min = 6; // minimum zoom level. must be greater than 0. defaults to the input zoom level
|
|
43
|
+
optional float zoom_max = 7; // maximum zoom level. must be greater than 0. defaults to the input zoom level
|
|
25
44
|
}
|
|
@@ -17,4 +17,6 @@ message PBUiText {
|
|
|
17
17
|
optional common.TextAlignMode text_align = 3; // alignment within the bounds (default: center)
|
|
18
18
|
optional common.Font font = 4; // font for the text (default: sans-serif)
|
|
19
19
|
optional int32 font_size = 5; // size of the text (default: 10)
|
|
20
|
+
optional float outline_width = 6; // width of the outline (default: 0)
|
|
21
|
+
optional decentraland.common.Color4 outline_color = 7; // RGBA color of the outline (default: opaque black)
|
|
20
22
|
}
|