JSPM

@theatrejs/loader-ldtk

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q46261F
  • License MIT

⚙️ A Webpack Loader for LDTK files.

Package Exports

  • @theatrejs/loader-ldtk
  • @theatrejs/loader-ldtk/sources/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@theatrejs/loader-ldtk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Copyright License Bundle Size (Gzipped) NPM Version

LDTK Webpack Loader

⚙️ A Webpack Loader for LDTK files.

Installation

npm install @theatrejs/plugin-ldtk --save
npm install @theatrejs/loader-ldtk --save-dev

Webpack Configuration

{
    'module': {
        'rules': [
            ...
            {
                'test': /\.ldtk$/,
                'use': [
                    {
                        'loader': '@theatrejs/loader-ldtk'
                    }
                ]
            }
            ...
        ]
    }
}

Quick Start

import ldtk from './game.ldtk';

const entities = ldtk.getEntities({
    $level: 'Prototype',
    $layer: 'actors'
});

const grid = ldtk.getGrid({
    $level: 'Prototype',
    $layer: 'grid'
});