UNPKG

vox-reader

Version:

Takes a Byte Array of .vox file data and returns a JavaScript Object with all the containing informations

6 lines (4 loc) 185 B
const readInt = (data : Array<number>) : number => (data.map((num, index) => (num * 2 ** (8 * index)) ) .reduce((sum, summand) => sum + summand, 0) << 32) >> 32; export = readInt;