flomonster / easy-gltf Goto Github PK
View Code? Open in Web Editor NEWRust crate to load gltf 2.0 files. It's now easy to get the scenes, cameras, lights and models.
License: MIT License
Rust crate to load gltf 2.0 files. It's now easy to get the scenes, cameras, lights and models.
License: MIT License
In GLTF the tangents are 4D vectors with W containing either 1 or -1 to denote the tangent space handedness. During loading, easy-gltf normalises the tangent including that "flag" field. This makes the actual direction part of the tangent incorrect and mangles the flag value
Support for loading the names of the objects would be nice.
Needs a feature flag on the gltf
crate.
Draco compression is a almost unnoticeable way to get model sizes down. Does this library support it?
The mesh indices are returned as usize
, and that makes them unusable as direct GPU input. Indices usually only allow u16
or u32
data formats.
The provided vertex type isn't repr(C)
or Copy
, so it's hard to properly feed the data directly to the GPU (fields get shuffled by the compiler). Also it would be nice if it implemented bytemuck's Pod/Zeroable for safe transmuting.
It should look like this:
/// Contains a position, normal and texture coordinates vectors.
#[repr(C)]
#[derive(Clone, Debug, Copy, PartialEq, Default)]
#[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))]
pub struct Vertex {
/// Position
pub position: Vector3<f32>,
/// Normalized normal
pub normal: Vector3<f32>,
/// Tangent normal
pub tangent: Vector4<f32>,
/// Texture coordinates
pub tex_coords: Vector2<f32>,
}
Also there is no need to use cgmath's Vector types, they could be just arrays like [f32; 4]
to avoid the cgmath dependency.
Would be convenient to have a function that loads scene from slice instead of only from path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.