{"id":20000181,"url":"https://github.com/andstor/binvox","last_synced_at":"2025-05-04T15:32:15.717Z","repository":{"id":42889626,"uuid":"240944086","full_name":"andstor/binvox","owner":"andstor","description":":page_facing_up: Parser and builder for BINVOX voxel file format","archived":false,"fork":false,"pushed_at":"2023-01-06T03:06:31.000Z","size":1541,"stargazers_count":4,"open_issues_count":10,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T07:42:57.036Z","etag":null,"topics":["binvox","data","file-format","parser","voxel"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/binvox","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andstor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-16T18:35:06.000Z","updated_at":"2024-12-05T15:57:49.000Z","dependencies_parsed_at":"2023-02-05T04:31:34.381Z","dependency_job_id":null,"html_url":"https://github.com/andstor/binvox","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fbinvox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fbinvox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fbinvox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andstor%2Fbinvox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andstor","download_url":"https://codeload.github.com/andstor/binvox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252356077,"owners_count":21734876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binvox","data","file-format","parser","voxel"],"created_at":"2024-11-13T05:14:00.074Z","updated_at":"2025-05-04T15:32:15.465Z","avatar_url":"https://github.com/andstor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BINVOX\n\n\u003e Parser and builder for BINVOX voxel file format.\n\n[![npm version](http://img.shields.io/npm/v/binvox.svg?style=flat)](https://npmjs.org/package/binvox \"View this project on npm\")\n![Build](https://github.com/andstor/binvox/workflows/Build/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/andstor/binvox/badge.svg?branch=master)](https://coveralls.io/github/andstor/binvox?branch=master)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/andstor/binvox.svg?)](https://lgtm.com/projects/g/andstor/binvox/context:javascript)\n\nSpecification of vox file format can be found [here](https://www.patrickmin.com/binvox/binvox.html).\n\n[Documentation](https://andstor.github.io/binvox/) - \n[Wiki](https://github.com/andstor/binvox/wiki)\n\n## Table of Contents\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [License](#license)\n\n## Install\n\n```console\n$ npm install --save binvox\n```\n\n## Usage\n\n### Syntax\n\n```js\n// Import via ES6 modules\nimport {Builder, Parser} from 'binvox';\n// or UMD\nconst BINVOX = require('binvox');\n```\n\n###  Example\nThis Node.js example reads a BONVOX file and parses it:\n```js\nconst fs = require('fs');\nconst BINVOX = require('binvox');\n \nfs.readFile('path/to/file.binvox', (err, data) =\u003e {\n  if (err) throw new Error(err);\n  const parser = new BINVOX.Parser();\n  const result = parser.parse(data.buffer);\n  console.log(result);\n})\n```\n\nwhere `data.buffer` is an instance of [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).\n\nIt is recommended to read the official BINVOX [specification](https://www.patrickmin.com/binvox/binvox.html), in order to understand the structure of the data.\n\nThe output consists of various file information, in addition to the actual voxel data:\n```js\n{ \n  dimension: { depth: 32, width: 32, height: 32 },\n  translate: { depth: 11.81, width: 21.39, height: -1.69 },\n  scale: 30.206,\n  voxels: [...]\n}\n```\n\n`voxels` contain the actual voxel data (points), and looks like this:\n```js\n[\n  { x: 0, y: 2, z: 3 },\n  { x: 0, y: 3, z: 3 },\n  { x: 0, y: 4, z: 3 },\n  ...,\n]\n```\nwhere the index of each voxel is ordered by the voxel's \"location in space\".\n\n## API\n\n### [`BINVOX.Parser`](https://andstor.github.io/binvox/Parser.html)\n- [`constructor()`](https://andstor.github.io/binvox/Parser.html)\n- [`parse(buffer): Object`](https://andstor.github.io/binvox/Parser.html#parse)\n\n### [`BINVOX.Builder`](https://andstor.github.io/binvox/Builder.html)\n- [`constructor()`](https://andstor.github.io/binvox/Builder.html)\n- [`build(object): ArrayBuffer`](https://andstor.github.io/binvox/Builder.html#build)\n\n## License\n\nCopyright © 2020 [André Storhaug](https://github.com/andstor)\n\nBINVOX is licensed under the [MIT License](https://github.com/andstor/binvox/blob/master/LICENSE).  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandstor%2Fbinvox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandstor%2Fbinvox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandstor%2Fbinvox/lists"}