Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/game4all/zvox
- Owner: Game4all
- Created: 2024-01-28T22:55:53.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-01-30T20:46:25.000Z (11 months ago)
- Last Synced: 2024-01-30T21:55:53.056Z (11 months ago)
- Topics: magicavoxel, vox, voxel, zig
- Language: Zig
- Homepage:
- Size: 27.3 KB
- Stars: 0
- 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.