> 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/tree/main/contributor/entities/README.md) 其中包含供玩家穿戴并自定义其头像的物品。

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

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

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

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

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

可穿戴物品恰好关联一个 [指针](https://github.com/decentraland/docs/tree/main/contributor/pointers/README.md)，它表示其所属的 [collection](https://github.com/decentraland/docs/tree/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/tree/main/contributor/entity-types/emotes/README.md)。该 `数据` 属性是存放该可穿戴物品特有信息的位置。

| 字段                  | 值                                                                                                                  |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `id`                | 该 [指针](https://github.com/decentraland/docs/tree/main/contributor/pointers/README.md) 它解析（或曾经解析）到该可穿戴物品。           |
| `name`              | 该可穿戴物品在一个 [collection](https://github.com/decentraland/docs/tree/main/contributor/collections/README.md).          |
| `description`       | 对该可穿戴物品的扩展描述。                                                                                                      |
| `图像`                | 该 [内部文件名](https://github.com/decentraland/docs/tree/main/contributor/entities/README.md#files) 该可穿戴物品图片的。          |
| `缩略图`               | 该 [内部文件名](https://github.com/decentraland/docs/tree/main/contributor/entities/README.md#files) 该 256x256 版本的 `图像`. |
| `稀有度`               | 以下之一 `普通`, `罕见`, `稀有`, `史诗`, `传说`, `异域`, `神话` 或 `唯一`.                                                              |
| `i18n`              | 一个用于以下项的翻译数组： `name` 字段。                                                                                           |
| `collectionAddress` | 包含此可穿戴物品的集合的以太坊地址。                                                                                                 |
| `指标`                | 关于动画的一些有用测量值（见下文）。                                                                                                 |
| `数据`                | 该可穿戴物品的扩展元数据（见下文）。                                                                                                 |

典型的 JSON 形式：

```json
{
  "id": "urn:decentraland:matic:collections-v2:0x11a6879861f36cbad632b4e7226816a16139fb33:0",
  漂亮连衣裙
  穿起来非常好看
  "image": "image.png",
  "thumbnail": "thumbnail.png",
  罕见
  "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` 对象是存放该可穿戴物品特有属性的位置。

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

#### 表示方式

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

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

这是一个典型的 `表示方式` 项目：

```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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
