@dcl/protocol 1.0.0-33413306233.commit-16d337c → 1.0.0-33414396137.commit-4ed8d74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/public/sdk-components.proto +0 -1
- package/out-js/decentraland/sdk/components/avatar_nametag.gen.d.ts +0 -54
- package/out-js/decentraland/sdk/components/avatar_nametag.gen.js +0 -117
- package/out-js/decentraland/sdk/components/avatar_nametag.gen.js.map +0 -1
- package/out-ts/decentraland/sdk/components/avatar_nametag.gen.ts +0 -158
- package/proto/decentraland/sdk/components/avatar_nametag.proto +0 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-33414396137.commit-4ed8d74",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"protoc-gen-bitwise/*.js",
|
|
37
37
|
"protoc-gen-bitwise/runtime"
|
|
38
38
|
],
|
|
39
|
-
"commit": "
|
|
39
|
+
"commit": "4ed8d744ac8e2177cbbfbd3f2d8269ad24de8484"
|
|
40
40
|
}
|
|
@@ -9,7 +9,6 @@ import public "decentraland/sdk/components/avatar_base.proto";
|
|
|
9
9
|
import public "decentraland/sdk/components/avatar_emote_command.proto";
|
|
10
10
|
import public "decentraland/sdk/components/avatar_equipped_data.proto";
|
|
11
11
|
import public "decentraland/sdk/components/avatar_modifier_area.proto";
|
|
12
|
-
import public "decentraland/sdk/components/avatar_nametag.proto";
|
|
13
12
|
import public "decentraland/sdk/components/avatar_shape.proto";
|
|
14
13
|
import public "decentraland/sdk/components/billboard.proto";
|
|
15
14
|
import public "decentraland/sdk/components/camera_mode_area.proto";
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import _m0 from "protobufjs/minimal";
|
|
2
|
-
import { Color3 } from "../../common/colors.gen";
|
|
3
|
-
export declare const protobufPackage = "decentraland.sdk.components";
|
|
4
|
-
/**
|
|
5
|
-
* The AvatarNametag component adds a plate with scene-provided text above an avatar's nametag,
|
|
6
|
-
* for example to show a rank or a role that the scene assigns to that player.
|
|
7
|
-
*
|
|
8
|
-
* Valid only on an avatar-bearing entity:
|
|
9
|
-
* - the local player: `engine.PlayerEntity`
|
|
10
|
-
* - another player in the scene: that player's entity
|
|
11
|
-
* - an NPC: any entity with an AvatarShape
|
|
12
|
-
* Writes to any other entity are ignored.
|
|
13
|
-
*
|
|
14
|
-
* Player entity ids are not stable across disconnects: a write to a stale entity lands on
|
|
15
|
-
* whoever holds that id next. Resolve the entity from the user id on every write, and remove
|
|
16
|
-
* the component when the player leaves the scene.
|
|
17
|
-
*
|
|
18
|
-
* The plate is local to the client that renders it; it is never relayed to other players.
|
|
19
|
-
*/
|
|
20
|
-
export interface PBAvatarNametag {
|
|
21
|
-
/** The plate text: a single line, for example "Club Owner". Empty draws the plate without text. */
|
|
22
|
-
label: string;
|
|
23
|
-
/** (default: the client's native nametag text color) */
|
|
24
|
-
labelColor?: Color3 | undefined;
|
|
25
|
-
/** (default: the client's native nametag background color) */
|
|
26
|
-
backgroundColor?: Color3 | undefined;
|
|
27
|
-
/** (default: background_color, so the plate carries no visible border) */
|
|
28
|
-
borderColor?: Color3 | undefined;
|
|
29
|
-
}
|
|
30
|
-
export declare namespace PBAvatarNametag {
|
|
31
|
-
function encode(message: PBAvatarNametag, writer?: _m0.Writer): _m0.Writer;
|
|
32
|
-
function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarNametag;
|
|
33
|
-
function fromJSON(object: any): PBAvatarNametag;
|
|
34
|
-
function toJSON(message: PBAvatarNametag): unknown;
|
|
35
|
-
function create<I extends Exact<DeepPartial<PBAvatarNametag>, I>>(base?: I): PBAvatarNametag;
|
|
36
|
-
function fromPartial<I extends Exact<DeepPartial<PBAvatarNametag>, I>>(object: I): PBAvatarNametag;
|
|
37
|
-
}
|
|
38
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
39
|
-
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
|
|
40
|
-
$case: string;
|
|
41
|
-
} ? {
|
|
42
|
-
[K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
|
|
43
|
-
} & {
|
|
44
|
-
$case: T["$case"];
|
|
45
|
-
} : T extends {} ? {
|
|
46
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
47
|
-
} : Partial<T>;
|
|
48
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
49
|
-
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
50
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
51
|
-
} & {
|
|
52
|
-
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
53
|
-
};
|
|
54
|
-
export {};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PBAvatarNametag = exports.protobufPackage = void 0;
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
-
const colors_gen_1 = require("../../common/colors.gen");
|
|
10
|
-
exports.protobufPackage = "decentraland.sdk.components";
|
|
11
|
-
function createBasePBAvatarNametag() {
|
|
12
|
-
return { label: "", labelColor: undefined, backgroundColor: undefined, borderColor: undefined };
|
|
13
|
-
}
|
|
14
|
-
var PBAvatarNametag;
|
|
15
|
-
(function (PBAvatarNametag) {
|
|
16
|
-
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
17
|
-
if (message.label !== "") {
|
|
18
|
-
writer.uint32(10).string(message.label);
|
|
19
|
-
}
|
|
20
|
-
if (message.labelColor !== undefined) {
|
|
21
|
-
colors_gen_1.Color3.encode(message.labelColor, writer.uint32(18).fork()).ldelim();
|
|
22
|
-
}
|
|
23
|
-
if (message.backgroundColor !== undefined) {
|
|
24
|
-
colors_gen_1.Color3.encode(message.backgroundColor, writer.uint32(26).fork()).ldelim();
|
|
25
|
-
}
|
|
26
|
-
if (message.borderColor !== undefined) {
|
|
27
|
-
colors_gen_1.Color3.encode(message.borderColor, writer.uint32(34).fork()).ldelim();
|
|
28
|
-
}
|
|
29
|
-
return writer;
|
|
30
|
-
}
|
|
31
|
-
PBAvatarNametag.encode = encode;
|
|
32
|
-
function decode(input, length) {
|
|
33
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
34
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
35
|
-
const message = createBasePBAvatarNametag();
|
|
36
|
-
while (reader.pos < end) {
|
|
37
|
-
const tag = reader.uint32();
|
|
38
|
-
switch (tag >>> 3) {
|
|
39
|
-
case 1:
|
|
40
|
-
if (tag !== 10) {
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
message.label = reader.string();
|
|
44
|
-
continue;
|
|
45
|
-
case 2:
|
|
46
|
-
if (tag !== 18) {
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
message.labelColor = colors_gen_1.Color3.decode(reader, reader.uint32());
|
|
50
|
-
continue;
|
|
51
|
-
case 3:
|
|
52
|
-
if (tag !== 26) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
message.backgroundColor = colors_gen_1.Color3.decode(reader, reader.uint32());
|
|
56
|
-
continue;
|
|
57
|
-
case 4:
|
|
58
|
-
if (tag !== 34) {
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
message.borderColor = colors_gen_1.Color3.decode(reader, reader.uint32());
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
reader.skipType(tag & 7);
|
|
68
|
-
}
|
|
69
|
-
return message;
|
|
70
|
-
}
|
|
71
|
-
PBAvatarNametag.decode = decode;
|
|
72
|
-
function fromJSON(object) {
|
|
73
|
-
return {
|
|
74
|
-
label: isSet(object.label) ? String(object.label) : "",
|
|
75
|
-
labelColor: isSet(object.labelColor) ? colors_gen_1.Color3.fromJSON(object.labelColor) : undefined,
|
|
76
|
-
backgroundColor: isSet(object.backgroundColor) ? colors_gen_1.Color3.fromJSON(object.backgroundColor) : undefined,
|
|
77
|
-
borderColor: isSet(object.borderColor) ? colors_gen_1.Color3.fromJSON(object.borderColor) : undefined,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
PBAvatarNametag.fromJSON = fromJSON;
|
|
81
|
-
function toJSON(message) {
|
|
82
|
-
const obj = {};
|
|
83
|
-
message.label !== undefined && (obj.label = message.label);
|
|
84
|
-
message.labelColor !== undefined &&
|
|
85
|
-
(obj.labelColor = message.labelColor ? colors_gen_1.Color3.toJSON(message.labelColor) : undefined);
|
|
86
|
-
message.backgroundColor !== undefined &&
|
|
87
|
-
(obj.backgroundColor = message.backgroundColor ? colors_gen_1.Color3.toJSON(message.backgroundColor) : undefined);
|
|
88
|
-
message.borderColor !== undefined &&
|
|
89
|
-
(obj.borderColor = message.borderColor ? colors_gen_1.Color3.toJSON(message.borderColor) : undefined);
|
|
90
|
-
return obj;
|
|
91
|
-
}
|
|
92
|
-
PBAvatarNametag.toJSON = toJSON;
|
|
93
|
-
function create(base) {
|
|
94
|
-
return PBAvatarNametag.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
95
|
-
}
|
|
96
|
-
PBAvatarNametag.create = create;
|
|
97
|
-
function fromPartial(object) {
|
|
98
|
-
var _a;
|
|
99
|
-
const message = createBasePBAvatarNametag();
|
|
100
|
-
message.label = (_a = object.label) !== null && _a !== void 0 ? _a : "";
|
|
101
|
-
message.labelColor = (object.labelColor !== undefined && object.labelColor !== null)
|
|
102
|
-
? colors_gen_1.Color3.fromPartial(object.labelColor)
|
|
103
|
-
: undefined;
|
|
104
|
-
message.backgroundColor = (object.backgroundColor !== undefined && object.backgroundColor !== null)
|
|
105
|
-
? colors_gen_1.Color3.fromPartial(object.backgroundColor)
|
|
106
|
-
: undefined;
|
|
107
|
-
message.borderColor = (object.borderColor !== undefined && object.borderColor !== null)
|
|
108
|
-
? colors_gen_1.Color3.fromPartial(object.borderColor)
|
|
109
|
-
: undefined;
|
|
110
|
-
return message;
|
|
111
|
-
}
|
|
112
|
-
PBAvatarNametag.fromPartial = fromPartial;
|
|
113
|
-
})(PBAvatarNametag || (exports.PBAvatarNametag = PBAvatarNametag = {}));
|
|
114
|
-
function isSet(value) {
|
|
115
|
-
return value !== null && value !== undefined;
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=avatar_nametag.gen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar_nametag.gen.js","sourceRoot":"","sources":["../../../../out-ts/decentraland/sdk/components/avatar_nametag.gen.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,iEAAqC;AACrC,wDAAiD;AAEpC,QAAA,eAAe,GAAG,6BAA6B,CAAC;AAiC7D,SAAS,yBAAyB;IAChC,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;AAClG,CAAC;AAED,IAAiB,eAAe,CAoG/B;AApGD,WAAiB,eAAe;IAC9B,SAAgB,MAAM,CAAC,OAAwB,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QACvF,IAAI,OAAO,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;YACzB,MAAM,CAAC,MAAM,CAAC,EAAE,CA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}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Color3 } from "../../common/colors.gen";
|
|
4
|
-
|
|
5
|
-
export const protobufPackage = "decentraland.sdk.components";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The AvatarNametag component adds a plate with scene-provided text above an avatar's nametag,
|
|
9
|
-
* for example to show a rank or a role that the scene assigns to that player.
|
|
10
|
-
*
|
|
11
|
-
* Valid only on an avatar-bearing entity:
|
|
12
|
-
* - the local player: `engine.PlayerEntity`
|
|
13
|
-
* - another player in the scene: that player's entity
|
|
14
|
-
* - an NPC: any entity with an AvatarShape
|
|
15
|
-
* Writes to any other entity are ignored.
|
|
16
|
-
*
|
|
17
|
-
* Player entity ids are not stable across disconnects: a write to a stale entity lands on
|
|
18
|
-
* whoever holds that id next. Resolve the entity from the user id on every write, and remove
|
|
19
|
-
* the component when the player leaves the scene.
|
|
20
|
-
*
|
|
21
|
-
* The plate is local to the client that renders it; it is never relayed to other players.
|
|
22
|
-
*/
|
|
23
|
-
export interface PBAvatarNametag {
|
|
24
|
-
/** The plate text: a single line, for example "Club Owner". Empty draws the plate without text. */
|
|
25
|
-
label: string;
|
|
26
|
-
/** (default: the client's native nametag text color) */
|
|
27
|
-
labelColor?:
|
|
28
|
-
| Color3
|
|
29
|
-
| undefined;
|
|
30
|
-
/** (default: the client's native nametag background color) */
|
|
31
|
-
backgroundColor?:
|
|
32
|
-
| Color3
|
|
33
|
-
| undefined;
|
|
34
|
-
/** (default: background_color, so the plate carries no visible border) */
|
|
35
|
-
borderColor?: Color3 | undefined;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function createBasePBAvatarNametag(): PBAvatarNametag {
|
|
39
|
-
return { label: "", labelColor: undefined, backgroundColor: undefined, borderColor: undefined };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export namespace PBAvatarNametag {
|
|
43
|
-
export function encode(message: PBAvatarNametag, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
44
|
-
if (message.label !== "") {
|
|
45
|
-
writer.uint32(10).string(message.label);
|
|
46
|
-
}
|
|
47
|
-
if (message.labelColor !== undefined) {
|
|
48
|
-
Color3.encode(message.labelColor, writer.uint32(18).fork()).ldelim();
|
|
49
|
-
}
|
|
50
|
-
if (message.backgroundColor !== undefined) {
|
|
51
|
-
Color3.encode(message.backgroundColor, writer.uint32(26).fork()).ldelim();
|
|
52
|
-
}
|
|
53
|
-
if (message.borderColor !== undefined) {
|
|
54
|
-
Color3.encode(message.borderColor, writer.uint32(34).fork()).ldelim();
|
|
55
|
-
}
|
|
56
|
-
return writer;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarNametag {
|
|
60
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
61
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
62
|
-
const message = createBasePBAvatarNametag();
|
|
63
|
-
while (reader.pos < end) {
|
|
64
|
-
const tag = reader.uint32();
|
|
65
|
-
switch (tag >>> 3) {
|
|
66
|
-
case 1:
|
|
67
|
-
if (tag !== 10) {
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
message.label = reader.string();
|
|
72
|
-
continue;
|
|
73
|
-
case 2:
|
|
74
|
-
if (tag !== 18) {
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
message.labelColor = Color3.decode(reader, reader.uint32());
|
|
79
|
-
continue;
|
|
80
|
-
case 3:
|
|
81
|
-
if (tag !== 26) {
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
message.backgroundColor = Color3.decode(reader, reader.uint32());
|
|
86
|
-
continue;
|
|
87
|
-
case 4:
|
|
88
|
-
if (tag !== 34) {
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
message.borderColor = Color3.decode(reader, reader.uint32());
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
reader.skipType(tag & 7);
|
|
99
|
-
}
|
|
100
|
-
return message;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export function fromJSON(object: any): PBAvatarNametag {
|
|
104
|
-
return {
|
|
105
|
-
label: isSet(object.label) ? String(object.label) : "",
|
|
106
|
-
labelColor: isSet(object.labelColor) ? Color3.fromJSON(object.labelColor) : undefined,
|
|
107
|
-
backgroundColor: isSet(object.backgroundColor) ? Color3.fromJSON(object.backgroundColor) : undefined,
|
|
108
|
-
borderColor: isSet(object.borderColor) ? Color3.fromJSON(object.borderColor) : undefined,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export function toJSON(message: PBAvatarNametag): unknown {
|
|
113
|
-
const obj: any = {};
|
|
114
|
-
message.label !== undefined && (obj.label = message.label);
|
|
115
|
-
message.labelColor !== undefined &&
|
|
116
|
-
(obj.labelColor = message.labelColor ? Color3.toJSON(message.labelColor) : undefined);
|
|
117
|
-
message.backgroundColor !== undefined &&
|
|
118
|
-
(obj.backgroundColor = message.backgroundColor ? Color3.toJSON(message.backgroundColor) : undefined);
|
|
119
|
-
message.borderColor !== undefined &&
|
|
120
|
-
(obj.borderColor = message.borderColor ? Color3.toJSON(message.borderColor) : undefined);
|
|
121
|
-
return obj;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export function create<I extends Exact<DeepPartial<PBAvatarNametag>, I>>(base?: I): PBAvatarNametag {
|
|
125
|
-
return PBAvatarNametag.fromPartial(base ?? {});
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export function fromPartial<I extends Exact<DeepPartial<PBAvatarNametag>, I>>(object: I): PBAvatarNametag {
|
|
129
|
-
const message = createBasePBAvatarNametag();
|
|
130
|
-
message.label = object.label ?? "";
|
|
131
|
-
message.labelColor = (object.labelColor !== undefined && object.labelColor !== null)
|
|
132
|
-
? Color3.fromPartial(object.labelColor)
|
|
133
|
-
: undefined;
|
|
134
|
-
message.backgroundColor = (object.backgroundColor !== undefined && object.backgroundColor !== null)
|
|
135
|
-
? Color3.fromPartial(object.backgroundColor)
|
|
136
|
-
: undefined;
|
|
137
|
-
message.borderColor = (object.borderColor !== undefined && object.borderColor !== null)
|
|
138
|
-
? Color3.fromPartial(object.borderColor)
|
|
139
|
-
: undefined;
|
|
140
|
-
return message;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
145
|
-
|
|
146
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
147
|
-
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
148
|
-
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
149
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
150
|
-
: Partial<T>;
|
|
151
|
-
|
|
152
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
153
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
154
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
155
|
-
|
|
156
|
-
function isSet(value: any): boolean {
|
|
157
|
-
return value !== null && value !== undefined;
|
|
158
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package decentraland.sdk.components;
|
|
4
|
-
|
|
5
|
-
import "decentraland/common/colors.proto";
|
|
6
|
-
import "decentraland/sdk/components/common/id.proto";
|
|
7
|
-
|
|
8
|
-
option (common.ecs_component_id) = 1221;
|
|
9
|
-
|
|
10
|
-
// The AvatarNametag component adds a plate with scene-provided text above an avatar's nametag,
|
|
11
|
-
// for example to show a rank or a role that the scene assigns to that player.
|
|
12
|
-
//
|
|
13
|
-
// Valid only on an avatar-bearing entity:
|
|
14
|
-
// - the local player: `engine.PlayerEntity`
|
|
15
|
-
// - another player in the scene: that player's entity
|
|
16
|
-
// - an NPC: any entity with an AvatarShape
|
|
17
|
-
// Writes to any other entity are ignored.
|
|
18
|
-
//
|
|
19
|
-
// Player entity ids are not stable across disconnects: a write to a stale entity lands on
|
|
20
|
-
// whoever holds that id next. Resolve the entity from the user id on every write, and remove
|
|
21
|
-
// the component when the player leaves the scene.
|
|
22
|
-
//
|
|
23
|
-
// The plate is local to the client that renders it; it is never relayed to other players.
|
|
24
|
-
message PBAvatarNametag {
|
|
25
|
-
// The plate text: a single line, for example "Club Owner". Empty draws the plate without text.
|
|
26
|
-
string label = 1;
|
|
27
|
-
|
|
28
|
-
optional decentraland.common.Color3 label_color = 2; // (default: the client's native nametag text color)
|
|
29
|
-
optional decentraland.common.Color3 background_color = 3; // (default: the client's native nametag background color)
|
|
30
|
-
optional decentraland.common.Color3 border_color = 4; // (default: background_color, so the plate carries no visible border)
|
|
31
|
-
}
|