Skip to content

Commit a7ca443

Browse files
robtfmkuruk-mm
andauthored
feat: pointer position and drag (#237)
* 'initial' * 'initial' * rename * wip --------- Co-authored-by: Mateo "Kuruk" Miccino <[email protected]>
1 parent fdbbfb3 commit a7ca443

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

proto/decentraland/sdk/components/common/input_action.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ enum PointerEventType {
2525
PET_DOWN = 1;
2626
PET_HOVER_ENTER = 2;
2727
PET_HOVER_LEAVE = 3;
28+
PET_DRAG_LOCKED = 4;
29+
PET_DRAG = 5;
30+
PET_DRAG_END = 6;
2831
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
syntax = "proto3";
2+
package decentraland.sdk.components;
3+
4+
import "decentraland/common/vectors.proto";
5+
import "decentraland/sdk/components/common/id.proto";
6+
option (common.ecs_component_id) = 1209;
7+
8+
message PBPrimaryPointerInfo {
9+
optional PointerType pointer_type = 1;
10+
// in pixels
11+
optional decentraland.common.Vector2 screen_coordinates = 2;
12+
// in pixels
13+
optional decentraland.common.Vector2 screen_delta = 3;
14+
// ray direction that can be used with the primary camera origin for
15+
// raycasting from the cursor into the world
16+
optional decentraland.common.Vector3 world_ray_direction = 4;
17+
}
18+
19+
enum PointerType {
20+
POT_NONE = 0;
21+
POT_MOUSE = 1;
22+
POT_PAD = 2;
23+
POT_TOUCH = 3;
24+
POT_WAND = 4;
25+
}

0 commit comments

Comments
 (0)