# @dylanebert/shallot 中文文档

规范地址：https://npmcn.com/package/%40dylanebert/shallot/

版本：0\.10\.4
npm 元数据更新时间：2026-11-13T18:46:42.443Z
中文译文更新时间：2026-11-13T18:48:45.054Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40dylanebert/shallot
原文对照：https://npmcn.com/package/%40dylanebert/shallot/?lang=original
项目主页：https://github.com/dylanebert/shallot
源码仓库：https://github.com/dylanebert/shallot

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：13.6 MB，1312 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- Node.js 要求：\>=22
- 运行依赖：3 个
- peer 依赖：vite ^8\.0\.0，webgpu ^0\.6\.2，typegpu ~0\.12\.8，wrangler 4\.151\.3，playwright ^1\.64\.1
- 首次发布：2026-03-21T16:51:56.684Z
- 最新版本发布：2026-11-13T18:46:42.260Z
- 近 30 天下载量：5268（2026-10-13 至 2026-11-11，npm 官方下载统计）
- 已发布版本数：52（近 12 个月 52 个）

## 中文简介

TypeScript的WebGPU游戏引擎:组件数据和插件,网页和本地桌面构建.

## 安装

```sh
npm install @dylanebert/shallot
```

也可以使用：`pnpm add @dylanebert/shallot`、`yarn add @dylanebert/shallot`、`bun add @dylanebert/shallot`

## README

[![test](https://github.com/dylanebert/shallot/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/dylanebert/shallot/actions/workflows/test.yml)

# 斜线

webgpu 游戏引擎. 快速默认,即时迭接,运行于webgpu所运行的地方.

## 快速开始

```bash
# install bun
curl -fsSL https://bun.sh/install | bash

# new project
bun create shallot my-game
cd my-game
bun install

# list commands
bunx shallot --help

# run the game
bun run dev
```

打开 url in a [支持的浏览器](https://caniuse.com/webgpu)。 。 。 .

## 实例

通过探索开始 [实例](https://dylanebert.com/shallot/)从一个开始:

```bash
# list them
bun create shallot --help

# copy one
bun create shallot first-person --template first-person
```

## 更多

-   问: [不对](https://discord.gg/eEY75Nqk3C)错误 : [问题](https://github.com/dylanebert/shallot/issues)。释放: [无](https://www.npmjs.com/package/@dylanebert/shallot)
-   升级 : [`MIGRATION.md`](https://npmcn.com/package/%40dylanebert/shallot/MIGRATION.md)
-   更改引擎 : [捐款](https://github.com/dylanebert/shallot/blob/main/CONTRIBUTING.md)

麦克,你看 [`LICENSE`](https://npmcn.com/package/%40dylanebert/shallot/LICENSE)物理学来源于 [框3d 数据](https://github.com/erincatto/box3d) `3362633`,版权 erin catto, mit; 见 [`LICENSE-BOX3D`](https://npmcn.com/package/%40dylanebert/shallot/LICENSE-BOX3D)。 。 。 .

## 常见问题

### @dylanebert/shallot 是什么？

TypeScript的WebGPU游戏引擎:组件数据和插件,网页和本地桌面构建\.

### 如何安装 @dylanebert/shallot？

在项目目录运行 npm install @dylanebert/shallot，或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖：vite（^8\.0\.0）、typegpu（~0\.12\.8）。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖，Yarn 需要手动安装。它还提供命令行工具 shallot，可以用 npx shallot 直接运行。

### @dylanebert/shallot 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @dylanebert/shallot 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @dylanebert/shallot 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### @dylanebert/shallot 可以商用吗？

@dylanebert/shallot 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @dylanebert/shallot 的下载量有多少？

根据 npm 官方下载统计，@dylanebert/shallot 在 2026/10/13 – 2026/11/11 这 30 天内被下载 5,268 次，日均约 176 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @dylanebert/shallot 还在维护吗？

最新版本 0\.10\.4 发布于 2026/11/14（今天）；至今共发布 52 个版本，其中过去 12 个月发布了 52 个；首次发布于 2026/03/22。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

