Package Exports
- @reldens/tile-map-optimizer
- @reldens/tile-map-optimizer/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 (@reldens/tile-map-optimizer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Reldens - Tile Map Optimizer
A tool to optimize a tile map JSON, merge multiple tilesheets into a single image only with the used tiles.
Need some specific feature?
Request a feature here: https://www.reldens.com/features-request
Documentation
https://www.reldens.com/documentation/tile-map-optimizer/
Simple to use example:
Create a file to configure the optimizer with the file to be optimized:
const { TileMapOptimizer } = require('@reldens/tile-map-optimizer');
const originalJSON = require('./reldens-town.json');
const options = {
originalJSON,
originalMapFileName: 'reldens-town',
factor: 2,
transparentColor: '#000000',
rootFolder: __dirname
};
const tileMapOptimizer = new TileMapOptimizer(options);
tileMapOptimizer.generate().catch((error) => {
console.log(error);
}).then(() => {
console.log('Map saved! Check generated folder.');
});
Run it:
$ node ./optimize-example.js
Look for your optimized maps on the "generated" folder.