parse .mcmeta JSON files
JavaScript
Switch branches/tags
Nothing to show
Latest commit 8bbf0b4 May 9, 2016 @deathcap 0.1.1

README.md

mcmeta

Parse .mcmeta files from Minecraft resource packs

Build Status

Usage:

var frames = require('mcmeta')(pixels, json);

pixels should be an ndarray of the texture pixel data (e.g., from get-pixels), json a JSON string or decoded object from the corresponding .mcmeta file contents.

The frames return value will be an array of the animation frames, objects with image set to the image tile URL, and time the duration to remain on this frame. For an example, see demo.js and run npm start, or view the live demo at http://deathcap.github.io/mcmeta/.

References:

(Minecraft is property of Mojang Specifications)

License

MIT