Skip to content
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
37 changes: 37 additions & 0 deletions proto/decentraland/sdk/components/avatar_nametag.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
syntax = "proto3";

package decentraland.sdk.components;

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

option (common.ecs_component_id) = 1221;

// The AvatarNametag component adds a plate with scene-provided text above an avatar's nametag,
// for example to show a rank or a role that the scene assigns to that player.
//
// It has to be attached to an avatar-bearing entity: `engine.PlayerEntity` for the local player,
// the entity of a player in the scene, or an entity with an AvatarShape. On any other entity it
// is ignored. The client owns the player entities and reuses their ids after players disconnect,
// so resolve the entity from the user id on every write, and remove the component when the
// player leaves the scene - a later write to a stale entity lands on whoever holds that id next.
//
// The plate does not replace the avatar's name. It is drawn above the nametag as its own line,
// and it stays visible while the name itself is hidden by AMT_HIDE_NAMETAGS. It does follow the
// client's nametag visibility setting: a player who turns nametags off sees no plates either.
// Removing the component, or the entity, removes the plate.
//
// The plate is local to the client that renders it and is never relayed to other players. A
// scene that wants everyone to see the same plate has to distribute it through its own state.
// Only the scene the local player is currently standing in shows plates; writes from other
// loaded scenes and from portable experiences are ignored.
message PBAvatarNametag {
// The plate content: one short line, for example "Club Owner". The client renders it on a
// single line and truncates it with an ellipsis to fit the plate; multi-line text is not
// supported. An empty string hides the plate.
string label = 1;

optional decentraland.common.Color3 label_color = 2; // (default: the client's native nametag text color)
optional decentraland.common.Color3 background_color = 3; // (default: the client's native nametag background color)
optional decentraland.common.Color3 border_color = 4; // (default: background_color, so the plate carries no visible border)
}
1 change: 1 addition & 0 deletions public/sdk-components.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import public "decentraland/sdk/components/avatar_base.proto";
import public "decentraland/sdk/components/avatar_emote_command.proto";
import public "decentraland/sdk/components/avatar_equipped_data.proto";
import public "decentraland/sdk/components/avatar_modifier_area.proto";
import public "decentraland/sdk/components/avatar_nametag.proto";
import public "decentraland/sdk/components/avatar_shape.proto";
import public "decentraland/sdk/components/billboard.proto";
import public "decentraland/sdk/components/camera_mode_area.proto";
Expand Down
Loading