https://github.com/game4all/zvox
🧊 Zig library to parse Magicavoxel .vox files
https://github.com/game4all/zvox
magicavoxel vox voxel zig
Last synced: 8 months ago
JSON representation
🧊 Zig library to parse Magicavoxel .vox files
- Host: GitHub
- URL: https://github.com/game4all/zvox
- Owner: Game4all
- Created: 2024-01-28T22:55:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-06-14T18:46:10.000Z (about 1 year ago)
- Last Synced: 2025-06-14T19:59:46.899Z (about 1 year ago)
- Topics: magicavoxel, vox, voxel, zig
- Language: Zig
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.