Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auto-tile-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-tile-webpack-plugin

Generate autotiles for Tiled automatically

  • 0.11.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

AutoTileWebpackPlugin

npm license

A Webpack plugin to generate expanded autotiles and its setting for Tiled from minimal autotiles automatically.

It will be re-generated automatically when added or modified images while webpack is watching.

OriginalExpanded
OriginalExpanded

Usage

Install:

$ npm install auto-tile-webpack-plugin

Define into webpack.config.js:

const AutoTileWebpackPlugin = require('auto-tile-webpack-plugin')
// ...
{
  entry: {
    ...
  },
  output: {
    ...
  },
  plugins: [
    new AutoTileWebpackPlugin({
      size: 32,
      input: './public/img/original_autotiles',
      output: './public/img/tilesets'
    })
  ]
}
- public/img/
  - original_autotiles/
    - town.png // Minimal autile image (Follow `examples/input.png`)
  - tilesets/
    - town.png // Generated image
    - town.tmx // Generated setting for Tiled

Options:

KeyWhat is
sizeTile size.
inputInput directory. Original images should be here.
outputOutput directory. Extruded images will be here.

Use it on Tiled

Make a rules.txt that listed path to settings and place it under your project directory for Tiled.

path/to/town.tmx
path/to/dungeon.tmx
..
  • The around of the autotiles need to be filled with something another tile.
  • Layer name need to be same as file name. (town.png -> town)

CLI

$ autotile --input <input dir> --output <output dir> --size <tile size>

or

$ autotile --config <path to config>
module.exports = {
  size: 32,
  input: './input',
  output: './output'
}

Requirements

  • Webpack4 or higher

I'm not sure if this will be working on Webpack3 or less. Please make an issue or PR if need it.

License

MIT

The settings for Tiled is based on Remex.

[Examples] Projects that using this plugin

FAQs

Package last updated on 16 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc