@excaliburjs/plugin-tiled

中文文档
1.0.0发布于 2026/11/08BSD-2-ClauseTypeScriptESM + CJS构建来源已验证近 30 天下载 1.1万

excalibur-tiled provides Tiled map editor integration with Excalibur.js

原始使用文档
文档目录3 节
  1. Installation
  2. Documentation
  3. Contributing

Tiled Plugin for Excalibur.js

Tiled is a super useful tool for building game levels across the industry. The Tiled plugin for Excalibur offers support for both Orthogonal (standard) and Isometric maps!

The current Tiled plugin aims to support parsing all data in the Map (.tmx/.tmj), Tileset (.tsx, .tsj.) and Template files (.tx, tj). The plugin however does not support rendering all map types, currently hexagons and isometric staggered are not supported.

The plugin officially supports the latest version of Tiled that has been published and will warn if you are using an older version. This is because there have been many breaking changes to the Tiled map format over time that are difficult to reconcile.

Installation

npm install --save-exact @excaliburjs/plugin-tiled

Create your resource, load it, then add it to your scene!

const game = new ex.Engine({...});

const tiledMap = new TiledResource('./path/to/map.tmx');

const loader = new ex.Loader([tiledMap]);

game.start(loader).then(() => {
    tiledMap.addToScene(game.currentScene);
});

Documentation

For information on how to use the plugin visit https://excaliburjs.com/docs/tiled-plugin

Contributing

  • Built with webpack 5
  • Uses webpack-dev-server

To start development server:

npm start

To watch:

npm run watch

To compile only:

npm run build

To run tests:

npx playwright install
npm test

To update snapshots

  • Windows

    npx playwright test --update-snapshots
    
  • Linux for CI

    docker run --rm --network host -v ${PWD}:/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.49.1-jammy /bin/bash
    npm install
    npx playwright test --update-snapshots
    

版本与发布记录

@excaliburjs/plugin-tiled 共发布 22 个版本,首次发布于 2021/08/27;过去 12 个月发布了 2 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.0.0latest2026/11/085 天前
0.32.02025/12/2410 个月前
0.31.02025/09/281.1 年前
0.30.22025/01/181.8 年前
0.30.12024/12/261.9 年前
0.30.02024/12/131.9 年前

其他发布通道:next → 0.29.0-alpha.1。

关于 @excaliburjs/plugin-tiled 的常见问题

@excaliburjs/plugin-tiled 是什么?

excalibur-tiled provides Tiled map editor integration with Excalibur.js

如何安装 @excaliburjs/plugin-tiled?

在项目目录运行 npm install @excaliburjs/plugin-tiled,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:excalibur(^1.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@excaliburjs/plugin-tiled 支持 TypeScript 吗?

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

@excaliburjs/plugin-tiled 支持 ESM 还是 CommonJS?

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

@excaliburjs/plugin-tiled 可以商用吗?

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

@excaliburjs/plugin-tiled 的下载量有多少?

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

@excaliburjs/plugin-tiled 还在维护吗?

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