Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b07ee40
cinematic camera
robtfm May 14, 2024
57932cf
typo
robtfm May 15, 2024
59775b1
separate avatar controls
robtfm May 15, 2024
4b60fac
separate message for movement settings
robtfm May 15, 2024
724358e
add ui fields
robtfm May 15, 2024
1e423c0
add collider range
robtfm May 16, 2024
17018eb
Merge branch 'main' into cinecam
leanmendoza May 17, 2024
57842f7
publish a protocol-squad version
leanmendoza May 17, 2024
ae49e5c
add text_wrapping
leanmendoza May 27, 2024
3fd5a50
Merge branch 'main' into protocol-squad
leanmendoza Jun 19, 2024
5243189
feat: add scroll result component for scrolling ui transform
leanmendoza Jun 26, 2024
9d2fa3c
remove boolean text wrapping
leanmendoza Jun 26, 2024
61ce678
gltf node (#207)
leanmendoza Jul 30, 2024
3869a88
Merge branch 'main' into protocol-squad
leanmendoza Jul 30, 2024
e0cda12
Merge branch 'main' into protocol-squad
leanmendoza Aug 5, 2024
205bdd8
Merge branch 'main' into protocol-squad
leanmendoza Aug 5, 2024
acd1db5
use 1200 ids
leanmendoza Aug 13, 2024
0207676
in-world UI (#212)
leanmendoza Sep 18, 2024
f199bbd
lights initial (#217)
leanmendoza Sep 18, 2024
8a6cf9b
Merge branch 'main' into protocol-squad
leanmendoza Sep 18, 2024
471b772
Merge branch 'main' into protocol-squad
leanmendoza Oct 24, 2024
26045c5
Merge branch 'main' into protocol-squad
leanmendoza Nov 15, 2024
b277a0c
Merge branch 'main' into protocol-squad
leanmendoza Dec 3, 2024
27241f4
feat: ui transform - add z index (#232)
leanmendoza Dec 19, 2024
591a12f
Merge branch 'main' into protocol-squad
leanmendoza Dec 19, 2024
fdbbfb3
feat: render to texture (#236)
leanmendoza Jan 27, 2025
a7ca443
feat: pointer position and drag (#237)
robtfm Jan 27, 2025
ea9043b
build and publish
kuruk-mm Jan 27, 2025
c95848f
Merge branch 'main' into protocol-squad
leanmendoza Feb 1, 2025
5dc030d
test
leanmendoza Feb 1, 2025
7264662
test
leanmendoza Feb 1, 2025
b71756b
test
leanmendoza Feb 1, 2025
a130978
test
leanmendoza Feb 1, 2025
1ef7f1a
add force render on avatar components (#251)
robtfm Mar 12, 2025
5eec1a4
fix ci
kuruk-mm Mar 12, 2025
f22e88a
fix package.json
kuruk-mm Mar 12, 2025
f3d7a39
Merge branch 'main' into protocol-squad
leanmendoza Mar 13, 2025
832f02f
Border radius and texture cam volume (#257)
robtfm Apr 2, 2025
ef9bad2
Merge remote-tracking branch 'origin/main' into protocol-squad
kuruk-mm Apr 2, 2025
462eee4
Merge branch 'main' into protocol-squad
leanmendoza Jun 18, 2025
446cf4a
feat: add clipboard (#275)
leanmendoza Jun 18, 2025
f2e135e
feat: add set ui focus on restricted actions
kuruk-mm Jun 18, 2025
d35499a
psquad lights reconciliation (#301)
robtfm Aug 8, 2025
d5049fe
clear/get focus
robtfm Nov 7, 2025
43e60dd
Merge remote-tracking branch 'origin/main' into clear/get-focus
kuruk-mm Nov 7, 2025
593cbae
fix component_id conflict
kuruk-mm Nov 11, 2025
e203261
add social v2 features (#324)
leanmendoza Nov 17, 2025
eb9f94e
Merge remote-tracking branch 'origin/main' into protocol-squad
kuruk-mm Jan 29, 2026
9179af1
Add timestamp field to PlayerEmote message
kuruk-mm Jan 29, 2026
de6a708
Add is_instant and is_emoting fields to Movement message
kuruk-mm Jan 29, 2026
b658867
add experimental avatar locomotion settings
leanmendoza Feb 3, 2026
5d27bf3
Merge remote-tracking branch 'origin/main' into protocol-squad
leanmendoza Feb 4, 2026
a48721e
Script based movement (#356)
robtfm Feb 23, 2026
8e30970
add active modifiers and locomotion settings (#361)
robtfm Mar 2, 2026
b829b38
update camera layer component id (#364)
robtfm Mar 2, 2026
14f756d
add WalkPlayerTo RPC and walk fields to movement components (#374)
robtfm Mar 10, 2026
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
23 changes: 15 additions & 8 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ on:
push:
branches:
- main
- protocol-squad
- experimental
pull_request:
release:
types:
- created

env:
BRANCH_TAG: ${{ github.ref_name == 'experimental' && 'experimental' || '' }}
env:
IS_A_PR: ${{ github.event.pull_request.number != 'null' && github.head_ref != 'protocol-squad' }}

name: build-deploy
jobs:
Expand All @@ -21,6 +21,13 @@ jobs:
outputs:
dcl_protocol_s3_bucket_key: ${{ steps.publish_dcl_protocol.outputs.s3-bucket-key }}
steps:
- name: (PR) Check if it's a PR
if: ${{ env.IS_A_PR == 'true' }}
run: |
echo "run from a PR"
echo "from env '${{env.IS_A_PR}}'"
echo "- '${{github.event.pull_request.number}}'"
echo "- env '${{github.head_ref}}'"
- uses: actions/checkout@v4
- name: install
run: make install
Expand All @@ -32,6 +39,8 @@ jobs:
uses: menduz/oddish-action@master
id: publish_dcl_protocol
with:
custom-tag: protocol-squad
branch-to-custom-tag: protocol-squad
registry-url: 'https://registry.npmjs.org'
access: public
## use action runId instead of current date to generate snapshot numbers
Expand All @@ -47,18 +56,16 @@ jobs:
## inform gitlab after publishing to proceed with CDN propagation
gitlab-token: ${{ secrets.GITLAB_TOKEN }}
gitlab-pipeline-url: ${{ secrets.GITLAB_URL }}
custom-tag: ${{ env.BRANCH_TAG }}
branch-to-custom-tag: ${{ env.BRANCH_TAG }}
env:
BRANCH_NAME: ${{ github.ref_name }}
BRANCH_NAME: ${{ github.head_ref }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.SDK_TEAM_AWS_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_TEAM_AWS_SECRET }}

notify_deployment:
needs: [check_and_build]
if: ${{ github.event.pull_request.number }}
needs: [check_and_build]
if: github.event.pull_request.number != 'null' && github.head_ref != 'protocol-squad'
runs-on: ubuntu-latest
name: Deployment Notification
steps:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
on:
push:
branches-ignore:
- "main"
- "protocol-squad"

env:
BASE_BRANCH: protocol-squad # TODO: change to main for merging into main

name: validate-compatibility
jobs:
Expand All @@ -19,4 +22,4 @@ jobs:
- name: build and compile test
run: make test
- name: run the check script
run: ./scripts/check-proto-compabitility.sh
run: ./scripts/check-proto-compabitility.sh ${{ env.BASE_BRANCH }}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "@dcl/protocol",
"version": "1.0.0",
"description": "",
"repository": "decentraland/protocol.git",
"repository": {
"type": "git",
"url": "git+https://github.com/decentraland/protocol.git"
},
"homepage": "https://github.com/decentraland/protocol#readme",
"bugs": "https://github.com/decentraland/protocol/issues",
"keywords": [],
Expand Down
9 changes: 8 additions & 1 deletion proto/decentraland/common/texture.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ message VideoTexture {
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
}

message UiCanvasTexture {
uint32 ui_canvas_entity = 1;
optional TextureWrapMode wrap_mode = 2; // default = TextureWrapMode.Clamp
optional TextureFilterMode filter_mode = 3; // default = FilterMode.Bilinear
}

message TextureUnion {
oneof tex {
Texture texture = 1; // default = null
AvatarTexture avatar_texture = 2; // default = null
VideoTexture video_texture = 3; // default = null
UiCanvasTexture ui_texture = 4;
}
}
}
40 changes: 39 additions & 1 deletion proto/decentraland/kernel/apis/restricted_actions.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,35 @@ message SuccessResponse {

message TriggerEmoteResponse { }

message MovePlayerToResponse {
message MovePlayerToResponse {
bool success = 1;
}

message WalkPlayerToRequest {
decentraland.common.Vector3 new_relative_position = 1;
float stop_threshold = 2;
optional float timeout = 3; // max seconds before the request is failed; not passed to the movement scene
}

message WalkPlayerToResponse {
bool success = 1;
}

message TeleportToResponse { }

message SetUiFocusRequest {
string element_id = 1;
}

message ClearUiFocusRequest { }

message GetUiFocusRequest { }

message UiFocusResponse {
// the element that is/was focussed
optional string element_id = 1;
}

message CopyToClipboardRequest {
string text = 1;
}
Expand All @@ -66,6 +89,12 @@ service RestrictedActionsService {
// whole interpolation being completed or interrupted (e.g: by input movement)
rpc MovePlayerTo(MovePlayerToRequest) returns (MovePlayerToResponse) {}

// WalkPlayerTo will walk the player to a position relative to the current scene,
// managed by the movement controller scene. Returns success when the player reaches
// within stop_threshold distance, or false if the path is blocked, the player gets
// stuck, the player interrupts the walk with manual input, or the optional timeout expires.
rpc WalkPlayerTo(WalkPlayerToRequest) returns (WalkPlayerToResponse) {}

// TeleportTo will move the user to the specified world LAND parcel coordinates
rpc TeleportTo(TeleportToRequest) returns (TeleportToResponse) {}

Expand All @@ -88,6 +117,15 @@ service RestrictedActionsService {
// TriggerSceneEmote will trigger an scene emote file in this current user
rpc TriggerSceneEmote(TriggerSceneEmoteRequest) returns (SuccessResponse) {}

// Sets the focus to a specific UI element
rpc SetUiFocus(SetUiFocusRequest) returns (UiFocusResponse) {}

// Clears the focus from any currently focused textentry or dropdown
rpc ClearUiFocus(SetUiFocusRequest) returns (UiFocusResponse) {}

// Returns the element_id of any currently focused textentry or dropdown
rpc GetUiFocus(GetUiFocusRequest) returns (UiFocusResponse) {}

// CopyToClipboard copies the provided text into the clipboard
rpc CopyToClipboard(CopyToClipboardRequest) returns (EmptyResponse) {}
}
3 changes: 2 additions & 1 deletion proto/decentraland/sdk/components/avatar_equipped_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ option (common.ecs_component_id) = 1091;
message PBAvatarEquippedData {
repeated string wearable_urns = 1;
repeated string emote_urns = 2;
}
repeated string force_render = 3; // slots that will render even if hidden
}
18 changes: 18 additions & 0 deletions proto/decentraland/sdk/components/avatar_locomotion_settings.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";

option (common.ecs_component_id) = 1211;

// The PBAvatarLocomotionSettings component allows scenes to modify locomotion settings defining things such
// as the avatar movement speed, jump height etc.
message PBAvatarLocomotionSettings {
optional float walk_speed = 1; // Maximum speed when walking (in meters per second)
optional float jog_speed = 2; // Maximum speed when jogging (in meters per second)
optional float run_speed = 3; // Maximum speed when running (in meters per second)
optional float jump_height = 4; // Height of a regular jump (in meters)
optional float run_jump_height = 5; // Height of a jump while running (in meters)
optional float hard_landing_cooldown = 6; // Cooldown time after a hard landing before the avatar can move again (in seconds)
}
21 changes: 21 additions & 0 deletions proto/decentraland/sdk/components/avatar_modifier_area.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,31 @@ message PBAvatarModifierArea {
decentraland.common.Vector3 area = 1; // the 3D size of the region
repeated string exclude_ids = 2; // user IDs that can enter and remain unaffected
repeated AvatarModifierType modifiers = 3; // list of modifiers to apply
optional AvatarMovementSettings movement_settings = 4;
optional bool use_collider_range = 5; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
}

// AvatarModifierType is an effect that should be applied to avatars inside the region.
enum AvatarModifierType {
AMT_HIDE_AVATARS = 0; // avatars are invisible
AMT_DISABLE_PASSPORTS = 1; // selecting (e.g. clicking) an avatar will not bring up their profile.
}

message AvatarMovementSettings {
optional AvatarControlType control_mode = 1;
// if not explicitly set, the following properties default to user's preference settings
optional float run_speed = 2; // speed the player moves at, in m/s
optional float friction = 3; // how fast the player gets up to speed or comes to rest. higher = more responsive
optional float gravity = 4; // how fast the player accelerates vertically when not on a solid surface, in m/s. should normally be negative
optional float jump_height = 5; // how high the player can jump, in meters. should normally be positive. gravity must have the same sign for jumping to be possible
optional float max_fall_speed = 6; // max fall speed in m/s. should normally be negative
optional float turn_speed = 7; // speed the player turns in tank mode, in radians/s
optional float walk_speed = 8; // speed the player walks at, in m/s
optional bool allow_weighted_movement = 9; // whether to allow player to move at a slower speed (e.g. with a walk-key or when using a gamepad/joystick). defaults to true
}

enum AvatarControlType {
CCT_NONE = 0; // avatar cannot move
CCT_RELATIVE = 1; // avatar moves relative to the camera origin
CCT_TANK = 2; // avatar moves like a tank: left/right rotate the player, forward/backward advance/retreat the player
}
46 changes: 46 additions & 0 deletions proto/decentraland/sdk/components/avatar_movement.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";
import "decentraland/common/vectors.proto";

option (common.ecs_component_id) = 1501;

message PBAvatarMovement {
decentraland.common.Vector3 velocity = 1;
float orientation = 2; // 0-360, we don't allow pitch/roll
optional decentraland.common.Vector3 ground_direction = 3;
optional bool walk_success = 4; // set for one frame when a walk_target ends: true = reached target, false = failed; absent = in progress or no walk
}

// engine behaviour (uses only capsule shapecasts and GJK closest point for portability):
// 1: set avatar orientation from movement info -> P1
// 2: record "ground collider" - nearest collider within threshold distance in ground_direction using avatar collider shapecast
// 3: update all colliders, record previous transform and new transform.
// 4: apply ground collider movement: take collider closest point, modify P1 translation and rotation by closest point translation and rotation change -> P2
// 5: resolve collisions using position-based constraints
// initialize constraints to -inf, +inf
// repeat
// for each collider[i] that collides with the P3+N player:
// if closest point = capsule middle (i.e. collider collides with P3 collider but with radius 0),
// ignore / continue
// else
// update constraints based on minimum movement to escape collision
// e.g. if avatar is 1cm into the floor, constraint_min = max(constraint_min, vec3(0, 0.01, 0))
// reposition player to satisfy constraints for each axis:
// y: satsify floor before ceiling: new position = max(constraint_min, min(constraint_max, current position))
// x and z: if squashed, take average, else satisfy the required constraint
// if constraint_min > constraint_max then new position = average(constraint_min, constraint_max)
// else new position = clamp(current position, constraint_min, constraint_max)
// while position !~= previous position
// 6: apply velocity (collide and slide)
// disable anything we are initially colliding with
// shapecast avatar from position to position + velocity * timestep
// on impact:
// project velocity onto slide plane (standard "Collide & Slide")
// velocity = old velocity - (normal * dot(velocity, normal))
// repeat continue with residual velocity and residual time
// 7: provide AvatarMovementInfo values
// actual velocity = (final - P3+N) / timestep
// external_velocity = (P3+N - P1) / timestep
22 changes: 22 additions & 0 deletions proto/decentraland/sdk/components/avatar_movement_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";
import "decentraland/common/vectors.proto";
import "decentraland/sdk/components/avatar_locomotion_settings.proto";
import "decentraland/sdk/components/input_modifier.proto";

option (common.ecs_component_id) = 1500;

message PBAvatarMovementInfo {
float step_time = 1; // the length of time the current step velocity will apply for
float previous_step_time = 2; // the length of time the previous step velocity applied for
decentraland.common.Vector3 requested_velocity = 3; // the velocity requested for the previous frame
decentraland.common.Vector3 actual_velocity = 4; // the resulting velocity taking collisions into account
decentraland.common.Vector3 external_velocity = 5; // the velocity imparted by movement of the "ground" platform or pushing from other moving colliders
decentraland.sdk.components.PBAvatarLocomotionSettings active_avatar_locomotion_settings = 6;
decentraland.sdk.components.PBInputModifier active_input_modifier = 7;
optional decentraland.common.Vector3 walk_target = 8; // if set, the movement scene should walk the player to this scene-relative position
optional float walk_threshold = 9; // stop distance for walk_target; considered reached when within this distance
}
1 change: 1 addition & 0 deletions proto/decentraland/sdk/components/avatar_shape.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ message PBAvatarShape {
repeated string emotes = 11; // available emotes (default empty)

optional bool show_only_wearables = 12; // hides the skin + hair + facial features (default: false)
repeated string force_render = 13; // slots that will render even if hidden
}

30 changes: 30 additions & 0 deletions proto/decentraland/sdk/components/camera_layer.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";
import "decentraland/common/colors.proto";

option (common.ecs_component_id) = 1503;

message PBCameraLayer {
// layer to which these settings apply. must be > 0
// Layer 0 is the default "real world" layer viewed by the player and cannot be modified.
uint32 layer = 1;

// should the sun light affect this layer? default false
optional bool directional_light = 2;

// should this layer show player avatars? default false
optional bool show_avatars = 3;

// should this layer show the sky? default false
optional bool show_skybox = 4;

// should this layer show distance fog? default false
optional bool show_fog = 5;

// ambient light overrides for this layer. default -> use same as main camera
optional decentraland.common.Color3 ambient_color_override = 6;
optional float ambient_brightness_override = 7;
}
11 changes: 11 additions & 0 deletions proto/decentraland/sdk/components/camera_layers.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
syntax = "proto3";

package decentraland.sdk.components;

import "decentraland/sdk/components/common/id.proto";

option (common.ecs_component_id) = 1208;

message PBCameraLayers {
repeated uint32 layers = 1;
}
25 changes: 22 additions & 3 deletions proto/decentraland/sdk/components/camera_mode_area.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "decentraland/sdk/components/common/id.proto";
option (common.ecs_component_id) = 1071;

// The CameraModeArea component can be attached to an Entity to define a region of space where
// the player's camera mode (1st-person or 3rd-person) is overridden.
// the player's camera mode (1st-person, 3rd-person or cinematic) is overridden.
//
// The Entity's Transform position determines the center-point of the region, while its size is
// given as a vector in the `area` property below. The Transform rotation is applied, but the scale
Expand All @@ -19,7 +19,26 @@ option (common.ecs_component_id) = 1071;
//
// Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
// is actually a 3D volume.
//
// When mode is set to CtCinematic, the cinematic_settings field must also be provided.
message PBCameraModeArea {
decentraland.common.Vector3 area = 1; // the 3D size of the region
common.CameraType mode = 2; // the camera mode to enforce
decentraland.common.Vector3 area = 1; // the 3D size of the region
common.CameraType mode = 2; // the camera mode to enforce
optional CinematicSettings cinematic_settings = 3;
optional bool use_collider_range = 4; // if true, the player will be considered inside the area when they are within 0.3m of the area. default true
}

message CinematicSettings {
uint32 camera_entity = 1; // Entity that defines the cinematic camera transform.
// Position -> camera's position
// Rotation -> camera's direction
// scale.z -> zoom level
// scale.x and scale.y -> unused
optional bool allow_manual_rotation = 2; // whether the user can move the camera's rotation. default false
optional float yaw_range = 3; // how far the camera can rotate around the y-axis / look left/right, in radians. default unrestricted
optional float pitch_range = 4; // how far the camera can rotate around the x-axis / look up-down, in radians. default unrestricted
// note: cameras can never look up/down further than Vec3::Y
optional float roll_range = 5; // how far the camera can rotate around the z-axis / tilt, in radians. default unrestricted
optional float zoom_min = 6; // minimum zoom level. must be greater than 0. defaults to the input zoom level
optional float zoom_max = 7; // maximum zoom level. must be greater than 0. defaults to the input zoom level
}
Loading
Loading