Skip to content

NowDev/mca2js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mca2js

convert minecraft(tm) .mca region files to JS typed arrays

install

npm install mca2js

usage

var converter = require('mca2json')({start: [0,0,0], distance: 1})
converter.convert(buf, regionX, regionZ).on('data', function(chunk) {})

returns a readable stream that emits voxel chunks

benchmarks

loading all 1024 chunks from a 5mb .mca file and storing the resulting typed arrays in memory in chrome: total time elapsed: 38s, tab memory usage: 328mb

loading all 1024 chunks from a 5mb .mca file, running voxel-crunch on them (RLE) and storing the resulting crunched typed arrays in memory in chrome: total time elapsed: 40s, tab memory usage: 75mb

license

BSD

About

convert minecraft(tm) .mca region files to JS typed arrays

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.3%
  • HTML 4.7%