create_vox

Crates.iocreate_vox
lib.rscreate_vox
version1.0.1
sourcesrc
created_at2021-03-27 16:48:33.468404
updated_at2022-08-08 22:23:13.751577
descriptionA rust library for creating magicavoxel files
homepage
repositoryhttps://github.com/2crabs/create_vox
max_upload_size
id374297
size62,452
Mickey Fraser (2crabs)

documentation

README

Creating vox files in Rust

A Rust library for easily creating and loading magicavoxel files. Includes all functionality for creating and reading a .vox file. Supports multiple models and copies of models in the same .vox file.

Example

creating a file:

//creates a vox file with a red cube in the center.
let mut cube_vox = VoxFile::new(100,100,100);
cube_vox.set_palette_color(255,255,0,0,255);
cube_vox.models[0].add_cube(25,25,25,75,75,75,255).unwrap();
cube_vox.save("red_cube.vox");

loading a file:

//opens a file and then auto scales it
let mut new_vox = VoxFile::load("my_vox.vox");
new_vox.models[0].auto_size();
new_vox.save("new_vox.vox");
Commit count: 87

cargo fmt