Skip to content

WorkAdventure Map Optimizer! Does your map need a diet?

License

Notifications You must be signed in to change notification settings

Nolway/wa-map-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9c0678f · Sep 29, 2023

History

44 Commits
May 7, 2022
Sep 29, 2023
Sep 28, 2023
Sep 29, 2023
Dec 29, 2022
May 7, 2022
Sep 29, 2023
Dec 29, 2022
May 7, 2022
May 7, 2022
Dec 29, 2022
Sep 29, 2023
Sep 29, 2023
Sep 28, 2023

Repository files navigation

WA Map Optimizer 💪

License: AGPL--3.0

WorkAdventure Map Optimizer! Does your map need a diet?

Requirements

  • Node 16.15 <
  • Yarn 1.22 <

Install

yarn add wa-map-optimizer

Usage

import { optimize } from "wa-map-optimizer";

async function run() {
    await optimize("./example/map.json");
    console.log("Optimization finished");
}

run();

Advanced usage

import { optimize } from "wa-map-optimizer";

async function run() {
    await optimize("./example/map.json", {
      tile: {
          size: 32,
      },
      logs: true,
      output: {
          path: "optimisation/new_map",
          map: {
            name: "awesome-map",
          },
          tileset: {
            prefix: "optimized",
            suffix: "tileset",
            size: 1024,
          }
      }
    });
    console.log("Optimization finished");
}

run();

Author

👤 Nolway (Alexis Faizeau)

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Nolway(Alexis Faizeau).
This project is AGPL--3.0 licensed.