> 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/creator/content-creator-zh/jiao-cheng-yu-shi-li/published-games/slay-the-steps.md).

# 登阶斩击

一个多人节日小径场景，包含自定义头像、Marketplace 集成、由射线检测驱动的色轮和跟踪摄像机。

![《Slay the Steps》预览](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-f69b3bc352576bd437f5646a89f8884b0402d352%2FslayTheSteps-preview.webp?alt=media)

这是由 Studio 制作、为 Decentraland Festive Trail 2025 打造的多人服务器体验。它包含自定义化身、Marketplace API 集成和自定义色轮选择器。代码将客户端、服务器和共享模块分开，并将源资源与可部署场景一并提供。

* [在 Decentraland 上游玩](https://decentraland.org/jump?realm=slaythesteps.dcl.eth)

## 项目信息

**维护者：** 社区 · stom66

[查看上游源代码](https://github.com/stom66/dcl-slay-the-steps)

**许可证：** [CC BY-NC-ND 4.0](https://github.com/stom66/dcl-slay-the-steps/blob/main/LICENSE.md)。重复使用前请查看上游条款；代码和素材可能适用不同条款。

{% hint style="warning" %}
**社区维护的代码——使用前请先审查**

此社区项目由 Decentraland Foundation 和 DAO 的 GitHub 组织之外的人员维护。其源代码和线上部署可能独立发生变化。

此项目被收录于本目录，并不代表它已通过安全审计或保证其安全性。运行或复用前，请审查代码、依赖项和安装脚本。

[报告目录相关问题](https://github.com/decentraland/docs/issues/new)。如怀疑存在漏洞，请遵循上游项目的安全政策。请勿在公开议题中包含漏洞利用细节或凭据。
{% endhint %}

## 主要功能

* 电影级 **虚拟摄像机**
* **AvatarShapes** 用于展示可穿戴物品
* **多人游戏** 用于同步回合和玩家服装
* 自定义 3D 颜色选择器

## 探索代码

这些链接指向特定的源代码快照，因此随着上游持续开发，这些说明仍然有用。它们是学习参考资料，并非安全评估。

### 将 3D 指针命中转换为颜色选择

`GetLocalMousePosition` 从摄像机发射射线，并将命中位置转换为色轮的局部位置。 `SampleColorWheel` 将其角度和半径映射为色相和饱和度，调用回调函数，并为明度滑块着色。

**项目背景：** 此实现使用项目中的色轮网格、HSV 转换辅助函数和材质节点名称。

**源代码参考：**

* [`GetLocalMousePosition`](https://github.com/stom66/dcl-slay-the-steps/blob/9f6026c826fb61d25eeea6a98f22a4dd16b29a15/dcl/src/client/colorPickers.ts#L306-L335)
* [`SampleColorWheel`](https://github.com/stom66/dcl-slay-the-steps/blob/9f6026c826fb61d25eeea6a98f22a4dd16b29a15/dcl/src/client/colorPickers.ts#L203-L238)

### 使用虚拟摄像机跟踪移动目标

摄像机位置系统和补间链会定期计算相对于玩家和目标的位置，然后通过补间移向该位置。 `TrackEntity` 创建摄像机，并通过 `lookAtEntity` 将其设为活动摄像机。

**项目背景：** 阅读 `ResetCamera` 以及游戏中用于处理跟踪生命周期结束的事件绑定。

**源代码参考：**

* [摄像机位置系统和补间链](https://github.com/stom66/dcl-slay-the-steps/blob/9f6026c826fb61d25eeea6a98f22a4dd16b29a15/dcl/src/client/cameraController.ts#L46-L96)
* [`TrackEntity`](https://github.com/stom66/dcl-slay-the-steps/blob/9f6026c826fb61d25eeea6a98f22a4dd16b29a15/dcl/src/client/cameraController.ts#L99-L137)


---

# 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/creator/content-creator-zh/jiao-cheng-yu-shi-li/published-games/slay-the-steps.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.
