Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/game4all/zvox

Zig library to parse Magicavoxel .vox files
https://github.com/game4all/zvox

magicavoxel vox voxel zig

Last synced: about 2 months ago
JSON representation

Zig library to parse Magicavoxel .vox files

Awesome Lists containing this project

README

        

# `zvox`

### Installation

Using Zig's package manager.

### Usage

```zig

var gpa = std.heap.GeneralPurposeAllocator(.{}){};
const alloc = gpa.allocator();
defer _ = gpa.deinit();

const file = try std.fs.cwd().openFile("testing/chicken.vox", .{ .mode = .read_only });
defer file.close();

const reader = file.reader();
const voxfile = try VoxFile.from_reader(reader, alloc);
std.log.info("Got {} models loaded", voxfile.models.len);
defer voxfile.deinit(alloc);
```

### License

Licensed under the MIT License.