#3d #格式 #3d-model #gamedev

mole

一款针对游戏的自定义3D模型格式

2个版本

0.1.1 2022年12月30日
0.1.0 2022年12月30日

#34#3d-model

无许可证

6KB
79

摩尔

一个愚蠢的3D模型格式,实际上是一个zstandard messagepack结构。它可以直接从游戏或引擎中导入,无需5000个依赖和6小时的构建时间。GLTF太复杂了 :(

用法

use mole::from_bytes;
let file = std::fs::read("hello.mol").unwrap();
let hill = mole::from_bytes(file);
println!("{:?}", hill);
std::fs::write("hello.mol", mole::to_bytes(&hill));

lib.rs:

摩尔

一个愚蠢的3D模型格式,实际上是一个zstandard messagepack结构。它可以直接从游戏或引擎中导入,无需5000个依赖和6小时的构建时间。GLTF太复杂了 :( 它是自包含的,所以纹理存储在文件中。嘿,这很简单。请原谅我的双关语。(注意:Moletex = 顶点,Molehill = 文件顶层格式,Moledel = 文件中的一个模型,Moleterial = 材质)

用法

use mole::from_bytes;
let file = std::fs::read("hello.mol").unwrap();
let hill = mole::from_bytes(file);
println!("{:?}", hill);
std::fs::write("hello.mol", mole::to_bytes(&hill));

依赖

~20MB
~228K SLoC