@dcl/protocol 1.0.0-21671196520.commit-ca94ea2 → 1.0.0-22309437617.commit-6617cff
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 +70 -0
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +228 -1
- package/out-js/decentraland/kernel/apis/restricted_actions.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_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/avatar_movement.gen.d.ts +34 -0
- package/out-js/decentraland/sdk/components/avatar_movement.gen.js +101 -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 +40 -0
- package/out-js/decentraland/sdk/components/avatar_movement_info.gen.js +135 -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 -0
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js +19 -1
- package/out-js/decentraland/sdk/components/avatar_shape.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/common/input_action.gen.d.ts +4 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js +24 -0
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- 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/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/ui_text.gen.d.ts +4 -0
- package/out-js/decentraland/sdk/components/ui_text.gen.js +30 -1
- package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
- 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 +242 -0
- package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +20 -1
- package/out-ts/decentraland/sdk/components/avatar_modifier_area.gen.ts +292 -1
- package/out-ts/decentraland/sdk/components/avatar_movement.gen.ts +119 -0
- package/out-ts/decentraland/sdk/components/avatar_movement_info.gen.ts +163 -0
- package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +23 -1
- package/out-ts/decentraland/sdk/components/camera_mode_area.gen.ts +218 -2
- package/out-ts/decentraland/sdk/components/common/input_action.gen.ts +24 -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/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/ui_text.gen.ts +40 -1
- package/out-ts/decentraland/sdk/components/ui_transform.gen.ts +193 -0
- package/package.json +6 -3
- package/proto/decentraland/common/texture.proto +8 -1
- package/proto/decentraland/kernel/apis/restricted_actions.proto +22 -0
- package/proto/decentraland/sdk/components/avatar_equipped_data.proto +2 -1
- package/proto/decentraland/sdk/components/avatar_locomotion_settings.proto +18 -0
- package/proto/decentraland/sdk/components/avatar_modifier_area.proto +21 -0
- package/proto/decentraland/sdk/components/avatar_movement.proto +45 -0
- package/proto/decentraland/sdk/components/avatar_movement_info.proto +16 -0
- package/proto/decentraland/sdk/components/avatar_shape.proto +1 -0
- 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 +22 -3
- package/proto/decentraland/sdk/components/common/input_action.proto +4 -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/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_scroll_result.proto +12 -0
- package/proto/decentraland/sdk/components/ui_text.proto +3 -0
- package/proto/decentraland/sdk/components/ui_transform.proto +20 -0
- package/public/sdk-components.proto +4 -0
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
export interface PBAvatarMovement {
|
|
8
|
+
velocity:
|
|
9
|
+
| Vector3
|
|
10
|
+
| undefined;
|
|
11
|
+
/** 0-360, we don't allow pitch/roll */
|
|
12
|
+
orientation: number;
|
|
13
|
+
groundDirection?: Vector3 | undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createBasePBAvatarMovement(): PBAvatarMovement {
|
|
17
|
+
return { velocity: undefined, orientation: 0, groundDirection: undefined };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export namespace PBAvatarMovement {
|
|
21
|
+
export function encode(message: PBAvatarMovement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
22
|
+
if (message.velocity !== undefined) {
|
|
23
|
+
Vector3.encode(message.velocity, writer.uint32(10).fork()).ldelim();
|
|
24
|
+
}
|
|
25
|
+
if (message.orientation !== 0) {
|
|
26
|
+
writer.uint32(21).float(message.orientation);
|
|
27
|
+
}
|
|
28
|
+
if (message.groundDirection !== undefined) {
|
|
29
|
+
Vector3.encode(message.groundDirection, writer.uint32(26).fork()).ldelim();
|
|
30
|
+
}
|
|
31
|
+
return writer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarMovement {
|
|
35
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
36
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
37
|
+
const message = createBasePBAvatarMovement();
|
|
38
|
+
while (reader.pos < end) {
|
|
39
|
+
const tag = reader.uint32();
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1:
|
|
42
|
+
if (tag !== 10) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message.velocity = Vector3.decode(reader, reader.uint32());
|
|
47
|
+
continue;
|
|
48
|
+
case 2:
|
|
49
|
+
if (tag !== 21) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message.orientation = reader.float();
|
|
54
|
+
continue;
|
|
55
|
+
case 3:
|
|
56
|
+
if (tag !== 26) {
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
message.groundDirection = Vector3.decode(reader, reader.uint32());
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
reader.skipType(tag & 7);
|
|
67
|
+
}
|
|
68
|
+
return message;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function fromJSON(object: any): PBAvatarMovement {
|
|
72
|
+
return {
|
|
73
|
+
velocity: isSet(object.velocity) ? Vector3.fromJSON(object.velocity) : undefined,
|
|
74
|
+
orientation: isSet(object.orientation) ? Number(object.orientation) : 0,
|
|
75
|
+
groundDirection: isSet(object.groundDirection) ? Vector3.fromJSON(object.groundDirection) : undefined,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function toJSON(message: PBAvatarMovement): unknown {
|
|
80
|
+
const obj: any = {};
|
|
81
|
+
message.velocity !== undefined && (obj.velocity = message.velocity ? Vector3.toJSON(message.velocity) : undefined);
|
|
82
|
+
message.orientation !== undefined && (obj.orientation = message.orientation);
|
|
83
|
+
message.groundDirection !== undefined &&
|
|
84
|
+
(obj.groundDirection = message.groundDirection ? Vector3.toJSON(message.groundDirection) : undefined);
|
|
85
|
+
return obj;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function create<I extends Exact<DeepPartial<PBAvatarMovement>, I>>(base?: I): PBAvatarMovement {
|
|
89
|
+
return PBAvatarMovement.fromPartial(base ?? {});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function fromPartial<I extends Exact<DeepPartial<PBAvatarMovement>, I>>(object: I): PBAvatarMovement {
|
|
93
|
+
const message = createBasePBAvatarMovement();
|
|
94
|
+
message.velocity = (object.velocity !== undefined && object.velocity !== null)
|
|
95
|
+
? Vector3.fromPartial(object.velocity)
|
|
96
|
+
: undefined;
|
|
97
|
+
message.orientation = object.orientation ?? 0;
|
|
98
|
+
message.groundDirection = (object.groundDirection !== undefined && object.groundDirection !== null)
|
|
99
|
+
? Vector3.fromPartial(object.groundDirection)
|
|
100
|
+
: undefined;
|
|
101
|
+
return message;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
106
|
+
|
|
107
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
108
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
109
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
110
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
111
|
+
: Partial<T>;
|
|
112
|
+
|
|
113
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
114
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
115
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
116
|
+
|
|
117
|
+
function isSet(value: any): boolean {
|
|
118
|
+
return value !== null && value !== undefined;
|
|
119
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
export interface PBAvatarMovementInfo {
|
|
8
|
+
/** the length of time the current step velocity will apply for */
|
|
9
|
+
stepTime: number;
|
|
10
|
+
/** the length of time the previous step velocity applied for */
|
|
11
|
+
previousStepTime: number;
|
|
12
|
+
/** the velocity requested for the previous frame */
|
|
13
|
+
requestedVelocity:
|
|
14
|
+
| Vector3
|
|
15
|
+
| undefined;
|
|
16
|
+
/** the resulting velocity taking collisions into account */
|
|
17
|
+
actualVelocity:
|
|
18
|
+
| Vector3
|
|
19
|
+
| undefined;
|
|
20
|
+
/** the velocity imparted by movement of the "ground" platform or pushing from other moving colliders */
|
|
21
|
+
externalVelocity: Vector3 | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function createBasePBAvatarMovementInfo(): PBAvatarMovementInfo {
|
|
25
|
+
return {
|
|
26
|
+
stepTime: 0,
|
|
27
|
+
previousStepTime: 0,
|
|
28
|
+
requestedVelocity: undefined,
|
|
29
|
+
actualVelocity: undefined,
|
|
30
|
+
externalVelocity: undefined,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export namespace PBAvatarMovementInfo {
|
|
35
|
+
export function encode(message: PBAvatarMovementInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
36
|
+
if (message.stepTime !== 0) {
|
|
37
|
+
writer.uint32(13).float(message.stepTime);
|
|
38
|
+
}
|
|
39
|
+
if (message.previousStepTime !== 0) {
|
|
40
|
+
writer.uint32(21).float(message.previousStepTime);
|
|
41
|
+
}
|
|
42
|
+
if (message.requestedVelocity !== undefined) {
|
|
43
|
+
Vector3.encode(message.requestedVelocity, writer.uint32(26).fork()).ldelim();
|
|
44
|
+
}
|
|
45
|
+
if (message.actualVelocity !== undefined) {
|
|
46
|
+
Vector3.encode(message.actualVelocity, writer.uint32(34).fork()).ldelim();
|
|
47
|
+
}
|
|
48
|
+
if (message.externalVelocity !== undefined) {
|
|
49
|
+
Vector3.encode(message.externalVelocity, writer.uint32(42).fork()).ldelim();
|
|
50
|
+
}
|
|
51
|
+
return writer;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarMovementInfo {
|
|
55
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
56
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
57
|
+
const message = createBasePBAvatarMovementInfo();
|
|
58
|
+
while (reader.pos < end) {
|
|
59
|
+
const tag = reader.uint32();
|
|
60
|
+
switch (tag >>> 3) {
|
|
61
|
+
case 1:
|
|
62
|
+
if (tag !== 13) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message.stepTime = reader.float();
|
|
67
|
+
continue;
|
|
68
|
+
case 2:
|
|
69
|
+
if (tag !== 21) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message.previousStepTime = reader.float();
|
|
74
|
+
continue;
|
|
75
|
+
case 3:
|
|
76
|
+
if (tag !== 26) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message.requestedVelocity = Vector3.decode(reader, reader.uint32());
|
|
81
|
+
continue;
|
|
82
|
+
case 4:
|
|
83
|
+
if (tag !== 34) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message.actualVelocity = Vector3.decode(reader, reader.uint32());
|
|
88
|
+
continue;
|
|
89
|
+
case 5:
|
|
90
|
+
if (tag !== 42) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message.externalVelocity = Vector3.decode(reader, reader.uint32());
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
reader.skipType(tag & 7);
|
|
101
|
+
}
|
|
102
|
+
return message;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function fromJSON(object: any): PBAvatarMovementInfo {
|
|
106
|
+
return {
|
|
107
|
+
stepTime: isSet(object.stepTime) ? Number(object.stepTime) : 0,
|
|
108
|
+
previousStepTime: isSet(object.previousStepTime) ? Number(object.previousStepTime) : 0,
|
|
109
|
+
requestedVelocity: isSet(object.requestedVelocity) ? Vector3.fromJSON(object.requestedVelocity) : undefined,
|
|
110
|
+
actualVelocity: isSet(object.actualVelocity) ? Vector3.fromJSON(object.actualVelocity) : undefined,
|
|
111
|
+
externalVelocity: isSet(object.externalVelocity) ? Vector3.fromJSON(object.externalVelocity) : undefined,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function toJSON(message: PBAvatarMovementInfo): unknown {
|
|
116
|
+
const obj: any = {};
|
|
117
|
+
message.stepTime !== undefined && (obj.stepTime = message.stepTime);
|
|
118
|
+
message.previousStepTime !== undefined && (obj.previousStepTime = message.previousStepTime);
|
|
119
|
+
message.requestedVelocity !== undefined &&
|
|
120
|
+
(obj.requestedVelocity = message.requestedVelocity ? Vector3.toJSON(message.requestedVelocity) : undefined);
|
|
121
|
+
message.actualVelocity !== undefined &&
|
|
122
|
+
(obj.actualVelocity = message.actualVelocity ? Vector3.toJSON(message.actualVelocity) : undefined);
|
|
123
|
+
message.externalVelocity !== undefined &&
|
|
124
|
+
(obj.externalVelocity = message.externalVelocity ? Vector3.toJSON(message.externalVelocity) : undefined);
|
|
125
|
+
return obj;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function create<I extends Exact<DeepPartial<PBAvatarMovementInfo>, I>>(base?: I): PBAvatarMovementInfo {
|
|
129
|
+
return PBAvatarMovementInfo.fromPartial(base ?? {});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function fromPartial<I extends Exact<DeepPartial<PBAvatarMovementInfo>, I>>(object: I): PBAvatarMovementInfo {
|
|
133
|
+
const message = createBasePBAvatarMovementInfo();
|
|
134
|
+
message.stepTime = object.stepTime ?? 0;
|
|
135
|
+
message.previousStepTime = object.previousStepTime ?? 0;
|
|
136
|
+
message.requestedVelocity = (object.requestedVelocity !== undefined && object.requestedVelocity !== null)
|
|
137
|
+
? Vector3.fromPartial(object.requestedVelocity)
|
|
138
|
+
: undefined;
|
|
139
|
+
message.actualVelocity = (object.actualVelocity !== undefined && object.actualVelocity !== null)
|
|
140
|
+
? Vector3.fromPartial(object.actualVelocity)
|
|
141
|
+
: undefined;
|
|
142
|
+
message.externalVelocity = (object.externalVelocity !== undefined && object.externalVelocity !== null)
|
|
143
|
+
? Vector3.fromPartial(object.externalVelocity)
|
|
144
|
+
: undefined;
|
|
145
|
+
return message;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
150
|
+
|
|
151
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
152
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
153
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
154
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
155
|
+
: Partial<T>;
|
|
156
|
+
|
|
157
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
158
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
159
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
160
|
+
|
|
161
|
+
function isSet(value: any): boolean {
|
|
162
|
+
return value !== null && value !== undefined;
|
|
163
|
+
}
|
|
@@ -65,7 +65,11 @@ export interface PBAvatarShape {
|
|
|
65
65
|
/** available emotes (default empty) */
|
|
66
66
|
emotes: string[];
|
|
67
67
|
/** hides the skin + hair + facial features (default: false) */
|
|
68
|
-
showOnlyWearables?:
|
|
68
|
+
showOnlyWearables?:
|
|
69
|
+
| boolean
|
|
70
|
+
| undefined;
|
|
71
|
+
/** slots that will render even if hidden */
|
|
72
|
+
forceRender: string[];
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
function createBasePBAvatarShape(): PBAvatarShape {
|
|
@@ -82,6 +86,7 @@ function createBasePBAvatarShape(): PBAvatarShape {
|
|
|
82
86
|
wearables: [],
|
|
83
87
|
emotes: [],
|
|
84
88
|
showOnlyWearables: undefined,
|
|
89
|
+
forceRender: [],
|
|
85
90
|
};
|
|
86
91
|
}
|
|
87
92
|
|
|
@@ -123,6 +128,9 @@ export namespace PBAvatarShape {
|
|
|
123
128
|
if (message.showOnlyWearables !== undefined) {
|
|
124
129
|
writer.uint32(96).bool(message.showOnlyWearables);
|
|
125
130
|
}
|
|
131
|
+
for (const v of message.forceRender) {
|
|
132
|
+
writer.uint32(106).string(v!);
|
|
133
|
+
}
|
|
126
134
|
return writer;
|
|
127
135
|
}
|
|
128
136
|
|
|
@@ -217,6 +225,13 @@ export namespace PBAvatarShape {
|
|
|
217
225
|
|
|
218
226
|
message.showOnlyWearables = reader.bool();
|
|
219
227
|
continue;
|
|
228
|
+
case 13:
|
|
229
|
+
if (tag !== 106) {
|
|
230
|
+
break;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
message.forceRender.push(reader.string());
|
|
234
|
+
continue;
|
|
220
235
|
}
|
|
221
236
|
if ((tag & 7) === 4 || tag === 0) {
|
|
222
237
|
break;
|
|
@@ -242,6 +257,7 @@ export namespace PBAvatarShape {
|
|
|
242
257
|
wearables: Array.isArray(object?.wearables) ? object.wearables.map((e: any) => String(e)) : [],
|
|
243
258
|
emotes: Array.isArray(object?.emotes) ? object.emotes.map((e: any) => String(e)) : [],
|
|
244
259
|
showOnlyWearables: isSet(object.showOnlyWearables) ? Boolean(object.showOnlyWearables) : undefined,
|
|
260
|
+
forceRender: Array.isArray(object?.forceRender) ? object.forceRender.map((e: any) => String(e)) : [],
|
|
245
261
|
};
|
|
246
262
|
}
|
|
247
263
|
|
|
@@ -270,6 +286,11 @@ export namespace PBAvatarShape {
|
|
|
270
286
|
obj.emotes = [];
|
|
271
287
|
}
|
|
272
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
|
+
}
|
|
273
294
|
return obj;
|
|
274
295
|
}
|
|
275
296
|
|
|
@@ -297,6 +318,7 @@ export namespace PBAvatarShape {
|
|
|
297
318
|
message.wearables = object.wearables?.map((e) => e) || [];
|
|
298
319
|
message.emotes = object.emotes?.map((e) => e) || [];
|
|
299
320
|
message.showOnlyWearables = object.showOnlyWearables ?? undefined;
|
|
321
|
+
message.forceRender = object.forceRender?.map((e) => e) || [];
|
|
300
322
|
return message;
|
|
301
323
|
}
|
|
302
324
|
}
|
|
@@ -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
|
}
|
|
@@ -17,6 +17,7 @@ export enum InputAction {
|
|
|
17
17
|
IA_ACTION_4 = 11,
|
|
18
18
|
IA_ACTION_5 = 12,
|
|
19
19
|
IA_ACTION_6 = 13,
|
|
20
|
+
IA_MODIFIER = 14,
|
|
20
21
|
UNRECOGNIZED = -1,
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -64,6 +65,9 @@ export function inputActionFromJSON(object: any): InputAction {
|
|
|
64
65
|
case 13:
|
|
65
66
|
case "IA_ACTION_6":
|
|
66
67
|
return InputAction.IA_ACTION_6;
|
|
68
|
+
case 14:
|
|
69
|
+
case "IA_MODIFIER":
|
|
70
|
+
return InputAction.IA_MODIFIER;
|
|
67
71
|
case -1:
|
|
68
72
|
case "UNRECOGNIZED":
|
|
69
73
|
default:
|
|
@@ -101,6 +105,8 @@ export function inputActionToJSON(object: InputAction): string {
|
|
|
101
105
|
return "IA_ACTION_5";
|
|
102
106
|
case InputAction.IA_ACTION_6:
|
|
103
107
|
return "IA_ACTION_6";
|
|
108
|
+
case InputAction.IA_MODIFIER:
|
|
109
|
+
return "IA_MODIFIER";
|
|
104
110
|
case InputAction.UNRECOGNIZED:
|
|
105
111
|
default:
|
|
106
112
|
return "UNRECOGNIZED";
|
|
@@ -113,6 +119,9 @@ export enum PointerEventType {
|
|
|
113
119
|
PET_DOWN = 1,
|
|
114
120
|
PET_HOVER_ENTER = 2,
|
|
115
121
|
PET_HOVER_LEAVE = 3,
|
|
122
|
+
PET_DRAG_LOCKED = 4,
|
|
123
|
+
PET_DRAG = 5,
|
|
124
|
+
PET_DRAG_END = 6,
|
|
116
125
|
UNRECOGNIZED = -1,
|
|
117
126
|
}
|
|
118
127
|
|
|
@@ -130,6 +139,15 @@ export function pointerEventTypeFromJSON(object: any): PointerEventType {
|
|
|
130
139
|
case 3:
|
|
131
140
|
case "PET_HOVER_LEAVE":
|
|
132
141
|
return PointerEventType.PET_HOVER_LEAVE;
|
|
142
|
+
case 4:
|
|
143
|
+
case "PET_DRAG_LOCKED":
|
|
144
|
+
return PointerEventType.PET_DRAG_LOCKED;
|
|
145
|
+
case 5:
|
|
146
|
+
case "PET_DRAG":
|
|
147
|
+
return PointerEventType.PET_DRAG;
|
|
148
|
+
case 6:
|
|
149
|
+
case "PET_DRAG_END":
|
|
150
|
+
return PointerEventType.PET_DRAG_END;
|
|
133
151
|
case -1:
|
|
134
152
|
case "UNRECOGNIZED":
|
|
135
153
|
default:
|
|
@@ -147,6 +165,12 @@ export function pointerEventTypeToJSON(object: PointerEventType): string {
|
|
|
147
165
|
return "PET_HOVER_ENTER";
|
|
148
166
|
case PointerEventType.PET_HOVER_LEAVE:
|
|
149
167
|
return "PET_HOVER_LEAVE";
|
|
168
|
+
case PointerEventType.PET_DRAG_LOCKED:
|
|
169
|
+
return "PET_DRAG_LOCKED";
|
|
170
|
+
case PointerEventType.PET_DRAG:
|
|
171
|
+
return "PET_DRAG";
|
|
172
|
+
case PointerEventType.PET_DRAG_END:
|
|
173
|
+
return "PET_DRAG_END";
|
|
150
174
|
case PointerEventType.UNRECOGNIZED:
|
|
151
175
|
default:
|
|
152
176
|
return "UNRECOGNIZED";
|