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-ldtk

v0.15.3

Published

LDtk level format asset extension for ExoJS.

Downloads

804

Readme

@codexo/exojs-ldtk

Official ExoJS extension for loading LDtk level files (.ldtk) into runtime TileMaps — one per LDtk level — ready to render with the generic tilemap node.

Installation

npm install @codexo/exojs @codexo/exojs-ldtk

@codexo/exojs is a peer dependency. @codexo/exojs-tilemap is a regular dependency and is installed transitively — you do not need to install it manually.

What this package provides

  • LdtkMap — parsed LDtk world; the result of loader.load(LdtkMap, url). Exposes the raw data, the converted runtime levels (readonly TileMap[], in document order), and getLevelByName(identifier)
  • ldtkToTileMap — convert a single LDtk level to a TileMap (used internally; available for custom pipelines), plus its LdtkToTileMapOptions
  • ldtkExtension — extension descriptor; depends on tilemapExtension automatically
  • ldtkMapBinding — the underlying AssetBinding (advanced/custom wiring)
  • The raw LDtk JSON types (LdtkData, LdtkLevel, LdtkLayerInstance, LdtkEntityInstance, …) and the flip-bit constants (ldtkFlipX, ldtkFlipY, ldtkFlipXy, ldtkFlipNone)
  • TileMap, TileMapNode, TileMapView, TileLayer, TileSet, ObjectLayer, … re-exported from @codexo/exojs-tilemap (same class identity — instanceof TileMap holds across both import paths)

Usage

Register the extension and load a .ldtk world. One extension enables both loading and rendering — ldtkExtension depends on tilemapExtension, so the tile chunk renderer bindings are materialised automatically:

import { Application } from '@codexo/exojs';
import { LdtkMap, TileMapNode, ldtkExtension } from '@codexo/exojs-ldtk';

const app = new Application({ extensions: [ldtkExtension] });

const world = await app.loader.load(LdtkMap, 'levels/world.ldtk');

// Render the first level (each LDtk level is its own TileMap):
const level = world.getLevelByName('Level_0') ?? world.levels[0];
app.scene.root.addChild(new TileMapNode(level));

TileMapNode is the same class exported by @codexo/exojs-tilemap (see its README for the rendering/culling model and actor interleaving).

/register convenience entry

Importing /register registers ldtkExtension (and its tilemapExtension dependency) in the global ExtensionRegistry, so subsequently created Applications that use global defaults pick them up automatically:

// Side effect: registers ldtkExtension in the global ExtensionRegistry.
import '@codexo/exojs-ldtk/register';

// All named exports are also re-exported from /register:
import { LdtkMap, ldtkExtension } from '@codexo/exojs-ldtk/register';

This is the only side-effectful entry — importing the package root (@codexo/exojs-ldtk) does not register anything.

Texture ownership

Tileset textures are loaded via the Loader and stay in the Loader cache. LdtkMap.destroy() destroys the owned runtime TileMaps but does not unload textures (Loader-owned) or remove any scene nodes — the application owns those.

Core compatibility

| @codexo/exojs-ldtk | @codexo/exojs | |---|---| | 0.14.x | 0.14.x |

Links

License

MIT © Codexo