@dcl-regenesislabs/ecs 7.33.1-45439422176.commit-68faa2d → 7.33.1-45462038000.commit-b0a4272
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/dist/components/extended/AvatarEquippedData.js +2 -1
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_base.gen.d.ts +1 -0
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +22 -1
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.js +58 -2
- package/dist/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.d.ts +27 -12
- package/dist-cjs/components/extended/AvatarEquippedData.js +2 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_base.gen.d.ts +1 -0
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +22 -1
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.js +59 -3
- package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_shape.gen.d.ts +27 -12
- package/package.json +1 -1
|
@@ -4,7 +4,8 @@ export function defineAvatarEquippedDataComponent(engine) {
|
|
|
4
4
|
const origSerialize = patchedSchema.serialize;
|
|
5
5
|
// `??` also covers a `null` written through getMutable
|
|
6
6
|
patchedSchema.serialize = (value, builder) => {
|
|
7
|
-
|
|
7
|
+
// a composite written before `wearables` existed carries none
|
|
8
|
+
origSerialize({ ...value, wearables: value.wearables ?? [], forceRender: value.forceRender ?? [] }, builder);
|
|
8
9
|
};
|
|
9
10
|
const theComponent = engine.defineComponentFromSchema('core::AvatarEquippedData', patchedSchema);
|
|
10
11
|
return theComponent;
|
|
@@ -10,6 +10,7 @@ export interface PBAvatarBase {
|
|
|
10
10
|
hairColor: Color3 | undefined;
|
|
11
11
|
bodyShapeUrn: string;
|
|
12
12
|
name: string;
|
|
13
|
+
/** true while the player is speaking in voice chat; unset when the engine does not report voice activity */
|
|
13
14
|
talking?: boolean | undefined;
|
|
14
15
|
}
|
|
15
16
|
/**
|
package/dist/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import _m0 from "protobufjs/minimal";
|
|
|
2
2
|
/**
|
|
3
3
|
* AvatarEquipData is used to read the information about the avatar's owneables.
|
|
4
4
|
* this component is written by the engine using the communications transports'
|
|
5
|
-
* data.
|
|
5
|
+
* data. It describes the outfit in the player's profile.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -10,9 +10,23 @@ import _m0 from "protobufjs/minimal";
|
|
|
10
10
|
export interface PBAvatarEquippedData {
|
|
11
11
|
wearableUrns: string[];
|
|
12
12
|
emoteUrns: string[];
|
|
13
|
+
/** one per item of wearable_urns, in the same order */
|
|
14
|
+
wearables: PBAvatarEquippedData_EquippedWearable[];
|
|
13
15
|
/** slots that will render even if hidden */
|
|
14
16
|
forceRender: string[];
|
|
15
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export interface PBAvatarEquippedData_EquippedWearable {
|
|
22
|
+
urn: string;
|
|
23
|
+
/**
|
|
24
|
+
* true if the wearable is visible in the profile outfit, after hides, replaces and force render apply.
|
|
25
|
+
* Of two wearables with the same category, the later one is used: the earlier one is false and hides nothing.
|
|
26
|
+
* Unset until all the wearables of the outfit have loaded or failed. A wearable that failed to load is false.
|
|
27
|
+
*/
|
|
28
|
+
visible?: boolean | undefined;
|
|
29
|
+
}
|
|
16
30
|
/**
|
|
17
31
|
* @public
|
|
18
32
|
*/
|
|
@@ -20,3 +34,10 @@ export declare namespace PBAvatarEquippedData {
|
|
|
20
34
|
function encode(message: PBAvatarEquippedData, writer?: _m0.Writer): _m0.Writer;
|
|
21
35
|
function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
|
22
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare namespace PBAvatarEquippedData_EquippedWearable {
|
|
41
|
+
function encode(message: PBAvatarEquippedData_EquippedWearable, writer?: _m0.Writer): _m0.Writer;
|
|
42
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData_EquippedWearable;
|
|
43
|
+
}
|
package/dist/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
3
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
4
4
|
function createBasePBAvatarEquippedData() {
|
|
5
|
-
return { wearableUrns: [], emoteUrns: [], forceRender: [] };
|
|
5
|
+
return { wearableUrns: [], emoteUrns: [], wearables: [], forceRender: [] };
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -16,8 +16,11 @@ export var PBAvatarEquippedData;
|
|
|
16
16
|
for (const v of message.emoteUrns) {
|
|
17
17
|
writer.uint32(18).string(v);
|
|
18
18
|
}
|
|
19
|
+
for (const v of message.wearables) {
|
|
20
|
+
PBAvatarEquippedData_EquippedWearable.encode(v, writer.uint32(26).fork()).ldelim();
|
|
21
|
+
}
|
|
19
22
|
for (const v of message.forceRender) {
|
|
20
|
-
writer.uint32(
|
|
23
|
+
writer.uint32(34).string(v);
|
|
21
24
|
}
|
|
22
25
|
return writer;
|
|
23
26
|
}
|
|
@@ -45,6 +48,12 @@ export var PBAvatarEquippedData;
|
|
|
45
48
|
if (tag !== 26) {
|
|
46
49
|
break;
|
|
47
50
|
}
|
|
51
|
+
message.wearables.push(PBAvatarEquippedData_EquippedWearable.decode(reader, reader.uint32()));
|
|
52
|
+
continue;
|
|
53
|
+
case 4:
|
|
54
|
+
if (tag !== 34) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
48
57
|
message.forceRender.push(reader.string());
|
|
49
58
|
continue;
|
|
50
59
|
}
|
|
@@ -57,3 +66,50 @@ export var PBAvatarEquippedData;
|
|
|
57
66
|
}
|
|
58
67
|
PBAvatarEquippedData.decode = decode;
|
|
59
68
|
})(PBAvatarEquippedData || (PBAvatarEquippedData = {}));
|
|
69
|
+
function createBasePBAvatarEquippedData_EquippedWearable() {
|
|
70
|
+
return { urn: "", visible: undefined };
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export var PBAvatarEquippedData_EquippedWearable;
|
|
76
|
+
(function (PBAvatarEquippedData_EquippedWearable) {
|
|
77
|
+
function encode(message, writer = _m0.Writer.create()) {
|
|
78
|
+
if (message.urn !== "") {
|
|
79
|
+
writer.uint32(10).string(message.urn);
|
|
80
|
+
}
|
|
81
|
+
if (message.visible !== undefined) {
|
|
82
|
+
writer.uint32(16).bool(message.visible);
|
|
83
|
+
}
|
|
84
|
+
return writer;
|
|
85
|
+
}
|
|
86
|
+
PBAvatarEquippedData_EquippedWearable.encode = encode;
|
|
87
|
+
function decode(input, length) {
|
|
88
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
89
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
90
|
+
const message = createBasePBAvatarEquippedData_EquippedWearable();
|
|
91
|
+
while (reader.pos < end) {
|
|
92
|
+
const tag = reader.uint32();
|
|
93
|
+
switch (tag >>> 3) {
|
|
94
|
+
case 1:
|
|
95
|
+
if (tag !== 10) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
message.urn = reader.string();
|
|
99
|
+
continue;
|
|
100
|
+
case 2:
|
|
101
|
+
if (tag !== 16) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
message.visible = reader.bool();
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
reader.skipType(tag & 7);
|
|
111
|
+
}
|
|
112
|
+
return message;
|
|
113
|
+
}
|
|
114
|
+
PBAvatarEquippedData_EquippedWearable.decode = decode;
|
|
115
|
+
})(PBAvatarEquippedData_EquippedWearable || (PBAvatarEquippedData_EquippedWearable = {}));
|
|
@@ -4,19 +4,29 @@ import { Color3 } from "../../common/colors.gen";
|
|
|
4
4
|
* The AvatarShape component contains the information required to draw and animate avatar, acting as
|
|
5
5
|
* a simplified GLTF container for this specific case.
|
|
6
6
|
*
|
|
7
|
-
* All fields (except ID) are optional have reasonable default values. In the case of `wearables`,
|
|
7
|
+
* All fields (except ID) are optional and have reasonable default values. In the case of `wearables`,
|
|
8
8
|
* each slot on the Avatar's body that is not explicitly included in the list has its own default.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* On most entities, AvatarShape draws an avatar, for example an NPC. Other requirements are usually
|
|
11
|
+
* better served by GLTFs.
|
|
12
|
+
*
|
|
13
|
+
* On a player entity (`engine.PlayerEntity` or the entity of another player), AvatarShape changes the
|
|
14
|
+
* look of that player's avatar:
|
|
15
|
+
* - An unset field keeps the value from the player's profile. The defaults below apply only to other entities.
|
|
16
|
+
* - A non-empty `wearables` replaces all the wearables. A body slot that it does not fill stays empty.
|
|
17
|
+
* An empty `wearables` is the same as unset.
|
|
18
|
+
* - Fields marked "ignored on player entities" have no effect.
|
|
19
|
+
* - The change is local to this client. It is not broadcast.
|
|
20
|
+
* - The change applies only while the scene that wrote it is the current scene.
|
|
21
|
+
* - AvatarBase and AvatarEquippedData keep the values from the profile.
|
|
12
22
|
*/
|
|
13
23
|
/**
|
|
14
24
|
* @public
|
|
15
25
|
*/
|
|
16
26
|
export interface PBAvatarShape {
|
|
17
|
-
/** the user ID */
|
|
27
|
+
/** the user ID; ignored on player entities */
|
|
18
28
|
id: string;
|
|
19
|
-
/** visible name (default: "NPC") */
|
|
29
|
+
/** visible name (default: "NPC"); ignored on player entities */
|
|
20
30
|
name?: string | undefined;
|
|
21
31
|
/** shape URN (default "urn:decentraland:off-chain:base-avatars:BaseFemale") */
|
|
22
32
|
bodyShape?: string | undefined;
|
|
@@ -26,25 +36,30 @@ export interface PBAvatarShape {
|
|
|
26
36
|
hairColor?: Color3 | undefined;
|
|
27
37
|
/** RGB (default [0.6, 0.462, 0.356]) */
|
|
28
38
|
eyeColor?: Color3 | undefined;
|
|
29
|
-
/** current emote animations */
|
|
39
|
+
/** current emote animations; ignored on player entities */
|
|
30
40
|
expressionTriggerId?: string | undefined;
|
|
31
|
-
/** start of emote animations (in the same order) */
|
|
41
|
+
/** start of emote animations (in the same order); ignored on player entities */
|
|
32
42
|
expressionTriggerTimestamp?: number | undefined;
|
|
33
|
-
/** whether to display the floating voice chat icon */
|
|
43
|
+
/** whether to display the floating voice chat icon; ignored on player entities */
|
|
34
44
|
talking?: boolean | undefined;
|
|
35
45
|
/**
|
|
36
|
-
*
|
|
46
|
+
* Wearables, one per body slot. Each item is one of:
|
|
47
|
+
* - a wearable URN
|
|
48
|
+
* - the path of a GLB file in the scene content, named `<name>_<category>.glb`, for example `cap_hat.glb`
|
|
49
|
+
* If two items have the same category, the later item is used.
|
|
50
|
+
* A scene GLB is always visible and hides nothing. Exception: a `skin` GLB hides the body that it replaces.
|
|
51
|
+
* If an item is not a URN or a `.glb` path, or if it cannot be loaded, the item is skipped.
|
|
37
52
|
* Default values for each unspecified slot:
|
|
38
53
|
* Eyes : "urn:decentraland:off-chain:base-avatars:f_eyes_00",
|
|
39
54
|
* Eyebrows: "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
|
|
40
|
-
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00"
|
|
55
|
+
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00",
|
|
41
56
|
* Hair : "urn:decentraland:off-chain:base-avatars:standard_hair",
|
|
42
57
|
* Shirt : "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
|
|
43
58
|
* Trousers: "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
|
|
44
|
-
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
59
|
+
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
45
60
|
*/
|
|
46
61
|
wearables: string[];
|
|
47
|
-
/** available emotes (default empty) */
|
|
62
|
+
/** available emotes (default empty); ignored on player entities */
|
|
48
63
|
emotes: string[];
|
|
49
64
|
/** hides the skin + hair + facial features (default: false) */
|
|
50
65
|
showOnlyWearables?: boolean | undefined;
|
|
@@ -7,7 +7,8 @@ function defineAvatarEquippedDataComponent(engine) {
|
|
|
7
7
|
const origSerialize = patchedSchema.serialize;
|
|
8
8
|
// `??` also covers a `null` written through getMutable
|
|
9
9
|
patchedSchema.serialize = (value, builder) => {
|
|
10
|
-
|
|
10
|
+
// a composite written before `wearables` existed carries none
|
|
11
|
+
origSerialize({ ...value, wearables: value.wearables ?? [], forceRender: value.forceRender ?? [] }, builder);
|
|
11
12
|
};
|
|
12
13
|
const theComponent = engine.defineComponentFromSchema('core::AvatarEquippedData', patchedSchema);
|
|
13
14
|
return theComponent;
|
|
@@ -10,6 +10,7 @@ export interface PBAvatarBase {
|
|
|
10
10
|
hairColor: Color3 | undefined;
|
|
11
11
|
bodyShapeUrn: string;
|
|
12
12
|
name: string;
|
|
13
|
+
/** true while the player is speaking in voice chat; unset when the engine does not report voice activity */
|
|
13
14
|
talking?: boolean | undefined;
|
|
14
15
|
}
|
|
15
16
|
/**
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import _m0 from "protobufjs/minimal";
|
|
|
2
2
|
/**
|
|
3
3
|
* AvatarEquipData is used to read the information about the avatar's owneables.
|
|
4
4
|
* this component is written by the engine using the communications transports'
|
|
5
|
-
* data.
|
|
5
|
+
* data. It describes the outfit in the player's profile.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -10,9 +10,23 @@ import _m0 from "protobufjs/minimal";
|
|
|
10
10
|
export interface PBAvatarEquippedData {
|
|
11
11
|
wearableUrns: string[];
|
|
12
12
|
emoteUrns: string[];
|
|
13
|
+
/** one per item of wearable_urns, in the same order */
|
|
14
|
+
wearables: PBAvatarEquippedData_EquippedWearable[];
|
|
13
15
|
/** slots that will render even if hidden */
|
|
14
16
|
forceRender: string[];
|
|
15
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export interface PBAvatarEquippedData_EquippedWearable {
|
|
22
|
+
urn: string;
|
|
23
|
+
/**
|
|
24
|
+
* true if the wearable is visible in the profile outfit, after hides, replaces and force render apply.
|
|
25
|
+
* Of two wearables with the same category, the later one is used: the earlier one is false and hides nothing.
|
|
26
|
+
* Unset until all the wearables of the outfit have loaded or failed. A wearable that failed to load is false.
|
|
27
|
+
*/
|
|
28
|
+
visible?: boolean | undefined;
|
|
29
|
+
}
|
|
16
30
|
/**
|
|
17
31
|
* @public
|
|
18
32
|
*/
|
|
@@ -20,3 +34,10 @@ export declare namespace PBAvatarEquippedData {
|
|
|
20
34
|
function encode(message: PBAvatarEquippedData, writer?: _m0.Writer): _m0.Writer;
|
|
21
35
|
function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData;
|
|
22
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export declare namespace PBAvatarEquippedData_EquippedWearable {
|
|
41
|
+
function encode(message: PBAvatarEquippedData_EquippedWearable, writer?: _m0.Writer): _m0.Writer;
|
|
42
|
+
function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData_EquippedWearable;
|
|
43
|
+
}
|
package/dist-cjs/components/generated/pb/decentraland/sdk/components/avatar_equipped_data.gen.js
CHANGED
|
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PBAvatarEquippedData = void 0;
|
|
6
|
+
exports.PBAvatarEquippedData_EquippedWearable = exports.PBAvatarEquippedData = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
9
|
const protobufPackageSarasa = "decentraland.sdk.components";
|
|
10
10
|
function createBasePBAvatarEquippedData() {
|
|
11
|
-
return { wearableUrns: [], emoteUrns: [], forceRender: [] };
|
|
11
|
+
return { wearableUrns: [], emoteUrns: [], wearables: [], forceRender: [] };
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* @public
|
|
@@ -22,8 +22,11 @@ var PBAvatarEquippedData;
|
|
|
22
22
|
for (const v of message.emoteUrns) {
|
|
23
23
|
writer.uint32(18).string(v);
|
|
24
24
|
}
|
|
25
|
+
for (const v of message.wearables) {
|
|
26
|
+
PBAvatarEquippedData_EquippedWearable.encode(v, writer.uint32(26).fork()).ldelim();
|
|
27
|
+
}
|
|
25
28
|
for (const v of message.forceRender) {
|
|
26
|
-
writer.uint32(
|
|
29
|
+
writer.uint32(34).string(v);
|
|
27
30
|
}
|
|
28
31
|
return writer;
|
|
29
32
|
}
|
|
@@ -51,6 +54,12 @@ var PBAvatarEquippedData;
|
|
|
51
54
|
if (tag !== 26) {
|
|
52
55
|
break;
|
|
53
56
|
}
|
|
57
|
+
message.wearables.push(PBAvatarEquippedData_EquippedWearable.decode(reader, reader.uint32()));
|
|
58
|
+
continue;
|
|
59
|
+
case 4:
|
|
60
|
+
if (tag !== 34) {
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
54
63
|
message.forceRender.push(reader.string());
|
|
55
64
|
continue;
|
|
56
65
|
}
|
|
@@ -63,3 +72,50 @@ var PBAvatarEquippedData;
|
|
|
63
72
|
}
|
|
64
73
|
PBAvatarEquippedData.decode = decode;
|
|
65
74
|
})(PBAvatarEquippedData = exports.PBAvatarEquippedData || (exports.PBAvatarEquippedData = {}));
|
|
75
|
+
function createBasePBAvatarEquippedData_EquippedWearable() {
|
|
76
|
+
return { urn: "", visible: undefined };
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
var PBAvatarEquippedData_EquippedWearable;
|
|
82
|
+
(function (PBAvatarEquippedData_EquippedWearable) {
|
|
83
|
+
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
84
|
+
if (message.urn !== "") {
|
|
85
|
+
writer.uint32(10).string(message.urn);
|
|
86
|
+
}
|
|
87
|
+
if (message.visible !== undefined) {
|
|
88
|
+
writer.uint32(16).bool(message.visible);
|
|
89
|
+
}
|
|
90
|
+
return writer;
|
|
91
|
+
}
|
|
92
|
+
PBAvatarEquippedData_EquippedWearable.encode = encode;
|
|
93
|
+
function decode(input, length) {
|
|
94
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
95
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
96
|
+
const message = createBasePBAvatarEquippedData_EquippedWearable();
|
|
97
|
+
while (reader.pos < end) {
|
|
98
|
+
const tag = reader.uint32();
|
|
99
|
+
switch (tag >>> 3) {
|
|
100
|
+
case 1:
|
|
101
|
+
if (tag !== 10) {
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
message.urn = reader.string();
|
|
105
|
+
continue;
|
|
106
|
+
case 2:
|
|
107
|
+
if (tag !== 16) {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
message.visible = reader.bool();
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
reader.skipType(tag & 7);
|
|
117
|
+
}
|
|
118
|
+
return message;
|
|
119
|
+
}
|
|
120
|
+
PBAvatarEquippedData_EquippedWearable.decode = decode;
|
|
121
|
+
})(PBAvatarEquippedData_EquippedWearable = exports.PBAvatarEquippedData_EquippedWearable || (exports.PBAvatarEquippedData_EquippedWearable = {}));
|
|
@@ -4,19 +4,29 @@ import { Color3 } from "../../common/colors.gen";
|
|
|
4
4
|
* The AvatarShape component contains the information required to draw and animate avatar, acting as
|
|
5
5
|
* a simplified GLTF container for this specific case.
|
|
6
6
|
*
|
|
7
|
-
* All fields (except ID) are optional have reasonable default values. In the case of `wearables`,
|
|
7
|
+
* All fields (except ID) are optional and have reasonable default values. In the case of `wearables`,
|
|
8
8
|
* each slot on the Avatar's body that is not explicitly included in the list has its own default.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* On most entities, AvatarShape draws an avatar, for example an NPC. Other requirements are usually
|
|
11
|
+
* better served by GLTFs.
|
|
12
|
+
*
|
|
13
|
+
* On a player entity (`engine.PlayerEntity` or the entity of another player), AvatarShape changes the
|
|
14
|
+
* look of that player's avatar:
|
|
15
|
+
* - An unset field keeps the value from the player's profile. The defaults below apply only to other entities.
|
|
16
|
+
* - A non-empty `wearables` replaces all the wearables. A body slot that it does not fill stays empty.
|
|
17
|
+
* An empty `wearables` is the same as unset.
|
|
18
|
+
* - Fields marked "ignored on player entities" have no effect.
|
|
19
|
+
* - The change is local to this client. It is not broadcast.
|
|
20
|
+
* - The change applies only while the scene that wrote it is the current scene.
|
|
21
|
+
* - AvatarBase and AvatarEquippedData keep the values from the profile.
|
|
12
22
|
*/
|
|
13
23
|
/**
|
|
14
24
|
* @public
|
|
15
25
|
*/
|
|
16
26
|
export interface PBAvatarShape {
|
|
17
|
-
/** the user ID */
|
|
27
|
+
/** the user ID; ignored on player entities */
|
|
18
28
|
id: string;
|
|
19
|
-
/** visible name (default: "NPC") */
|
|
29
|
+
/** visible name (default: "NPC"); ignored on player entities */
|
|
20
30
|
name?: string | undefined;
|
|
21
31
|
/** shape URN (default "urn:decentraland:off-chain:base-avatars:BaseFemale") */
|
|
22
32
|
bodyShape?: string | undefined;
|
|
@@ -26,25 +36,30 @@ export interface PBAvatarShape {
|
|
|
26
36
|
hairColor?: Color3 | undefined;
|
|
27
37
|
/** RGB (default [0.6, 0.462, 0.356]) */
|
|
28
38
|
eyeColor?: Color3 | undefined;
|
|
29
|
-
/** current emote animations */
|
|
39
|
+
/** current emote animations; ignored on player entities */
|
|
30
40
|
expressionTriggerId?: string | undefined;
|
|
31
|
-
/** start of emote animations (in the same order) */
|
|
41
|
+
/** start of emote animations (in the same order); ignored on player entities */
|
|
32
42
|
expressionTriggerTimestamp?: number | undefined;
|
|
33
|
-
/** whether to display the floating voice chat icon */
|
|
43
|
+
/** whether to display the floating voice chat icon; ignored on player entities */
|
|
34
44
|
talking?: boolean | undefined;
|
|
35
45
|
/**
|
|
36
|
-
*
|
|
46
|
+
* Wearables, one per body slot. Each item is one of:
|
|
47
|
+
* - a wearable URN
|
|
48
|
+
* - the path of a GLB file in the scene content, named `<name>_<category>.glb`, for example `cap_hat.glb`
|
|
49
|
+
* If two items have the same category, the later item is used.
|
|
50
|
+
* A scene GLB is always visible and hides nothing. Exception: a `skin` GLB hides the body that it replaces.
|
|
51
|
+
* If an item is not a URN or a `.glb` path, or if it cannot be loaded, the item is skipped.
|
|
37
52
|
* Default values for each unspecified slot:
|
|
38
53
|
* Eyes : "urn:decentraland:off-chain:base-avatars:f_eyes_00",
|
|
39
54
|
* Eyebrows: "urn:decentraland:off-chain:base-avatars:f_eyebrows_00",
|
|
40
|
-
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00"
|
|
55
|
+
* Mouth : "urn:decentraland:off-chain:base-avatars:f_mouth_00",
|
|
41
56
|
* Hair : "urn:decentraland:off-chain:base-avatars:standard_hair",
|
|
42
57
|
* Shirt : "urn:decentraland:off-chain:base-avatars:f_simple_yellow_tshirt",
|
|
43
58
|
* Trousers: "urn:decentraland:off-chain:base-avatars:f_brown_trousers",
|
|
44
|
-
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
59
|
+
* Shoes : "urn:decentraland:off-chain:base-avatars:bun_shoes"
|
|
45
60
|
*/
|
|
46
61
|
wearables: string[];
|
|
47
|
-
/** available emotes (default empty) */
|
|
62
|
+
/** available emotes (default empty); ignored on player entities */
|
|
48
63
|
emotes: string[];
|
|
49
64
|
/** hides the skin + hair + facial features (default: false) */
|
|
50
65
|
showOnlyWearables?: boolean | undefined;
|
package/package.json
CHANGED