Skip to main content

Crate ds3

Crate ds3 

Source
Expand description

Pure-Rust parser for Autodesk 3D Studio binary (.3ds) files.

§Quick start

use ds3::parse;

let scene = parse(&std::fs::read("model.3ds").unwrap()).unwrap();
for mesh in &scene.meshes {
    println!("{}: {} vertices, {} faces", mesh.name, mesh.vertices.len(), mesh.faces.len());
}

§Coordinate system

3DS stores vertices in right-handed Y-up (the same convention used by glTF and Bevy). No axis permutation is needed. The Mesh3ds::transform matrix is also Y-up.

Some exporters write Z-up data regardless of the spec; callers that know their source is Z-up should swap Y/Z themselves after calling parse.

Structs§

Mesh3ds
A single triangle mesh extracted from a .3ds file.
MeshBuffers
Buffers produced by Mesh3ds::to_flat_buffers or Mesh3ds::to_smooth_buffers.
Scene3ds
A complete scene read from a .3ds file.

Enums§

Error3ds
Errors that can occur while parsing a .3ds file.

Functions§

parse
Parse a .3ds file from a byte slice.

Type Aliases§

Mat4x3
Row-major 4×3 local-to-world transform matrix.