@dcl/protocol 1.0.0-15045186685.commit-cc4fe42 → 1.0.0-15216214787.commit-b85a860
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-15216214787.commit-b85a860",
|
|
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": "b85a8607b5b51a2ed4167a4beb7a78c0170b49b4"
|
|
33
33
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/common/vectors.proto";
|
|
5
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
|
|
7
|
+
option (common.ecs_component_id) = 1209;
|
|
8
|
+
|
|
9
|
+
// The PBPrimaryPointerInfo component provides information about the current state of the primary
|
|
10
|
+
// pointer input device (mouse, touch, gamepad, or VR controller). It tracks the pointer's position,
|
|
11
|
+
// movement, and interaction capabilities in both 2D screen space and 3D world space.
|
|
12
|
+
//
|
|
13
|
+
// This component is essential for:
|
|
14
|
+
// - Tracking cursor/pointer position and movement
|
|
15
|
+
// - Converting 2D screen coordinates to 3D world space interactions
|
|
16
|
+
// - Supporting multiple input methods (mouse, touch, gamepad, VR)
|
|
17
|
+
// - Enabling ray-based interactions for 3D object selection
|
|
18
|
+
//
|
|
19
|
+
// The component can be used to:
|
|
20
|
+
// - Implement drag-and-drop functionality
|
|
21
|
+
// - Handle touch interactions on mobile devices
|
|
22
|
+
// - Support gamepad navigation
|
|
23
|
+
// - Enable VR controller interactions
|
|
24
|
+
// - Convert screen coordinates to world space rays for 3D interactions
|
|
25
|
+
//
|
|
26
|
+
// Note: Touch, Pad, and Wand support, as well as dragging, will be added later.
|
|
27
|
+
message PBPrimaryPointerInfo {
|
|
28
|
+
optional PointerType pointer_type = 1; // The type of input device being used
|
|
29
|
+
optional decentraland.common.Vector2 screen_coordinates = 2; // Current position in screen space (pixels)
|
|
30
|
+
optional decentraland.common.Vector2 screen_delta = 3; // Movement since last frame (pixels)
|
|
31
|
+
optional decentraland.common.Vector3 world_ray_direction = 4; // Direction vector for 3D ray casting
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// PointerType enumerates the different input devices that can be used for pointer interactions.
|
|
35
|
+
// Each type has specific characteristics and use cases in the virtual world.
|
|
36
|
+
enum PointerType {
|
|
37
|
+
POT_NONE = 0; // No pointer input
|
|
38
|
+
POT_MOUSE = 1; // Traditional mouse input
|
|
39
|
+
}
|