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.19.1

Published

LDtk level format asset extension for ExoJS.

Readme

@codexo/exojs-ldtk

Load LDtk projects into ExoJS's format-neutral tilemap and world runtime. Use an eager map for a small project or a project runtime for independently owned levels.

Install and activate

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

Core and the tilemap runtime are peer dependencies. ldtkExtension depends on tilemapExtension, so selecting the adapter installs both its loading capability and the generic tile renderer.

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

class LevelScene extends Scene {
  override async load(): Promise<void> {
    const world = await this.loader.load('levels/world.ldtk');
    const level = world.getLevelByName('Level_0') ?? world.levels[0];

    if (level === undefined) {
      throw new Error('The LDtk project contains no loadable level.');
    }
    this.root.addChild(new TileMapNode(level));
  }
}

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

await app.start(LevelScene);

Serve the project and its referenced files beneath the asset base. Each LDtk level becomes its own TileMap; loading a project does not automatically select or display every level.

Eager or streamed?

ldtkMap converts all levels up front. Asset.type('ldtkProject', path) exposes a world layout and a runtime that can acquire levels individually. External .ldtkl payloads are fetched when required; an embedded level's JSON is already part of the project document. Deferred conversion does not remove bytes that the initial document contains.

The project runtime supplies level ownership, not the game's streaming policy. Choose which levels to load, bound concurrency, and release their runtime handles when they are no longer needed. Use the Guide's failure and cancellation workflow rather than retaining non-null assertions against authored level names.

Authored data and ownership

Tile rendering, entity spawning, IntGrid collision, and pathfinding are separate uses of authored data. A visible layer does not create a physics body automatically. createLdtkIntGridCellSource exposes cell data for the tilemap-physics bridge when that is the intended collision source.

A loader-acquired map and its texture dependencies remain claim-owned. LdtkMap.destroy() releases its owned runtime maps, not arbitrary scene nodes or shared loader textures. Remove displaying nodes at their owner boundary and release asset claims through their scope. Import the format-neutral rendering nodes, including TileMapNode, from @codexo/exojs-tilemap; the adapter owns LDtk loading and conversion.

Documentation

LDtk guide · Worlds and level streaming · LdtkMap API

License

MIT © Codexo