npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codexo/exojs-tiled

v0.19.1

Published

Tiled map format asset extension for ExoJS.

Readme

@codexo/exojs-tiled

Load Tiled JSON maps into ExoJS's format-neutral tilemap runtime. Use this adapter for .tmj maps and their tilesets; use @codexo/exojs-tilemap alone for maps created directly in code.

Install

npm install --save-exact @codexo/exojs @codexo/exojs-tilemap @codexo/exojs-tiled

Core and the tilemap runtime are peer dependencies. Install them explicitly and keep them on the adapter's compatible release line.

Load and render a map

tiledExtension installs the map loader and depends on tilemapExtension, which supplies rendering. Importing the package alone does not activate it.

import { Application, Asset, Scene } from '@codexo/exojs';
import { TileMapNode, tiledExtension } from '@codexo/exojs-tiled';

class MapScene extends Scene {
  override async load(): Promise<void> {
    const map = await this.loader.load(Asset.type('tileMap', 'maps/world.tmj'));

    this.root.addChild(new TileMapNode(map));
  }
}

const app = new Application({
  scenes: { MapScene },
  extensions: [tiledExtension],
  canvas: { width: 800, height: 600, mount: 'body' },
  loader: { basePath: new URL('assets/', document.baseURI).href },
});

await app.start(MapScene);

Serve maps/world.tmj and the files it references below the configured asset base URL. The ordinary tileMap load produces a generic TileMap; tiledSource instead produces the parsed TiledMap for inspection or explicit toTileMap() conversion.

Before using an authored map

The adapter reads JSON (.tmj / .tsj), not Tiled's XML export. Loading validates known fields and resolves referenced tilesets and images. A parsed source feature is not automatically a rendered gameplay feature: object layers contain data until your code spawns objects or creates colliders. Infinite maps require a chunk-streaming policy; loading the source document alone does not keep every tile resident.

Tileset resources acquired through the loader have loader-managed claims and dependencies. Do not manually destroy a shared tileset texture to unload one map. Give the map a scene or shorter-lived loader scope, and clean up the scene nodes that display it before releasing their required resources.

TileMap, TileMapNode, TileMapView, and the other runtime re-exports are the same bindings as in @codexo/exojs-tilemap, not independent adapter-specific classes.

Isometric maps

toTileMap() converts standard Tiled isometric maps as well as orthogonal maps. It shares a TileProjection across the map, tile layers and object layers, with Tiled's horizontal origin (map.height * tileWidth / 2). Infinite maps retain signed chunk coordinates and stream through the same public chunk-source API. Staggered and hexagonal maps remain unsupported; LDtk remains orthogonal.

Tiled object positions use logical pixels with tileHeight units per cell on both axes. Runtime object geometry stays in that logical space for physics. Use objectLayer.getDisplayObject(object) for placement and drawing; it projects shapes and applies group/layer display offsets. Imported object rotations are normalized to preserve Tiled's rotation after projection. Tile objects use Tiled's bottom-centre default alignment on isometric maps, retain their visual size and rotation, expose the image pivot as rotationOrigin, and keep the tileset drawing offset separate as on orthogonal maps.

See the Isometric Landscape example for Kenney artwork, cell picking, authored object colliders and an explicit physics presentation binding.

Learn more

License

MIT