Skip to content

Commit

Permalink
Merge branch 'main' into protocol-squad
Browse files Browse the repository at this point in the history
  • Loading branch information
leanmendoza authored Jul 30, 2024
2 parents 61ce678 + ea61304 commit 3869a88
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 8 deletions.
68 changes: 64 additions & 4 deletions proto/decentraland/realm/about.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto3";
package decentraland.realm;

import "decentraland/common/border_rect.proto";
import "decentraland/common/vectors.proto";

message AboutResponse {
bool healthy = 1;
AboutConfiguration configurations = 2;
Expand All @@ -10,10 +13,65 @@ message AboutResponse {
optional BffInfo bff = 6;
bool accepting_users = 7;

// @deprecated This message was never used but it's still here for compatibility reasons
message MinimapConfiguration {
bool enabled = 1;
optional string data_image = 2;
optional string estate_image = 3;
reserved 1;
reserved "enabled";
reserved 2;
reserved "data_image";
reserved 3;
reserved "estate_image";
}

message MapConfiguration {
// whether the minimap should be rendered
bool minimap_enabled = 1;

// the union of all rects here represents the places where that MAY have scenes
// - all the other parcels are considered as empty, up to the explorer to decide if they're walkable or not
// - the contained square is determined by points:
// - top-left with minX, maxY
// - bottom-left with minX, minY
// - top-right with maxX, maxY
// - bottom-right with maxX, maxY
// Note: the coordinate system used is the Cartesian coordinate system, where the y-axis increases upwards,
// not the screen coordinate system, where the origin is at the top-left corner and the y-axis increases downwards.
repeated decentraland.common.BorderRect sizes = 2;

// ImageViewWithZoomLevel uses a description to render the minimap
// using different images with different zoom levels.
// When `version='v1'`:
// - The description allows the explorer to form the URL:
// url(x,y,zoom_level) = `{base_url}/{zoom_level}/{x},{y}{suffix_url}`
// - The given URL is for an image where the pixel `0,0` for the image `0,0` always
// points to the top-left contained square.
// - The `zoom_level=1` is to a ratio of 3.2 pixel per parcel, this means in a 32x32 pixel square
// you get 10x10 parcels.
// - Each increase of zoom level, double the ratio pixel per parcels.
message ImageViewWithZoomLevel {
// options: ['v1']
string version = 1;
optional string base_url = 2;
optional string suffix_url = 3;
optional decentraland.common.Vector2 top_left_offset = 4;
}

// ParcelView uses a description to render the minimap
// using a image where each pixel is a parcel and each pixel
// has the metadata to make a representation (using a shader or image-generation client-side)
// When `version='v1'`:
// - The pixel `0,0` is the top-left contained square
// - The image has to be at least of contained square pixels size
// - The metadata inside each pixel follows the generated with the atlas server https://github.com/decentraland/atlas-server/blob/af371f2a59745a1f50b0b0b2382984288c4ae891/src/adapters/mini-map-renderer.ts#L27
message ParcelView {
// options: `v1`
string version = 1;
optional string image_url = 2;
}

optional ImageViewWithZoomLevel satellite_view = 5;
optional ParcelView parcel_view = 6;
optional ImageViewWithZoomLevel thumbnail_view = 7;
}

message SkyboxConfiguration {
Expand All @@ -26,13 +84,15 @@ message AboutResponse {
uint32 network_id = 2;
repeated string global_scenes_urn = 3;
repeated string scenes_urn = 4;
optional MinimapConfiguration minimap = 5;
reserved 5;
reserved "minimap";
optional SkyboxConfiguration skybox = 6;

// A content server to be used to load the parcels around the user. Uses the POST /entities/active endpoint
// to continously fetch the parcels around the users. if null, then the default content server will be used
// if == "" then the city_loader will be disabled and the scenes_urn will be used to load the world
optional string city_loader_content_server = 7;
optional MapConfiguration map = 8;
}

message ContentInfo {
Expand Down
9 changes: 5 additions & 4 deletions proto/decentraland/sdk/components/avatar_attach.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import "decentraland/sdk/components/common/id.proto";

option (common.ecs_component_id) = 1073;

// The AvatarAttach component automatically repositions an Entity to maintain the same position and
// rotation relative to some part of an avatar, called the "anchor point". The Entity
// The AvatarAttach component automatically repositions an Entity to maintain the same position and
// rotation relative to some part of an avatar, called the "anchor point". The Entity
// will follow this anchor as it moves.
//
// The Entity's own Transform is overridden by this component. To offset position and adjust scale,
// The Entity's own Transform is overridden by this component. To offset position and adjust scale,
// add a child to the anchored Entity and set a Transform on it instead.
//
// AvatarAnchorPointType indicates which part of the avatar the Entity must follow.
Expand All @@ -21,7 +21,8 @@ message PBAvatarAttach {

// AvatarAnchorPointType determines the part of the avatar's body that anchors the Entity.
enum AvatarAnchorPointType {
AAPT_POSITION = 0;
// @deprecated consider parenting to `engine.PlayerEntity`, this will attach to player position with an arbitrary offset
AAPT_POSITION = 0;
AAPT_NAME_TAG = 1;
AAPT_HEAD = 4;
AAPT_NECK = 5;
Expand Down
29 changes: 29 additions & 0 deletions proto/decentraland/sdk/development/local_development.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
syntax = "proto3";

package decentraland.sdk.development;

// ts code & main.crdt updates
message UpdateScene {
string scene_id = 1;
}

enum UpdateModelType {
UMT_CHANGE = 0;
UMT_REMOVE = 1;
}

// .glb & .gltf model udpates
message UpdateModel {
string scene_id = 1;
string src = 2;
string hash = 3;
UpdateModelType type = 4;
}

message WsSceneMessage {
oneof message {
// direction: scene -> explorer
UpdateScene update_scene = 1;
UpdateModel update_model = 2;
}
}
5 changes: 5 additions & 0 deletions public/sdk-development.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
syntax = "proto3";

package decentraland.sdk.development;

import public "decentraland/sdk/development/local_development.proto";

0 comments on commit 3869a88

Please sign in to comment.