Utility functions to manipulate tilemaps
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.babelrc
.eslintrc.json
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
deployDocumentation.sh
esdoc.json
package-lock.json
package.json
rollup.config.js
tile-tools.html
tilemap-deploy-key.enc

README.md

Tile Tools

Build Status Documentation devDependencies Status Coverage Status

Create and modify tiles in an immutable way. Made to be compatible with Redux.

The Basics

This library makes use of tile areas which are very general and doesn't have any specific requirements except for being an object looking something along the lines of this:

{
    width: Number,
    height: Number,
    tiles: [<Object>]
}

Other than that, you can add any property you want and put anything you want in your tiles. For some operations however, Tile.tileId and Tile.tilesetId are used. This includes the skipEmpty option for mergeTileAreas and the entire fillTileAreaAt function.

It should also be noted that this library makes use of the immutable and no side-effects patterns, meaning that you always get back the same output for the same input and that input parameters are never modified.

Documentation

Documentation is generated by ESDoc. You can find the documentation here.

ES2015 Required

This library makes use of some of the new features in ES2015 without transpiling them first. This means your environment needs to support ES2015. For node, that is 6.0 or higher. If you want to run in browsers, Chrome and some others already support ES2015, but if you want to make it compatible with older browsers, you'll have to transpile it yourself using babel or equivalent.

License

This project is licensed under the MIT license.