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