Skip to content

deathcap/mcmeta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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