# voxel-toy

> Tool for converting .vox files to other useful formats

Latest version **0.0.9** (published 2019-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install voxel-toy
pnpm add voxel-toy
yarn add voxel-toy
bun add voxel-toy
```

Provides the command `vox`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9 |
| Published | 2019-06-30 |
| First published | 2019-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 15.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | bberak |
| Maintainers | bberak |
| Keywords | Voxel, .vox, MagicaVoxel, 3D, Games, Converter |

## Links

- npm: https://www.npmjs.com/package/voxel-toy
- Repository: https://github.com/bberak/voxel-toy
- Issues: https://github.com/bberak/voxel-toy/issues
- npm.io page: https://npm.io/package/voxel-toy

## Dependencies (3)

- [args](https://npm.io/package/args.md) ^5.0.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [vox-reader](https://npm.io/package/vox-reader.md) ^1.0.0

## Recent versions

- 0.0.9 (latest) — 2019-06-30
- 0.0.8 — 2019-06-29
- 0.0.7 — 2019-06-29
- 0.0.6 — 2019-06-29
- 0.0.5 — 2019-06-29
- 0.0.4 — 2019-06-29
- 0.0.3 — 2019-06-29
- 0.0.2 — 2019-06-25
- 0.0.1 — 2019-06-24

## README

# Voxel Toy

A tool for converting .vox files to [Unreal Engine](https://www.unrealengine.com/) geometry. What are .vox files? They're the native file format generated by the amazing, lightweight [MagicaVoxel](https://ephtracy.github.io/) editor.

<p align="center">
  	<a href="https://github.com/bberak/voxel-toy/raw/master/assets/images/mv-1.png">
    	<img src="https://github.com/bberak/voxel-toy/raw/master/assets/images/mv-1.png" height="300" width="300" />
	</a>
	<a href="https://github.com/bberak/voxel-toy/raw/master/assets/images/ut-1.png">
    	<img src="https://github.com/bberak/voxel-toy/raw/master/assets/images/ut-1.png" height="300" width="300" />
	</a>
	<br />
	<a href="https://github.com/bberak/voxel-toy/raw/master/assets/images/ut-2.png">
    	<img src="https://github.com/bberak/voxel-toy/raw/master/assets/images/ut-2.png" height="300" width="300" />
	</a>
	<a href="https://github.com/bberak/voxel-toy/raw/master/assets/images/mv-2.png">
    	<img src="https://github.com/bberak/voxel-toy/raw/master/assets/images/mv-2.png" height="300" width="300" />
	</a>
</p>

## Installation

```
npm install -g voxel-toy
```

Don't have NodeJS or NPM? Get it here: [https://nodejs.org](https://nodejs.org)

## Usage

### Convert .vox file to .t3d

```
vox -f /path/to/file.vox
```

### Paste .t3d into Unreal Engine 4

Once the .t3d file has been generated, open the file in a text editor and copy the entire contents. Open UE4 and paste the contents into the scene editor. Your voxel model will now be converted into UE4 BSPs/brushes/geometry.

## Options

`-c, --compress` Merge individual voxels into larger blocks where possible <br/>
`-f, --file` The path to the .vox file <br/>
`-s, --size` The size of each individual voxel in UE4 units <br/>

Example:

`vox -f /path/to/file.vox -s 200 -c true`

## Development

### Getting the source code

```
git clone https://github.com/bberak/voxel-toy
cd voxel-toy
npm install
node src/index.js
```

### Creating an executable

Install `pkg` globally:

```
npm install -g pkg
```

Create a MacOS executable:

```
pkg -t node8-macos-x64 -o vox .
```

Create a Windows executable:

```
pkg -t node8-win-x64 -o vox .
```

---
_Source: https://npm.io/package/voxel-toy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
