Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pointer position and drag #237

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions proto/decentraland/sdk/components/common/input_action.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ enum PointerEventType {
PET_DOWN = 1;
PET_HOVER_ENTER = 2;
PET_HOVER_LEAVE = 3;
PET_DRAG_LOCKED = 4;
PET_DRAG = 5;
PET_DRAG_END = 6;
}
25 changes: 25 additions & 0 deletions proto/decentraland/sdk/components/primary_pointer_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";
package decentraland.sdk.components;

import "decentraland/common/vectors.proto";
import "decentraland/sdk/components/common/id.proto";
option (common.ecs_component_id) = 1209;

message PBPrimaryPointerInfo {
optional PointerType pointer_type = 1;
// in pixels
optional decentraland.common.Vector2 screen_coordinates = 2;
// in pixels
optional decentraland.common.Vector2 screen_delta = 3;
// ray direction that can be used with the primary camera origin for
// raycasting from the cursor into the world
optional decentraland.common.Vector3 world_ray_direction = 4;
}

enum PointerType {
POT_NONE = 0;
POT_MOUSE = 1;
POT_PAD = 2;
POT_TOUCH = 3;
POT_WAND = 4;
}
Loading