Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
name = "modelz"
version = "0.1.5"
edition = "2024"
author = "Alexander Medvedev"
authors = ["Alexander Medvedev"]
description = "A library to load various 3D file formats into a shared, in-memory representation"

readme = "README.md"
license = "MIT"
keywords = ["gltf", "obj", "assimp", "ply", "stl"]
keywords = ["gltf", "stl", "obj", "assimp", "ply"]
categories = ["rendering::data-formats", "graphics", "game-development"]
repository = "https://github.com/ventengine/Modelz"

Expand All @@ -25,10 +26,10 @@ ply = ["dep:ply-rs"]
log = "0.4"

# glTF 2.0
gltf = {version = "1.4.1", optional = true }
gltf = {version = "1.4", optional = true }
# OBJ Wavefront
tobj = { version = "4.0.3", default-features = false, features = ["async"], optional = true }
tobj = { version = "4.0", default-features = false, features = ["async"], optional = true }
# STL
stl_io = { version = "0.8.5", optional = true }
stl_io = { version = "0.8", optional = true }
# PLY
ply-rs = { version = "0.1.3", optional = true }
ply-rs = { version = "0.1", optional = true }
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use std::path::{Path, PathBuf};
mod gltf;
#[cfg(feature = "obj")]
mod obj;
#[cfg(feature = "stl")]
mod ply;
#[cfg(feature = "ply")]
mod ply;
#[cfg(feature = "stl")]
mod stl;

pub struct Model3D {
Expand Down Expand Up @@ -134,6 +134,8 @@ fn get_format<P: AsRef<Path>>(path: &P) -> Result<ModelFormat, ModelError> {
"gltf" | "glb" => Ok(ModelFormat::GLTF),
#[cfg(feature = "stl")]
"stl" => Ok(ModelFormat::STL),
#[cfg(feature = "ply")]
"ply" => Ok(ModelFormat::PLY),
_ => Err(ModelError::UnknownFormat),
}
}
Expand Down