@theatrejs/loader-ldtk

1.0.2 • Public • Published

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'
});

Package Sidebar

Install

npm i @theatrejs/loader-ldtk

Weekly Downloads

10

Version

1.0.2

License

MIT

Unpacked Size

4.38 kB

Total Files

5

Last publish

Collaborators

  • deformhead