tibia-minimap-png

2.0.0 • Public • Published

tibia-minimap-png Build status

Given a buffer with visual map data or pathfinding data from a Tibia 10-compatible *.map file, tibia-minimap-png creates a PNG buffer that is compatible with Tibia 11’s minimap.

Installation

npm install --save tibia-minimap-png

Usage

const fs = require('fs');
 
const { wrapColorData, wrapWaypointData } = require('tibia-minimap-png');
 
const buffer = fs.readFileSync('12612507.map');
const colorData = buffer.slice(0, 0x10000);
const waypointData = buffer.slice(0x10000, 0x20000);
 
fs.writeFileSync(
  'Minimap_Color_32256_32000_7.png',
  wrapColorData(colorData)
);
fs.writeFileSync(
  'Minimap_WaypointCost_32256_32000_7.png',
  wrapWaypointData(waypointData)
);

Author

twitter/mathias
Mathias Bynens

Readme

Keywords

Package Sidebar

Install

npm i tibia-minimap-png

Weekly Downloads

41

Version

2.0.0

License

MIT

Unpacked Size

9.4 kB

Total Files

11

Last publish

Collaborators

  • mathias