0.4.2 • Published 9 years ago

hex-pixi-js v0.4.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

HexPixiJs

Basic Hex Grid For PixiJS. Version 0.30 (alpha).

HexPixiJs is a simple library written to give hex grid based game developers a jump start. This library will be updated periodically but there is currently no roadmap of features. Feel free to request features.

Browser

Use /bin/hexpixi.js file for the browser.

node/browserify/CommonJS

Add this repository to your dependencies, do npm install and require('hex-pixi-js'); in your code.

Disclaimer

This is not supposed to be and end-all solution for making hex grid based games. There is currently no documentation, but the code is fairly simple so I believe there is value for some developers.

Troubleshooting

I realize there is a CORS (cross origin resource sharing) issue if you are trying to view this without a webserver. In otherwords, if you download the files and double click index.html, the texture might not load.

Files

A brief list and description of the important project files:

  • scripts/hexpixi.js -Contains the HexPixiJS library code.
  • scripts/hpdemo.js - This javascript code sets up the main demo page and serves as an example of how to use HexPixiJS.
  • simpleDemo.html - Demonstrates basic usage of library.
  • scripts/simpleDemo.js - Demonstrates basic usage of library.
  • simpleDemo2.html - Demonstrates advanced usage of library.
  • scripts/simpleDemo2.js - Demonstrates advanced usage of library.

Demo

Here is a demo page with a basic map generator on it. Map Generator Demo

Simple demo shows barebones usage. Simple Demo

Simple demo 2 shows interactive map usage. Simple Demo 2

License

Released under the MIT license.

Credits

PixiJS

Art assets for simple demo 2 by Kenney

Feel free to submit contributions.