melonJS
    Preparing search index...

    Function getLDtk

    • Get a loaded LDtk project (an "ldtk" asset): its levels with their ids, sizes, fields and neighbours, its worlds, and the definitions they are read with. Most code never needs it: level.load("<name>:<level>") builds a level from it.

      Parameters

      • name: string

        the asset name

      Returns LDtkProject | null

      the project, or null if none is loaded under that name

      for (const info of loader.getLDtk("world").levels) {
      console.log(info.id, info.width, info.height);
      }