@colyseus/sdk

中文文档
0.18.9发布于 2026/10/31MITTypeScriptESM + CJS近 30 天下载 44.2万

Colyseus Multiplayer SDK for JavaScript/TypeScript

原始使用文档
文档目录3 节
  1. Multiplayer SDK for JavaScript/TypeScript. View documentati…
  2. Publishing to the Cocos Store
  3. License


Discussion forum

Multiplayer SDK for JavaScript/TypeScript.
View documentation

Browser support tested with:

Publishing to the Cocos Store

The Cocos Creator 3 extension (cocos-creator-3-extension/) is listed as Colyseus Multiplayer SDK. The Store has no upload API and its login has a captcha, so submitting runs locally, not in CI.

  1. Build the extension package:

    npm run build && npm run build-release-assets
    

    This writes colyseus-sdk-cocos-creator.zip, with the extension's version taken from this package. CI attaches the same zip to the GitHub release.

  2. Fill in the new version on the seller portal:

    npm run submit-cocos-store
    

    This opens Google Chrome on the portal. The first time, log in to the Cocos developer center; the session is kept in ~/.colyseus/cocos-store-chrome for later runs. The script uploads the zip, sets the version number, copies the minimum Creator version from the current Store version, and fills the release notes from this version's CHANGELOG.md section (trimmed to the Store's 1500-character limit).

  3. Review the form, click Save And Preview, then submit the version for review.

Pass -- --submit to save and submit without the manual step. Other options: --notes, --notes-cn, --requirement and --zip (see the header of cocos-creator-3-extension/submit-to-store.mjs).

Cocos reviews each version by hand, which can take up to 3 business days. Once approved, it becomes the current version on the Store.

License

MIT

版本与发布记录

@colyseus/sdk 共发布 53 个版本,首次发布于 2026/01/09;过去 12 个月发布了 53 个版本。

版本发布日期距今
0.18.9latest2026/10/3110 天前
0.18.82026/10/2714 天前
0.18.72026/10/2714 天前
0.18.6next2026/10/2219 天前
0.18.52026/10/041 个月前
0.18.42026/09/231 个月前

关于 @colyseus/sdk 的常见问题

@colyseus/sdk 是什么?

Colyseus Multiplayer SDK for JavaScript/TypeScript

如何安装 @colyseus/sdk?

在项目目录运行 npm install @colyseus/sdk,或使用 pnpm add / yarn add / bun add。

@colyseus/sdk 支持 TypeScript 吗?

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

@colyseus/sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@colyseus/sdk 需要什么版本的 Node.js?

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

@colyseus/sdk 可以商用吗?

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

@colyseus/sdk 的下载量有多少?

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

@colyseus/sdk 还在维护吗?

最新版本 0.18.9 发布于 2026/10/31(10 天前);至今共发布 53 个版本,其中过去 12 个月发布了 53 个;首次发布于 2026/01/09。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。