@dcl/protocol 1.0.0-33414396137.commit-4ed8d74 → 1.0.0-33421599964.commit-0e82dcd
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/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_shape.gen.d.ts +0 -8
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js +1 -35
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/pointer_events.gen.d.ts +16 -11
- package/out-js/decentraland/sdk/components/pointer_events.gen.js +14 -1
- package/out-js/decentraland/sdk/components/pointer_events.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/comms/rfc4/comms.gen.ts +2 -166
- package/out-ts/decentraland/sdk/components/avatar_shape.gen.ts +0 -34
- package/out-ts/decentraland/sdk/components/pointer_events.gen.ts +33 -12
- package/package.json +3 -3
- package/proto/decentraland/kernel/comms/rfc4/comms.proto +0 -11
- package/proto/decentraland/pulse/pulse_client.proto +27 -8
- package/proto/decentraland/sdk/components/avatar_shape.proto +0 -5
- package/proto/decentraland/sdk/components/light_source.proto +1 -1
- package/proto/decentraland/sdk/components/pointer_events.proto +15 -11
|
@@ -33,24 +33,27 @@ export const protobufPackage = "decentraland.sdk.components";
|
|
|
33
33
|
* --------------
|
|
34
34
|
* PointerEvents can enforce interaction range using two independent distance checks:
|
|
35
35
|
*
|
|
36
|
-
* -
|
|
37
|
-
* -
|
|
36
|
+
* - Player distance (`max_distance`): distance from the avatar/player position to the target entity.
|
|
37
|
+
* - Camera distance (`max_camera_distance`): distance from the active camera to the target entity.
|
|
38
|
+
*
|
|
39
|
+
* `max_player_distance` is deprecated: it is an alias for `max_distance` (both are player distance).
|
|
40
|
+
* If both are present, the larger of the two is used as the player distance threshold.
|
|
38
41
|
*
|
|
39
42
|
* How the interaction checks are combined:
|
|
40
43
|
*
|
|
41
44
|
* 1) Only `max_distance` is present
|
|
42
|
-
* - The interaction is allowed only if the
|
|
45
|
+
* - The interaction is allowed only if the player distance is <= `max_distance`.
|
|
43
46
|
*
|
|
44
|
-
* 2) Only `
|
|
45
|
-
* - The interaction is allowed only if the
|
|
47
|
+
* 2) Only `max_camera_distance` is present
|
|
48
|
+
* - The interaction is allowed only if the camera distance is <= `max_camera_distance`.
|
|
46
49
|
*
|
|
47
|
-
* 3) Both `max_distance` and `
|
|
50
|
+
* 3) Both `max_distance` and `max_camera_distance` are present
|
|
48
51
|
* - The interaction is allowed if ANY of the checks passes (OR logic):
|
|
49
|
-
* (
|
|
52
|
+
* (player distance <= `max_distance`) OR (camera distance <= `max_camera_distance`).
|
|
50
53
|
*
|
|
51
|
-
* 4) Neither `max_distance` nor `
|
|
54
|
+
* 4) Neither `max_distance` nor `max_camera_distance` is present
|
|
52
55
|
* - The system behaves as if `max_distance` were set to its default value (10),
|
|
53
|
-
* i.e., it uses the
|
|
56
|
+
* i.e., it uses the player distance check with a threshold of 10.
|
|
54
57
|
*/
|
|
55
58
|
export interface PBPointerEvents {
|
|
56
59
|
/** the list of relevant events to detect */
|
|
@@ -66,7 +69,7 @@ export interface PBPointerEvents_Info {
|
|
|
66
69
|
hoverText?:
|
|
67
70
|
| string
|
|
68
71
|
| undefined;
|
|
69
|
-
/** range of interaction (default 10) */
|
|
72
|
+
/** range of interaction from the avatar's position (default 10) */
|
|
70
73
|
maxDistance?:
|
|
71
74
|
| number
|
|
72
75
|
| undefined;
|
|
@@ -78,12 +81,16 @@ export interface PBPointerEvents_Info {
|
|
|
78
81
|
showHighlight?:
|
|
79
82
|
| boolean
|
|
80
83
|
| undefined;
|
|
81
|
-
/**
|
|
84
|
+
/** @deprecated use `max_distance` instead (same semantics) */
|
|
82
85
|
maxPlayerDistance?:
|
|
83
86
|
| number
|
|
84
87
|
| undefined;
|
|
85
88
|
/** resolution order when multiple events overlap, higher wins (default 0) */
|
|
86
|
-
priority?:
|
|
89
|
+
priority?:
|
|
90
|
+
| number
|
|
91
|
+
| undefined;
|
|
92
|
+
/** range of interaction from the active camera's position (default none) */
|
|
93
|
+
maxCameraDistance?: number | undefined;
|
|
87
94
|
}
|
|
88
95
|
|
|
89
96
|
export interface PBPointerEvents_Entry {
|
|
@@ -170,6 +177,7 @@ function createBasePBPointerEvents_Info(): PBPointerEvents_Info {
|
|
|
170
177
|
showHighlight: undefined,
|
|
171
178
|
maxPlayerDistance: undefined,
|
|
172
179
|
priority: undefined,
|
|
180
|
+
maxCameraDistance: undefined,
|
|
173
181
|
};
|
|
174
182
|
}
|
|
175
183
|
|
|
@@ -196,6 +204,9 @@ export namespace PBPointerEvents_Info {
|
|
|
196
204
|
if (message.priority !== undefined) {
|
|
197
205
|
writer.uint32(56).uint32(message.priority);
|
|
198
206
|
}
|
|
207
|
+
if (message.maxCameraDistance !== undefined) {
|
|
208
|
+
writer.uint32(69).float(message.maxCameraDistance);
|
|
209
|
+
}
|
|
199
210
|
return writer;
|
|
200
211
|
}
|
|
201
212
|
|
|
@@ -255,6 +266,13 @@ export namespace PBPointerEvents_Info {
|
|
|
255
266
|
|
|
256
267
|
message.priority = reader.uint32();
|
|
257
268
|
continue;
|
|
269
|
+
case 8:
|
|
270
|
+
if (tag !== 69) {
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
message.maxCameraDistance = reader.float();
|
|
275
|
+
continue;
|
|
258
276
|
}
|
|
259
277
|
if ((tag & 7) === 4 || tag === 0) {
|
|
260
278
|
break;
|
|
@@ -273,6 +291,7 @@ export namespace PBPointerEvents_Info {
|
|
|
273
291
|
showHighlight: isSet(object.showHighlight) ? Boolean(object.showHighlight) : undefined,
|
|
274
292
|
maxPlayerDistance: isSet(object.maxPlayerDistance) ? Number(object.maxPlayerDistance) : undefined,
|
|
275
293
|
priority: isSet(object.priority) ? Number(object.priority) : undefined,
|
|
294
|
+
maxCameraDistance: isSet(object.maxCameraDistance) ? Number(object.maxCameraDistance) : undefined,
|
|
276
295
|
};
|
|
277
296
|
}
|
|
278
297
|
|
|
@@ -286,6 +305,7 @@ export namespace PBPointerEvents_Info {
|
|
|
286
305
|
message.showHighlight !== undefined && (obj.showHighlight = message.showHighlight);
|
|
287
306
|
message.maxPlayerDistance !== undefined && (obj.maxPlayerDistance = message.maxPlayerDistance);
|
|
288
307
|
message.priority !== undefined && (obj.priority = Math.round(message.priority));
|
|
308
|
+
message.maxCameraDistance !== undefined && (obj.maxCameraDistance = message.maxCameraDistance);
|
|
289
309
|
return obj;
|
|
290
310
|
}
|
|
291
311
|
|
|
@@ -302,6 +322,7 @@ export namespace PBPointerEvents_Info {
|
|
|
302
322
|
message.showHighlight = object.showHighlight ?? undefined;
|
|
303
323
|
message.maxPlayerDistance = object.maxPlayerDistance ?? undefined;
|
|
304
324
|
message.priority = object.priority ?? undefined;
|
|
325
|
+
message.maxCameraDistance = object.maxCameraDistance ?? undefined;
|
|
305
326
|
return message;
|
|
306
327
|
}
|
|
307
328
|
}
|
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-33421599964.commit-0e82dcd",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"gen:test": "node protoc-gen-bitwise/test/generator.test.js"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@protobuf-ts/protoc": "^2.
|
|
20
|
+
"@protobuf-ts/protoc": "^2.8.1",
|
|
21
21
|
"proto-compatibility-tool": "^1.1.2-20220925163655.commit-25bd040",
|
|
22
22
|
"typescript": "^5.0.4"
|
|
23
23
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"protoc-gen-bitwise/*.js",
|
|
37
37
|
"protoc-gen-bitwise/runtime"
|
|
38
38
|
],
|
|
39
|
-
"commit": "
|
|
39
|
+
"commit": "0e82dcd8289bec985a63727d665c08e4048cbac2"
|
|
40
40
|
}
|
|
@@ -94,14 +94,6 @@ message PlayerEmote {
|
|
|
94
94
|
uint32 incremental_id = 1;
|
|
95
95
|
string urn = 2;
|
|
96
96
|
float timestamp = 3;
|
|
97
|
-
optional bool is_stopping = 4; // true means the emote has been stopped in the sender's client
|
|
98
|
-
optional bool is_repeating = 5; // true when it is not the first time the looping animation plays
|
|
99
|
-
optional int32 interaction_id = 6; // identifies an interaction univocaly, established when the start animation is triggered
|
|
100
|
-
optional int32 social_emote_outcome = 7; // -1 means it does not use an outcome animation
|
|
101
|
-
optional bool is_reacting = 8; // to a social emote started by other user
|
|
102
|
-
optional string social_emote_initiator = 9; // wallet address of the user that initiated social emote
|
|
103
|
-
optional string target_avatar = 10; // wallet address of the user whose avatar is the target of a directed emote
|
|
104
|
-
optional uint32 mask = 11; // mask for which bones an animation applies to.
|
|
105
97
|
}
|
|
106
98
|
|
|
107
99
|
message SceneEmote {
|
|
@@ -134,9 +126,6 @@ message ProfileResponse {
|
|
|
134
126
|
message Chat {
|
|
135
127
|
string message = 1;
|
|
136
128
|
double timestamp = 2;
|
|
137
|
-
// Extension: optional forwarded_from to identify the original sender when
|
|
138
|
-
// messages are forwarded through an SFU
|
|
139
|
-
optional string forwarded_from = 3;
|
|
140
129
|
}
|
|
141
130
|
|
|
142
131
|
message Scene {
|
|
@@ -74,17 +74,35 @@ message ParcelRect {
|
|
|
74
74
|
sint32 max_z = 4;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
//
|
|
78
|
-
//
|
|
77
|
+
// One realm's slice of a scene listener's area of interest. Parcels only mean anything
|
|
78
|
+
// within a realm — every world numbers its own parcels from 0,0 — so a listener that
|
|
79
|
+
// observes several realms, as an authoritative server cohosting scenes from several worlds
|
|
80
|
+
// does, announces one of these per realm rather than one realm for the whole connection.
|
|
81
|
+
message SceneListenerAoi {
|
|
82
|
+
// Non-empty realm identifier — same rules as TeleportRequest.realm.
|
|
83
|
+
string realm = 1;
|
|
84
|
+
// This realm's parcels as inclusive rects. The sum of rect areas across every announced
|
|
85
|
+
// realm is capped server-side (SceneListener:MaxParcels) — overlaps count per rect, so
|
|
86
|
+
// announce disjoint rects.
|
|
87
|
+
repeated ParcelRect parcel_rects = 2;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Scene-listener connect: same signed-fetch auth chain as HandshakeRequest, plus a
|
|
91
|
+
// parcel-set area of interest per realm. No initial state — a listener is never a subject.
|
|
79
92
|
message SceneListenerHandshakeRequest {
|
|
80
93
|
// Signed-fetch headers JSON — identical shape to HandshakeRequest.auth_chain.
|
|
81
94
|
bytes auth_chain = 1;
|
|
82
|
-
// AoI
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
// Announced AoI, one entry per realm; replaceable afterwards with SceneListenerUpdate.
|
|
96
|
+
repeated SceneListenerAoi aoi = 2;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Scene-listener AoI reassignment: replaces the area of interest announced at connect, in
|
|
100
|
+
// place, on an authenticated scene-listener connection. Only valid from a peer that
|
|
101
|
+
// authenticated with SceneListenerHandshakeRequest.
|
|
102
|
+
message SceneListenerUpdate {
|
|
103
|
+
// The new AoI, replacing (not extending) the current one — realms absent from it are no
|
|
104
|
+
// longer observed. Same rules and SceneListener:MaxParcels budget as the handshake's.
|
|
105
|
+
repeated SceneListenerAoi aoi = 1;
|
|
88
106
|
}
|
|
89
107
|
|
|
90
108
|
message ClientMessage {
|
|
@@ -97,5 +115,6 @@ message ClientMessage {
|
|
|
97
115
|
EmoteStop emote_stop = 6;
|
|
98
116
|
TeleportRequest teleport = 7;
|
|
99
117
|
SceneListenerHandshakeRequest scene_listener_handshake = 8;
|
|
118
|
+
SceneListenerUpdate scene_listener_update = 9;
|
|
100
119
|
}
|
|
101
120
|
}
|
|
@@ -25,4 +25,4 @@ message PBLightSource {
|
|
|
25
25
|
optional float inner_angle = 9; // default = 21.8. Inner angle can't be higher than outer angle, otherwise will default to same value. Min value is 0. Max value is 179.
|
|
26
26
|
optional float outer_angle = 10; // default = 30. Outer angle can't be lower than inner angle, otherwise will inner angle will be set to same value. Max value is 179.
|
|
27
27
|
}
|
|
28
|
-
}
|
|
28
|
+
}
|
|
@@ -25,33 +25,37 @@ option (common.ecs_component_id) = 1062;
|
|
|
25
25
|
// --------------
|
|
26
26
|
// PointerEvents can enforce interaction range using two independent distance checks:
|
|
27
27
|
//
|
|
28
|
-
// -
|
|
29
|
-
// -
|
|
28
|
+
// - Player distance (`max_distance`): distance from the avatar/player position to the target entity.
|
|
29
|
+
// - Camera distance (`max_camera_distance`): distance from the active camera to the target entity.
|
|
30
|
+
//
|
|
31
|
+
// `max_player_distance` is deprecated: it is an alias for `max_distance` (both are player distance).
|
|
32
|
+
// If both are present, the larger of the two is used as the player distance threshold.
|
|
30
33
|
//
|
|
31
34
|
// How the interaction checks are combined:
|
|
32
35
|
//
|
|
33
36
|
// 1) Only `max_distance` is present
|
|
34
|
-
// - The interaction is allowed only if the
|
|
37
|
+
// - The interaction is allowed only if the player distance is <= `max_distance`.
|
|
35
38
|
//
|
|
36
|
-
// 2) Only `
|
|
37
|
-
// - The interaction is allowed only if the
|
|
39
|
+
// 2) Only `max_camera_distance` is present
|
|
40
|
+
// - The interaction is allowed only if the camera distance is <= `max_camera_distance`.
|
|
38
41
|
//
|
|
39
|
-
// 3) Both `max_distance` and `
|
|
42
|
+
// 3) Both `max_distance` and `max_camera_distance` are present
|
|
40
43
|
// - The interaction is allowed if ANY of the checks passes (OR logic):
|
|
41
|
-
// (
|
|
44
|
+
// (player distance <= `max_distance`) OR (camera distance <= `max_camera_distance`).
|
|
42
45
|
//
|
|
43
|
-
// 4) Neither `max_distance` nor `
|
|
46
|
+
// 4) Neither `max_distance` nor `max_camera_distance` is present
|
|
44
47
|
// - The system behaves as if `max_distance` were set to its default value (10),
|
|
45
|
-
// i.e., it uses the
|
|
48
|
+
// i.e., it uses the player distance check with a threshold of 10.
|
|
46
49
|
message PBPointerEvents {
|
|
47
50
|
message Info {
|
|
48
51
|
optional common.InputAction button = 1; // key/button in use (default IA_ANY)
|
|
49
52
|
optional string hover_text = 2; // feedback on hover (default 'Interact')
|
|
50
|
-
optional float max_distance = 3; // range of interaction (default 10)
|
|
53
|
+
optional float max_distance = 3; // range of interaction from the avatar's position (default 10)
|
|
51
54
|
optional bool show_feedback = 4; // enable or disable hover text and highlight (default true)
|
|
52
55
|
optional bool show_highlight = 5; // enable or disable hover highlight (default true)
|
|
53
|
-
optional float max_player_distance = 6; //
|
|
56
|
+
optional float max_player_distance = 6; // @deprecated use `max_distance` instead (same semantics)
|
|
54
57
|
optional uint32 priority = 7; // resolution order when multiple events overlap, higher wins (default 0)
|
|
58
|
+
optional float max_camera_distance = 8; // range of interaction from the active camera's position (default none)
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
message Entry {
|