All Projects → barraudf → CsharpVoxReader

barraudf / CsharpVoxReader

Licence: MIT license
A generic C# reader for MagicaVoxel's vox file format

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to CsharpVoxReader

MagicaVoxel File Writer
MagicaVoxel File Writer dependency free cpp class
Stars: ✭ 26 (+73.33%)
Mutual labels:  vox, magicavoxel
BookReader
📕 "任阅" 网络小说阅读器,3D翻页效果、txt/pdf/epub书籍阅读、Wifi传书~
Stars: ✭ 6,113 (+40653.33%)
Mutual labels:  reader
core
An advanced and highly optimized Java library to build frameworks: it's useful for scanning class paths, generating classes at runtime, facilitating the use of reflection, scanning the filesystem, executing stringified source code and much more...
Stars: ✭ 100 (+566.67%)
Mutual labels:  loader
lobsters-reader
iOS app for reading Lobste.rs.
Stars: ✭ 15 (+0%)
Mutual labels:  reader
Prevailer-orientation-support-library-for-Android
Prevailer is a simple android library that helps in preserving object instances across orientation change in android and is JAVA 8 and MVP ready.
Stars: ✭ 17 (+13.33%)
Mutual labels:  loader
z-reader
📘 [vscode插件] 小说阅读器,支持在线搜索和本地阅读,支持txt和epub格式
Stars: ✭ 205 (+1266.67%)
Mutual labels:  reader
tiny-skeleton-loader-react
zero dependency, ultra lightweight (1KB gzipped) skeleton loader component for react 🐥
Stars: ✭ 28 (+86.67%)
Mutual labels:  loader
architectury-api
An intermediary api aimed at easing development of multiplatform mods.
Stars: ✭ 139 (+826.67%)
Mutual labels:  loader
faker
A kotlin extension to load images asynchronously on android
Stars: ✭ 58 (+286.67%)
Mutual labels:  loader
Smart-Scientific-Reader
Hammer PDF - Smart Science Reader
Stars: ✭ 115 (+666.67%)
Mutual labels:  reader
KVSpinnerView
KVSpinnerView is highly customizable progress HUD
Stars: ✭ 37 (+146.67%)
Mutual labels:  loader
moonlight-admin
Easy to use admin panel, designed for cheat loaders.
Stars: ✭ 29 (+93.33%)
Mutual labels:  loader
memory-module-loader
An implementation of a Windows loader that can load dynamic-linked libraries (DLLs) directly from memory
Stars: ✭ 111 (+640%)
Mutual labels:  loader
react-native-less-transformer
Use Less to style your React Native apps.
Stars: ✭ 26 (+73.33%)
Mutual labels:  loader
LoadersPack-Android
Android LoadersPack - a replacement of default android material progressbar with different loaders
Stars: ✭ 119 (+693.33%)
Mutual labels:  loader
webpack-image-srcset-loader
Generate srcset string from image
Stars: ✭ 28 (+86.67%)
Mutual labels:  loader
react-intl-loader
Async react-intl locale data loader for webpack
Stars: ✭ 46 (+206.67%)
Mutual labels:  loader
rprogress
React ajax loader progress bar with clear API
Stars: ✭ 12 (-20%)
Mutual labels:  loader
rollup-loader
Rollup does what it can do, and let Webpack finish the job.
Stars: ✭ 86 (+473.33%)
Mutual labels:  loader
baruch
A mobile app where you can read and download light novels.
Stars: ✭ 68 (+353.33%)
Mutual labels:  reader

CsharpVoxReader

A generic C# reader for MagicaVoxel's vox file format. It should be usable with any C# project (monogame, unity, ...). If it doesn't, please let me know. Contributions are welcome.

Usage

First clone the repository as a submodule for your current project.

Then you have to make your own implementation of IVoxLoader so that you can receive vox data from a file (palettes, models, ...).

using CsharpVoxReader;
using System;


class MyLoader : IVoxLoader
{
    public void LoadModel(Int32 sizeX, Int32 sizeY, Int32 sizeZ, byte[,,] data)
    {
        // Create a model
    }

    public void LoadPalette(UInt32[] palette)
    {
        // Set palette

        // You can use extension method ToARGB from namespace CsharpVoxReader
        // To get rgba values
        // ie: palette[1].ToARGB(out a, out r, out g, out b)
    }
}

Finally pass it to VoxReader to read a vox file.

using CsharpVoxReader;
using System;


class Program
{
    static void Main(string[] args)
    {
        VoxReader r = new VoxReader(@"C:\path\to\my\file.vox", new MyLoader());

        r.Read();
    }
}

Note about vox file format

Magicavoxel was recently updated to v0.99a. Vox file format number was unchanged, but includes a lot of new stuff, not yet documented in the Vox file format description.

As such, CsharpVoxReader can only read documented chunks : palettes and models (Material and Pack chunks are read from older magicavoxel versions, but material has changed and pack doesn't seem to be used anymore). New stuff like layers, model position in the world won't be readable until the documentated.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].