Skip to content

scijs/ndarray-to-binvox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ndarray-to-binvox

Exports an ndarray to a binvox stream.

Example

The following example dumps a binvox file to standard out.

var ndarray = require("ndarray")

var x = ndarray(new Uint8Array(8), [2,2,2])
x.set(0, 0, 0, 1)

require("ndarray-to-binvox")(x).pipe(process.stdout)

Install

npm install ndarray-to-binvox

API

require("ndarray-to-binvox")(array[, translate, scale])

Dumps an ndarray to a binvox file.

  • array is a 3D ndarray
  • translate is an optional translation parameter. (Default [0,0,0])
  • scale is an optional scaling parameter. (Default 1.0)

Returns A stream encoding the binvox file.

Credits

(c) 2013 Mikola Lysenko. MIT License

About

Dumps an ndarray to a binvox stream

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published