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 1 month 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 (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-26T15:11:37.000Z (7 months ago)
- Last Synced: 2024-11-12T02:38:37.493Z (3 months ago)
- Topics: magicavoxel, vox, voxel, zig
- Language: Zig
- Homepage:
- Size: 27.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.