4.3.0 • Published 8 years ago

tmx-loader v4.3.0

Weekly downloads
5
License
-
Repository
-
Last release
8 years ago

Webpack tmx loader

NPM

A Webpack plugin for loading tmx files (for example .tmx).

Installation

Install via npm:

npm install --save tmx-loader

Usage

You can require tmx map like this:

var data = require('tmx!./map.tmx');
// => returns map.tmx content as json parsed object

The loader will translate the map.tmx file into a JSON Object.

Usage with webpack.config

To require tmx files like this: require('map.tmx') , you can add the tmx-loader to your webpack config:

module : {
  loaders : [
    { test: /\.tmx?$/, loader: 'tmx-loader' } //will load all .tmx files with tmx-loader by default
  ]
}

Options

tilepath

Tells the loader which tilemap is used to display the data. Default: ''

Examples:

var data = require('tmx?tilepath=./tilemap.tsx!./map.tmx'); //load tilemap

Credits

4.3.0

8 years ago

4.2.0

8 years ago

4.1.1

9 years ago

4.1.0

9 years ago

4.0.1

9 years ago

4.0.0

9 years ago

3.0.0

9 years ago

2.0.0

9 years ago

1.0.0

9 years ago