> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-zh/nei-rong/shi-ti-lei-xing/wearables.md).

# 可穿戴物品

可穿戴物品是 [实体](https://github.com/decentraland/docs/blob/main/contributor/entities/README.md) 其中包含供玩家穿戴并自定义其头像的物品。

该 `可穿戴物品` 玩家的某个字段 [个人资料](https://github.com/decentraland/docs/blob/main/contributor/entity-types/profiles/README.md) 包含一个指向他们当前穿戴物品的指针列表。

每个可穿戴物品都属于一个 *类别*，表示它在头像身体上所占的位置，并且可以隐藏或替换其他类别（例如，长裙可以作为上身服装穿戴，但会完全遮住腿部）。

共有 18 个可穿戴类别，在各种元数据字段中引用： `身体形状`, `hair`, `eyes`, `眉毛`, `面部毛发`, `嘴巴`, `上身`, `下身`, `脚部`, `帽子`, `头盔`, `面具`, `发冠`, `头顶部`, `耳环`, `眼镜`, `skin` 和 `手部穿戴`.

可穿戴实体包含适用于不同身体形状的 GLB 格式文件。

### 指针 <a href="#pointers" id="pointers"></a>

可穿戴物品恰好有一个关联的 [指针](https://github.com/decentraland/docs/blob/main/contributor/pointers/README.md)，它指示了 [collection](https://github.com/decentraland/docs/blob/main/contributor/entity-types/collections/README.md) 它们所属的集合以及其在其中的标识符。

当该可穿戴物品是链上资产时，指针采用如下 URN 形式：

```
urn:decentraland:<blockchain>:collections-v2:<collection address>:<item index>
```

例如， `指针` 链上可穿戴物品的数组如下所示：

```json
{
  "pointers": [
    "urn:decentraland:matic:collections-v2:0x2d9560df9dd8ba8b2dc3746bc1d217698d258fb5:0"
  ],
  // ... 其他实体属性
}
```

当该可穿戴物品是链下资产时，例如新头像的默认可穿戴物品，它将采用以下形式：

```
urn:decentraland:off-chain:<collection>:<item name>
```

这种情况下的集合是名称而不是地址，物品标识符也同样是名称而不是索引。

该 `指针` 链下可穿戴物品的数组如下所示：

```json
{
  "pointers": [
    "urn:decentraland:off-chain:base-avatars:BaseFemale"
  ],
  // ... 其他实体属性
}
```

### 元数据字段

可穿戴物品的大部分基本字段与 [表情动作](https://github.com/decentraland/docs/blob/main/contributor/entity-types/emotes/README.md)相同。其中 `数据` 属性是存放可穿戴物品特定信息的位置。

| 字段     | 值                                                                                                                |
| ------ | ---------------------------------------------------------------------------------------------------------------- |
| `id`   | 该 [指针](https://github.com/decentraland/docs/blob/main/contributor/pointers/README.md) 解析到（或曾用于解析到）此可穿戴物品。        |
| `名称`   | 该可穿戴物品在 [collection](https://github.com/decentraland/docs/blob/main/contributor/collections/README.md).          |
| `描述`   | 中的显示标题。                                                                                                          |
| `图片`   | 该 [内部文件名](https://github.com/decentraland/docs/blob/main/contributor/entities/README.md#files) 该可穿戴物品图片的。        |
| `缩略图`  | 该 [内部文件名](https://github.com/decentraland/docs/blob/main/contributor/entities/README.md#files) 256x256 版本的 `图片`. |
| `稀有度`  | 以下之一： `普通`, `不常见`, `稀有`, `史诗`, `传奇`, `异域`, `神话` 或 `独特`.                                                          |
| `国际化`  | 该字段的翻译数组。 `名称` 字段。                                                                                               |
| `集合地址` | 包含此可穿戴物品的集合的以太坊地址。                                                                                               |
| `指标`   | 关于动画的一些有用测量值（见下文）。                                                                                               |
| `数据`   | 该可穿戴物品的扩展元数据（见下文）。                                                                                               |

典型的 JSON 形式如下：

```json
{
  "id": "urn:decentraland:matic:collections-v2:0x11a6879861f36cbad632b4e7226816a16139fb33:0",
  "name": "漂亮连衣裙",
  "description": "穿起来很漂亮",
  "image": "image.png",
  "thumbnail": "thumbnail.png",
  "rarity": "不常见",
  "i18n": [
    { "code": "es", "text": "漂亮连衣裙" }
  ],
  "collectionAddress": "0x11a6879861f36cbad632b4e7226816a16139fb33",
  "metrics": {
    // 测量对象（见下文）。
  },
  "data": {
    // 扩展元数据（见下文）。
  }
}
```

### 指标

在 `metadata.metrics` 对象中，你会找到此可穿戴物品所包含模型的一些简单测量值。示例：

```json
{
  "entities": 1,
  "bodies": 12,
  "materials": 2,
  "meshes": 12,
  "textures": 2,
  "triangles": 3321
}
```

### 数据

该 `metadata.data` 对象中存放的是可穿戴物品特定属性。

| 字段     | 值                    |
| ------ | -------------------- |
| `类别`   | 上面列出的可穿戴类别之一。        |
| `表示形式` | 与不同身体形状关联的文件数组（见下文）。 |
| `隐藏`   | 此可穿戴物品会隐藏的类别数组。      |
| `替换`   | 此可穿戴物品会完全替换的类别数组。    |
| `标签`   | 描述此可穿戴物品的字符串标签数组。    |

#### 表示形式

representations 数组中的每一项都将某种身体形状与一组模型关联起来，并且可以添加有关每个类别中显示哪些可穿戴物品的规则。

| 字段     | 值                                                                                                                       |
| ------ | ----------------------------------------------------------------------------------------------------------------------- |
| `身体形状` | 一个包含 [指针](https://github.com/decentraland/docs/blob/main/contributor/pointers/README.md) 到身体形状实体。                       |
| `主文件`  | 用于开始渲染的 3D 模型文件。                                                                                                        |
| `内容`   | 文件名数组（位于顶层 [`内容` 字段](https://github.com/decentraland/docs/blob/main/contributor/entities/README.md#properties)）由 `主文件`. |
| `覆盖隐藏` | 取代 `隐藏` 此表示形式的上方列表。                                                                                                     |
| `覆盖替换` | 取代 `替换` 此表示形式的上方列表。                                                                                                     |

这是一个典型的 `表示形式` 条目：

```json
{
  "bodyShapes": [
      "urn:decentraland:off-chain:base-avatars:BaseFemale"
  ],
  "mainFile": "male/190.glb",
  "contents": [
      "male/190.glb"
  ],
  "overrideHides": [ "下身" ],
  "overrideReplaces": []
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/contributor/contributor-zh/nei-rong/shi-ti-lei-xing/wearables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
