@theatrejs/plugin-ldtk
Version:
🛠️ A Plugin for LDTK JSON data.
34 lines (22 loc) • 1.05 kB
Markdown
[](https://github.com/deformhead) [](https://github.com/theatrejs/plugin-ldtk/blob/master/LICENSE) [](https://www.npmjs.com/package/@theatrejs/plugin-ldtk/v/latest) [](https://www.npmjs.com/package/@theatrejs/plugin-ldtk/v/latest)
# LDTK Plugin
> *🛠️ A Plugin for LDTK JSON data.*
## Installation
```shell
npm install @theatrejs/plugin-ldtk --save
```
## Quick Start
```javascript
import * as PLUGIN_LDTK from '@theatrejs/plugin-ldtk';
import ldtkData from './ldtk.json';
const ldtk = new PLUGIN_LDTK.Ldtk(ldtkData);
const entities = ldtk.getEntities({
$level: 'Prototype',
$layer: 'actors'
});
const grid = ldtk.getGrid({
$level: 'Prototype',
$layer: 'grid'
});
```
## [API](https://theatrejs.github.io/plugin-ldtk/index.html)